diff --git a/app/theme/client/imports/components/header.css b/app/theme/client/imports/components/header.css index 3ef3fdc1dc8b..9c28ca128a4f 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 52f5360d7f5c..9b923fc79f0f 100644 --- a/app/ui/client/components/header/headerRoom.js +++ b/app/ui/client/components/header/headerRoom.js @@ -177,6 +177,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 = () => {