From d64c75ae4a5561075d9020ff1e4e62f160660b43 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 24 Mar 2016 18:12:57 +0500 Subject: [PATCH] Multiple UI Improvements --- .../admin_console/admin_sidebar.jsx | 467 +++++++++--------- webapp/components/rhs_thread.jsx | 1 + webapp/components/search_bar.jsx | 1 + .../components/suggestion/suggestion_box.jsx | 10 +- webapp/sass/components/_buttons.scss | 10 + webapp/sass/components/_search.scss | 16 +- webapp/sass/responsive/_mobile.scss | 125 ++--- 7 files changed, 333 insertions(+), 297 deletions(-) diff --git a/webapp/components/admin_console/admin_sidebar.jsx b/webapp/components/admin_console/admin_sidebar.jsx index 8ee75e2efd..9f9e85de11 100644 --- a/webapp/components/admin_console/admin_sidebar.jsx +++ b/webapp/components/admin_console/admin_sidebar.jsx @@ -1,8 +1,11 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. +import $ from 'jquery'; + import AdminSidebarHeader from './admin_sidebar_header.jsx'; import SelectTeamModal from './select_team_modal.jsx'; +import * as Utils from 'utils/utils.jsx'; import {FormattedMessage} from 'react-intl'; @@ -27,6 +30,12 @@ export default class AdminSidebar extends React.Component { }; } + componentDidUpdate() { + if (!Utils.isMobile()) { + $('.sidebar--left .nav-pills__container').perfectScrollbar(); + } + } + handleClick(name, teamId, e) { e.preventDefault(); this.props.selectTab(name, teamId); @@ -242,244 +251,242 @@ export default class AdminSidebar extends React.Component { return (
-
- -
-
{isSearching} ); + } else if (this.props.type === 'search') { + textbox = ( + + ); } else if (this.props.type === 'textarea') { textbox = ( li { > a { - border-top: 1px solid #ddd; + border-top: 1px solid #dddddd; font-size: 1.1em; line-height: 2.7; - color: #555; + color: #555555; .glyphicon { margin-left: 7px; @@ -438,25 +444,24 @@ } .file-preview__remove { - width: 28px; + @include alpha-property(background, $black, .5); height: 28px; left: auto; right: 0; - top: 0; - background: #444; - background: rgba(#000, .5); text-align: center; + top: 0; + width: 28px; &:after { display: none; } i { - line-height: 29px; - top: auto; - right: auto; - position: relative; font-size: 16px; + line-height: 29px; + position: relative; + right: auto; + top: auto; } } @@ -467,10 +472,10 @@ margin: 0 -15px; .dropdown__icon { - width: 4px; - height: 16px; @include background-size(100% 100%); display: inline-block; + height: 16px; + width: 4px; } } @@ -502,10 +507,11 @@ .footer-pane { .footer-link { - padding: 0; - width: 100%; - text-align: right; line-height: 1.7; + padding: 0; + text-align: right; + width: 100%; + &.copyright { width: 100%; } @@ -517,10 +523,10 @@ } .search-bar__container { - padding: 0; @include flex(0 0 44px); background: $primary-color; - color: #fff; + color: $white; + padding: 0; &.focused { .sidebar__collapse { @@ -534,40 +540,40 @@ } .search__clear { - @include translateX(0px); + @include translateX(0); } } + .search__form { - border: none; - @include translateX(0px); - padding: 7px 20px 0 49px; - height: 45px; - position: relative; @include single-transition(all, .2s, linear); + @include translateX(0); + border: none; + height: 45px; + padding: 7px 20px 0 49px; + position: relative; .glyphicon-refresh-animate { + color: $black; right: 33px; top: 15px; - color: #fff; - color: rgba(255,255,255,.5); } .form-control { - border: none; - padding: 0 10px 0 31px; - background: rgba(black, .2); @include border-radius(3px); - color: #444; - background: #fff; + background: $white; + border: none; + color: $dark-gray; + padding: 0 10px 0 31px; } } } + .sidebar--menu { @include single-transition(transform, .5s, ease); @include translate3d(290px, 0, 0); - width: 290px; border: none; display: block; + width: 290px; &.move--left { @include translate3d(0, 0, 0); @@ -627,7 +633,7 @@ ul { clear: both; - background: #fff; + background: #ffffff; border-radius: 3px; top: 5px; position: relative; @@ -795,6 +801,7 @@ } } } + .activity-log__table { > div { display: block; @@ -805,8 +812,8 @@ } .activity-log__action { - text-align: left; margin-top: 10px; + text-align: left; } } } @@ -816,8 +823,8 @@ .settings-modal { .settings-table { .security-links { - margin-bottom: 10px; display: block; + margin-bottom: 10px; &:last-child { margin-bottom: 0; @@ -850,11 +857,11 @@ .member-drop, .member-role { - position: relative; - margin: 0px 0 0 44px; + margin: 0 0 0 44px; padding: 5px 0; - top: 0; + position: relative; right: 0; + top: 0; } .open > .dropdown-menu {