diff --git a/app/theme/client/imports/components/header.css b/app/theme/client/imports/components/header.css index 21648b21ae4b..d5b0a05cf493 100644 --- a/app/theme/client/imports/components/header.css +++ b/app/theme/client/imports/components/header.css @@ -75,6 +75,8 @@ padding: 0 0.5rem; + cursor: pointer; + align-items: center; &-action { diff --git a/app/ui/client/components/header/headerRoom.js b/app/ui/client/components/header/headerRoom.js index ec921d7e1901..2a843f8e88c6 100644 --- a/app/ui/client/components/header/headerRoom.js +++ b/app/ui/client/components/header/headerRoom.js @@ -178,6 +178,31 @@ Template.headerRoom.events({ }); } }, + 'click .rc-header__content.rc-header__block'(event, instance) { + const { tabBar } = instance.parentTemplate(); + const $flexTab = $('.flex-tab-container .flex-tab'); + + if (tabBar.getState() === 'opened' && (tabBar.getTemplate() === 'channelSettings' || tabBar.getTemplate() === 'membersList')) { + $flexTab.attr('template', ''); + return tabBar.close(); + } + + if (instance.currentChannel.t !== 'd') { + $flexTab.attr('template', 'channelSettings'); + tabBar.setData({ + label: 'Room_Info', + icon: 'info-circled', + }); + tabBar.open(TabBar.getButton('channel-settings')); + } else { + $flexTab.attr('template', 'membersList'); + tabBar.setData({ + label: 'User_Info', + icon: 'info-user', + }); + tabBar.open(TabBar.getButton('user-info')); + } + }, }); const loadUserStatusText = () => {