From 52f73c30cafd6afaa11361b05972e25ebc223a81 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Mon, 22 May 2017 23:17:29 +0500 Subject: [PATCH] PLT-6651 - Overlay issue modal (#6473) * PLT-6651 - Overlay issue modal * Fixing mentions badge --- webapp/components/channel_switch_modal.jsx | 2 +- webapp/components/notify_counts.jsx | 4 ++-- webapp/components/sidebar.jsx | 2 +- webapp/components/team_sidebar/components/team_button.jsx | 2 +- webapp/sass/components/_mentions.scss | 2 +- webapp/sass/components/_modal.scss | 6 ++++++ webapp/sass/layout/_sidebar-left.scss | 2 +- webapp/sass/layout/_team-sidebar.scss | 2 +- webapp/utils/utils.jsx | 8 ++++---- 9 files changed, 18 insertions(+), 12 deletions(-) diff --git a/webapp/components/channel_switch_modal.jsx b/webapp/components/channel_switch_modal.jsx index 1ad9249e88..0f1fc42522 100644 --- a/webapp/components/channel_switch_modal.jsx +++ b/webapp/components/channel_switch_modal.jsx @@ -139,7 +139,7 @@ export default class SwitchChannelModal extends React.Component { const message = this.state.error; return ( {this.state.mentionCount}; + return {this.state.mentionCount}; } else if (this.state.messageCount) { - return {'•'}; + return {'•'}; } return null; } diff --git a/webapp/components/sidebar.jsx b/webapp/components/sidebar.jsx index a0e69c52ac..f8b3616f31 100644 --- a/webapp/components/sidebar.jsx +++ b/webapp/components/sidebar.jsx @@ -517,7 +517,7 @@ export default class Sidebar extends React.Component { var badge = null; if (channelMember) { if (unreadCount.mentions) { - badge = {unreadCount.mentions}; + badge = {unreadCount.mentions}; this.badgesActive = true; } } else if (this.state.loadingDMChannel === index && channel.type === Constants.DM_CHANNEL) { diff --git a/webapp/components/team_sidebar/components/team_button.jsx b/webapp/components/team_sidebar/components/team_button.jsx index 5a9b9dd598..e0670d6da9 100644 --- a/webapp/components/team_sidebar/components/team_button.jsx +++ b/webapp/components/team_sidebar/components/team_button.jsx @@ -42,7 +42,7 @@ export default class TeamButton extends React.Component { if (this.props.mentions) { badge = ( - {this.props.mentions} + {this.props.mentions} ); } } diff --git a/webapp/sass/components/_mentions.scss b/webapp/sass/components/_mentions.scss index 17a72e5a98..cfc12f1ce7 100644 --- a/webapp/sass/components/_mentions.scss +++ b/webapp/sass/components/_mentions.scss @@ -9,7 +9,7 @@ z-index: 10; } -.mention-badge { +.badge { background-color: #777; border-radius: 10px; color: #fff; diff --git a/webapp/sass/components/_modal.scss b/webapp/sass/components/_modal.scss index fc1584ea97..f5489aa2bd 100644 --- a/webapp/sass/components/_modal.scss +++ b/webapp/sass/components/_modal.scss @@ -76,6 +76,12 @@ color: alpha-color($black, .9); width: 100%; + .modal--overflow { + .modal-body { + overflow: visible; + } + } + &.modal-image { .modal-backdrop { &.in { diff --git a/webapp/sass/layout/_sidebar-left.scss b/webapp/sass/layout/_sidebar-left.scss index 25f1d29133..a7a99249bd 100644 --- a/webapp/sass/layout/_sidebar-left.scss +++ b/webapp/sass/layout/_sidebar-left.scss @@ -53,7 +53,7 @@ padding: 1em 1em 0; } - .mention-badge { + .badge { background-color: $primary-color; position: absolute; right: 10px; diff --git a/webapp/sass/layout/_team-sidebar.scss b/webapp/sass/layout/_team-sidebar.scss index 9d1cc72f5b..cb003c8285 100644 --- a/webapp/sass/layout/_team-sidebar.scss +++ b/webapp/sass/layout/_team-sidebar.scss @@ -54,7 +54,7 @@ width: 31px; } - .mention-badge { + .badge { font-size: 10px; position: absolute; right: -6px; diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index b860585cb3..da0f1fa67a 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -558,14 +558,14 @@ export function applyTheme(theme) { if (theme.mentionBj) { changeCss('.sidebar--left .nav-pills__unread-indicator, .app__body .new-messages__button div', 'background:' + theme.mentionBj); - changeCss('.app__body .sidebar--left .mention-badge', 'background:' + theme.mentionBj); - changeCss('.multi-teams .team-sidebar .mention-badge', 'background:' + theme.mentionBj); + changeCss('.app__body .sidebar--left .badge', 'background:' + theme.mentionBj); + changeCss('.multi-teams .team-sidebar .badge', 'background:' + theme.mentionBj); } if (theme.mentionColor) { changeCss('.app__body .sidebar--left .nav-pills__unread-indicator, .app__body .new-messages__button div', 'color:' + theme.mentionColor); - changeCss('.app__body .sidebar--left .mention-badge', 'color:' + theme.mentionColor); - changeCss('.app__body .multi-teams .team-sidebar .mention-badge', 'color:' + theme.mentionColor); + changeCss('.app__body .sidebar--left .badge', 'color:' + theme.mentionColor); + changeCss('.app__body .multi-teams .team-sidebar .badge', 'color:' + theme.mentionColor); } if (theme.centerChannelBg) {