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] Remove sidebar header on admin embedded version #8334

Merged
merged 2 commits into from
Sep 29, 2017
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<template name="livechatFlex">
<aside class="sidebar-light" role="navigation">
<header class="sidebar__header">
{{> accountBox lighten=true modifier="--livechat"}}
<button class="sidebar-flex__back-button" data-action="back">
{{> icon block="sidebar-flex__back-icon" icon="back"}}
<span>{{_ "Back_to_chat"}}</span>
</button>
</header>
<div class="rooms-list">
{{#unless embeddedVersion}}
<header class="sidebar__header">
{{> accountBox lighten=true modifier="--livechat"}}
<button class="sidebar-flex__back-button" data-action="back">
{{> icon block="sidebar-flex__back-icon" icon="back"}}
<span>{{_ "Back_to_chat"}}</span>
</button>
</header>
{{/unless}}
<div class="rooms-list {{#if embeddedVersion}}rooms-list--embedded{{/if}}">
<ul class="rooms-list__list">
{{> sidebarItem menuItem "Current_Chats" false "livechat-current-chats" }}
{{> sidebarItem menuItem "User_management" false "livechat-users" }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ Template.livechatFlex.helpers({
pathSection: section,
darken: true
};
},
embeddedVersion() {
return RocketChat.Layout.isEmbedded();
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@

.rooms-list {
position: relative;

overflow-y: scroll;

flex: 1 1 auto;

height: 100%;

flex: 1 1 auto;
&--embedded {
margin-top: 2rem;
}

&__list {
&:not(:last-child) {
Expand Down
18 changes: 10 additions & 8 deletions packages/rocketchat-ui-account/client/accountFlex.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<template name="accountFlex">
<aside class="sidebar-light" role="navigation">
<header class="sidebar__header">
{{> accountBox lighten=true modifier="--account" }}
<button class="sidebar-flex__back-button" data-action="back">
{{> icon block="sidebar-flex__back-icon" icon="back"}}
<span>{{_ "Back_to_chat"}}</span>
</button>
</header>
<div class="rooms-list">
{{#unless embeddedVersion}}
<header class="sidebar__header">
{{> accountBox lighten=true modifier="--account" }}
Copy link
Member

Choose a reason for hiding this comment

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

Remove this account box

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can remove that, but I won't do that on this PR. This PR is about embedded view and not about accountBox.

<button class="sidebar-flex__back-button" data-action="back">
{{> icon block="sidebar-flex__back-icon" icon="back"}}
<span>{{_ "Back_to_chat"}}</span>
Copy link
Member

Choose a reason for hiding this comment

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

Change "Back_to_chat" to just "Back"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why?

</button>
</header>
{{/unless}}
<div class="rooms-list {{#if embeddedVersion}}rooms-list--embedded{{/if}}">
<ul class="rooms-list__list">
{{> sidebarItem menuItem "Preferences" "customize" "account" "preferences" }}

Expand Down
3 changes: 3 additions & 0 deletions packages/rocketchat-ui-account/client/accountFlex.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ Template.accountFlex.helpers({
pathGroup: group,
darken: true
};
},
embeddedVersion() {
return RocketChat.Layout.isEmbedded();
}
});
18 changes: 10 additions & 8 deletions packages/rocketchat-ui-admin/client/adminFlex.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
<template name="adminFlex">
<aside class="sidebar-light" role="navigation">
<header class="sidebar__header">
{{> accountBox lighten=true modifier="--admin"}}
<button class="sidebar-flex__back-button" data-action="back">
{{> icon block="sidebar-flex__back-icon" icon="back"}}
<span>{{_ "Back_to_chat"}}</span>
</button>
</header>
<div class="rooms-list" aria-label="{{_ "Administration"}}">
{{#unless embeddedVersion}}
<header class="sidebar__header">
{{> accountBox lighten=true modifier="--admin"}}
Copy link
Member

Choose a reason for hiding this comment

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

Also remove this account box

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can remove that, but I won't do that on this PR. This PR is about embedded view and not about accountBox.

<button class="sidebar-flex__back-button" data-action="back">
{{> icon block="sidebar-flex__back-icon" icon="back"}}
<span>{{_ "Back_to_chat"}}</span>
Copy link
Member

Choose a reason for hiding this comment

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

Change "Back_to_chat" to just "Back"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why?

Copy link
Member

Choose a reason for hiding this comment

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

Less is More

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok, it's easy to maintain translations :)

</button>
</header>
{{/unless}}
<div class="rooms-list {{#if embeddedVersion}}rooms-list--embedded{{/if}}" aria-label="{{_ "Administration"}}">
<h3 class="rooms-list__type">{{_ "Administration"}}</h3>
<ul class="rooms-list__list">
{{> sidebarItem menuItem "Info" false "admin-info" "" }}
Expand Down
3 changes: 3 additions & 0 deletions packages/rocketchat-ui-admin/client/adminFlex.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ Template.adminFlex.helpers({
pathGroup: group,
darken: true
};
},
embeddedVersion() {
return RocketChat.Layout.isEmbedded();
}
});

Expand Down
12 changes: 7 additions & 5 deletions packages/rocketchat-ui/client/views/app/burger.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
<i></i>
<i></i>
<i></i>
{{#if unread}}
<div class="unread-burger-alert color-error-contrast background-error-color">
{{unread}}
</div>
{{/if}}
{{#unless embeddedVersion}}
{{#if unread}}
<div class="unread-burger-alert color-error-contrast background-error-color">
{{unread}}
</div>
{{/if}}
{{/unless}}
</div>
</template>
3 changes: 3 additions & 0 deletions packages/rocketchat-ui/client/views/app/burger.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,8 @@ Template.burger.helpers({
if (Session.equals('isMenuOpen', true)) {
return 'menu-opened';
}
},
embeddedVersion() {
return RocketChat.Layout.isEmbedded();
}
});