Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Sidenav roomlist #7023

Merged
merged 6 commits into from
May 19, 2017
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions packages/rocketchat-lib/lib/roomTypesCommon.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ this.roomTypesCommon = class {
@param identifier An identifier to the room type. If a real room, MUST BE the same of `db.rocketchat_room.t` field, if not, can be null
@param order Order number of the type
@param config
template: template name to render on sideNav
icon: icon class
label: i18n label
route:
name: route name
action: route action function
identifier: room type identifier
*/

add(identifier = Random.id(), order, config) {
Expand All @@ -29,7 +30,7 @@ this.roomTypesCommon = class {
identifier,
order
});
this.roomTypes[identifier] = config;
this.roomTypes[identifier] = {...config, identifier};
if (config.route && config.route.path && config.route.name && config.route.action) {
const routeConfig = {
name: config.route.name,
Expand Down
10 changes: 5 additions & 5 deletions packages/rocketchat-lib/startup/defaultRoomTypes.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* globals openRoom */
RocketChat.roomTypes.add(null, 0, {
template: 'starredRooms',
icon: 'icon-star'
icon: 'icon-star',
label: 'Favorites'
});

RocketChat.roomTypes.add('c', 10, {
template: 'channels',
icon: 'icon-hash',
label: 'Channels',
route: {
name: 'channel',
path: '/channel/:name',
Expand Down Expand Up @@ -37,8 +37,8 @@ RocketChat.roomTypes.add('c', 10, {
});

RocketChat.roomTypes.add('d', 20, {
template: 'directMessages',
icon: 'icon-at',
label: 'Direct_Messages',
route: {
name: 'direct',
path: '/direct/:username',
Expand Down Expand Up @@ -94,8 +94,8 @@ RocketChat.roomTypes.add('d', 20, {
});

RocketChat.roomTypes.add('p', 30, {
template: 'privateGroups',
icon: 'icon-lock',
label: 'Private_Groups',
route: {
name: 'group',
path: '/group/:name',
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-livechat/roomType.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* globals openRoom, LivechatInquiry */

RocketChat.roomTypes.add('l', 5, {
template: 'livechat',
icon: 'icon-chat-empty',
label: 'Livechat',
route: {
name: 'live',
path: '/live/:code(\\d+)',
Expand Down
19 changes: 13 additions & 6 deletions packages/rocketchat-theme/client/imports/base.less
Original file line number Diff line number Diff line change
Expand Up @@ -1630,16 +1630,23 @@ label.required::after {
}
}

.unread-rooms-mode {
.unread-rooms-mode,
.unread-rooms-mode + ul {
max-height: 0;
opacity: 0;
overflow: hidden;
margin: 0;
}

&.has-unread {
transition: max-height 1s ease-in, opacity 0.5s linear;
max-height: 5000px;
opacity: 1;
}
.unread-rooms-mode.has-unread {
margin: 25px 0 0;
}

.unread-rooms-mode.has-unread,
.unread-rooms-mode.has-unread + ul {
transition: max-height 1s ease-in, opacity 0.5s linear;
max-height: 5000px;
opacity: 1;
}
}

Expand Down
4 changes: 2 additions & 2 deletions packages/rocketchat-theme/client/imports/rtl.less
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
direction: rtl;
.padding-right(8px);

h3.add-room {
h3.room-type {
i {
.left(6px);
}
Expand Down Expand Up @@ -200,7 +200,7 @@
h3 {
.padding-right(10px);

&.add-room {
&.room-type {
i {
.left(6px);
}
Expand Down
13 changes: 0 additions & 13 deletions packages/rocketchat-ui-sidenav/client/channels.html

This file was deleted.

37 changes: 0 additions & 37 deletions packages/rocketchat-ui-sidenav/client/channels.js

This file was deleted.

13 changes: 0 additions & 13 deletions packages/rocketchat-ui-sidenav/client/channelsAnonymous.html

This file was deleted.

23 changes: 0 additions & 23 deletions packages/rocketchat-ui-sidenav/client/channelsAnonymous.js

This file was deleted.

13 changes: 0 additions & 13 deletions packages/rocketchat-ui-sidenav/client/combined.html

This file was deleted.

33 changes: 0 additions & 33 deletions packages/rocketchat-ui-sidenav/client/combined.js

This file was deleted.

12 changes: 0 additions & 12 deletions packages/rocketchat-ui-sidenav/client/directMessages.html

This file was deleted.

26 changes: 0 additions & 26 deletions packages/rocketchat-ui-sidenav/client/directMessages.js

This file was deleted.

15 changes: 0 additions & 15 deletions packages/rocketchat-ui-sidenav/client/privateGroups.html

This file was deleted.

35 changes: 0 additions & 35 deletions packages/rocketchat-ui-sidenav/client/privateGroups.js

This file was deleted.

Loading