Skip to content

Commit

Permalink
[NEW] Setting Top navbar in embedded mode (#16064)
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriellsh authored and ggazzo committed Jan 6, 2020
1 parent a082a50 commit 9723045
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
4 changes: 4 additions & 0 deletions app/lib/server/startup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -1390,6 +1390,10 @@ settings.addGroup('Layout', function() {
type: 'boolean',
public: true,
});
return this.add('UI_Show_top_navbar_embedded_layout', false, {
type: 'boolean',
public: true,
});
});
});

Expand Down
4 changes: 2 additions & 2 deletions app/ui/client/views/app/room.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<template name="room">
<div class="main-content-flex">
<section class="messages-container flex-tab-main-content {{adminClass}}" id="{{windowId}}" aria-label="{{_ "Channel"}}">
{{# unless embeddedVersion}}
{{# if showTopNavbar}}
{{# headerRoom}}
{{#with flexData}}
<div class="rc-header__block rc-header__block-action">
{{> RoomsActionTab}}
</div>
{{/with}}
{{/headerRoom}}
{{/unless}}
{{/if}}
<div class="messages-container-wrapper">
<div class="messages-container-main dropzone">
<div class="dropzone-overlay background-transparent-darkest color-content-background-color">{{_ "Drop_to_upload_file"}}</div>
Expand Down
4 changes: 4 additions & 0 deletions app/ui/client/views/app/room.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,10 @@ Template.room.helpers({
return Layout.isEmbedded();
},

showTopNavbar() {
return !Layout.isEmbedded() || settings.get('UI_Show_top_navbar_embedded_layout');
},

subscribed() {
const { state } = Template.instance();
return state.get('subscribed');
Expand Down
1 change: 1 addition & 0 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -2883,6 +2883,7 @@
"Should_be_a_URL_of_an_image": "Should be a URL of an image.",
"Should_exists_a_user_with_this_username": "The user must already exist.",
"Show_Setup_Wizard": "Show Setup Wizard",
"UI_Show_top_navbar_embedded_layout": "Show top navbar in embedded layout",
"Show_agent_email": "Show agent email",
"Show_agent_info": "Show agent information",
"Show_all": "Show All",
Expand Down

1 comment on commit 9723045

@Yambr
Copy link

@Yambr Yambr commented on 9723045 Feb 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

version 2.4.9 - I can’t see this setting UI_Show_top_navbar_embedded_layout
(Show top navbar in embedded layout) for clean install

Please sign in to comment.