Skip to content

Commit

Permalink
[IMPROVE] Tab Bar actions reorder (#17072)
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigok authored Mar 29, 2020
1 parent 03cb0e1 commit 8f6fdff
Show file tree
Hide file tree
Showing 22 changed files with 55 additions and 68 deletions.
2 changes: 1 addition & 1 deletion app/channel-settings-mail-messages/client/lib/startup.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Meteor.startup(() => {
i18nTitle: 'Mail_Messages',
icon: 'mail',
template: 'mailMessagesInstructions',
order: 10,
order: 12,
condition: () => hasAllPermission('mail-messages'),
});

Expand Down
2 changes: 1 addition & 1 deletion app/channel-settings/client/startup/tabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ Meteor.startup(() => {
i18nTitle: 'Room_Info',
icon: 'info-circled',
template: 'channelSettings',
order: 1,
order: 7,
});
});
2 changes: 1 addition & 1 deletion app/discussion/client/tabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Meteor.startup(function() {
i18nTitle: 'Discussions',
icon: 'discussion',
template: 'discussionsTabbar',
order: 10,
order: 1,
condition: () => settings.get('Discussion_enabled'),
});
});
2 changes: 1 addition & 1 deletion app/e2e/client/tabbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Meteor.startup(() => {
const room = ChatRoom.findOne(Session.get('openedRoom'));
call('saveRoomSettings', room._id, 'encrypted', !room.encrypted);
},
order: 10,
order: 13,
condition: () => hasAllPermission('edit-room', Session.get('openedRoom')),
});
} else {
Expand Down
37 changes: 9 additions & 28 deletions app/lib/client/defaultTabBars.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ TabBar.addButton({
i18nTitle: 'Search_Messages',
icon: 'magnifier',
template: 'RocketSearch',
order: 2,
order: 4,
});

TabBar.addButton({
Expand All @@ -20,7 +20,7 @@ TabBar.addButton({
i18nTitle: 'User_Info',
icon: 'user',
template: 'membersList',
order: 2,
order: 5,
condition() {
const rid = Session.get('openedRoom');
const room = Rooms.findOne({
Expand All @@ -34,10 +34,10 @@ TabBar.addButton({
TabBar.addButton({
groups: ['direct'],
id: 'user-info-group',
i18nTitle: 'Members_List',
i18nTitle: 'Members',
icon: 'team',
template: 'membersList',
order: 2,
order: 5,
condition() {
const rid = Session.get('openedRoom');
const room = Rooms.findOne({
Expand All @@ -51,10 +51,10 @@ TabBar.addButton({
TabBar.addButton({
groups: ['channel', 'group'],
id: 'members-list',
i18nTitle: 'Members_List',
i18nTitle: 'Members',
icon: 'team',
template: 'membersList',
order: 2,
order: 5,
condition() {
const rid = Session.get('openedRoom');
const room = Rooms.findOne({
Expand All @@ -69,32 +69,13 @@ TabBar.addButton({
},
});

TabBar.addButton({
groups: ['channel', 'group'],
id: 'addUsers',
i18nTitle: 'Add_users',
icon: 'user-plus',
template: 'inviteUsers',
order: 2,
});

TabBar.addButton({
groups: ['channel', 'group'],
id: 'createInviteLink',
i18nTitle: 'Invite_Users',
icon: 'user-plus',
template: 'createInviteLink',
order: 2,
});


TabBar.addButton({
groups: ['channel', 'group', 'direct'],
id: 'uploaded-files-list',
i18nTitle: 'Room_uploaded_file_list',
i18nTitle: 'Files',
icon: 'clip',
template: 'uploadedFilesList',
order: 3,
order: 6,
});

TabBar.addButton({
Expand All @@ -103,5 +84,5 @@ TabBar.addButton({
i18nTitle: 'Keyboard_Shortcuts_Title',
icon: 'keyboard',
template: 'keyboardShortcuts',
order: 4,
order: 99,
});
2 changes: 1 addition & 1 deletion app/livechat/client/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TabBar.addButton({
groups: ['live'],
id: 'visitor-history',
i18nTitle: 'Past_Chats',
icon: 'chat',
icon: 'clock',
template: 'visitorHistory',
order: 11,
});
Expand Down
2 changes: 1 addition & 1 deletion app/mentions-flextab/client/tabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Meteor.startup(function() {
i18nTitle: 'Mentions',
icon: 'at',
template: 'mentionsFlexTab',
order: 3,
order: 9,
});
});
2 changes: 1 addition & 1 deletion app/message-pin/client/tabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Meteor.startup(function() {
i18nTitle: 'Pinned_Messages',
icon: 'pin',
template: 'pinnedMessages',
order: 10,
order: 11,
});
} else {
TabBar.removeButton('pinned-messages');
Expand Down
2 changes: 1 addition & 1 deletion app/message-star/client/tabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Meteor.startup(function() {
i18nTitle: 'Starred_Messages',
icon: 'star',
template: 'starredMessages',
order: 3,
order: 10,
});
});
2 changes: 1 addition & 1 deletion app/otr/client/tabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Meteor.startup(function() {
i18nTitle: 'OTR',
icon: 'key',
template: 'otrFlexTab',
order: 11,
order: 13,
});
} else {
OTR.enabled.set(false);
Expand Down
2 changes: 1 addition & 1 deletion app/push-notifications/client/tabBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ Meteor.startup(function() {
i18nTitle: 'Notifications_Preferences',
icon: 'bell',
template: 'pushNotificationsFlexTab',
order: 100,
order: 8,
});
});
2 changes: 1 addition & 1 deletion app/threads/client/flextab/threadlist.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ Meteor.startup(function() {
return subscription.tunread && subscription.tunread.length && { body: subscription.tunread.length > 99 ? '99+' : subscription.tunread.length };
}
},
order: 0,
order: 2,
});
});
2 changes: 1 addition & 1 deletion app/ui-admin/client/rooms/adminRooms.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ Template.adminRooms.onCreated(function() {
i18nTitle: 'Room_Info',
icon: 'info-circled',
template: 'adminRoomInfo',
order: 1,
order: 7,
});
ChannelSettings.addOption({
group: ['admin-room'],
Expand Down
16 changes: 0 additions & 16 deletions app/ui-admin/client/users/adminUsers.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,22 +75,6 @@ Template.adminUsers.onCreated(function() {
this.tabBarData = new ReactiveVar();
this.users = new ReactiveVar([]);

TabBar.addButton({
groups: ['admin-users'],
id: 'invite-user',
i18nTitle: 'Invite_Users',
icon: 'send',
template: 'adminInviteUser',
order: 1,
});
TabBar.addButton({
groups: ['admin-users'],
id: 'add-user',
i18nTitle: 'Add_User',
icon: 'plus',
template: 'adminUserEdit',
order: 2,
});
TabBar.addButton({
groups: ['admin-users'],
id: 'admin-user-info',
Expand Down
2 changes: 1 addition & 1 deletion app/ui-flextab/client/tabs/membersList.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ Template.membersList.onCreated(function() {
this.clearUserDetail = () => {
this.showDetail.set(false);
this.tabBar.setData({
label: 'Members_List',
label: 'Members',
icon: 'team',
});
setTimeout(() => this.clearRoomUserDetail(), 100);
Expand Down
9 changes: 9 additions & 0 deletions app/ui-master/public/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 8f6fdff

Please sign in to comment.