From db4273d3570cc818f64e144558380b24d21ed949 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Fri, 23 Oct 2015 19:59:32 +0500 Subject: Multiple UI Improvements --- web/react/components/settings_sidebar.jsx | 4 + web/react/components/team_settings_modal.jsx | 1 + .../user_settings/manage_incoming_hooks.jsx | 64 +++++++------- .../user_settings/manage_outgoing_hooks.jsx | 97 ++++++++++++---------- .../user_settings/user_settings_integrations.jsx | 2 - web/react/utils/utils.jsx | 4 +- web/sass-files/sass/partials/_base.scss | 9 +- web/sass-files/sass/partials/_responsive.scss | 8 ++ web/sass-files/sass/partials/_settings.scss | 42 +++++++--- web/sass-files/sass/partials/_webhooks.scss | 31 +++++++ 10 files changed, 172 insertions(+), 90 deletions(-) create mode 100644 web/sass-files/sass/partials/_webhooks.scss (limited to 'web') diff --git a/web/react/components/settings_sidebar.jsx b/web/react/components/settings_sidebar.jsx index 66568e1c8..4af46c35a 100644 --- a/web/react/components/settings_sidebar.jsx +++ b/web/react/components/settings_sidebar.jsx @@ -2,6 +2,10 @@ // See License.txt for license information. export default class SettingsSidebar extends React.Component { + componentDidUpdate() { + $('.settings-modal').find('.modal-body').scrollTop(0); + $('.settings-modal').find('.modal-body').perfectScrollbar('update'); + } constructor(props) { super(props); diff --git a/web/react/components/team_settings_modal.jsx b/web/react/components/team_settings_modal.jsx index b55373dba..5c5995020 100644 --- a/web/react/components/team_settings_modal.jsx +++ b/web/react/components/team_settings_modal.jsx @@ -19,6 +19,7 @@ export default class TeamSettingsModal extends React.Component { componentDidMount() { $('body').on('click', '.modal-back', function handleBackClick() { $(this).closest('.modal-dialog').removeClass('display--content'); + $(this).closest('.modal-dialog').find('.settings-table .nav li.active').removeClass('active'); }); $('body').on('click', '.modal-header .close', () => { setTimeout(() => { diff --git a/web/react/components/user_settings/manage_incoming_hooks.jsx b/web/react/components/user_settings/manage_incoming_hooks.jsx index 812169be4..6b8c09718 100644 --- a/web/react/components/user_settings/manage_incoming_hooks.jsx +++ b/web/react/components/user_settings/manage_incoming_hooks.jsx @@ -119,24 +119,23 @@ export default class ManageIncomingHooks extends React.Component { hooks.push(
-
-
- {'URL: '}{Utils.getWindowLocationOrigin() + '/hooks/' + hook.id} +
+ {'URL: '} + {Utils.getWindowLocationOrigin() + '/hooks/' + hook.id}
{'Channel: '}{c.display_name}
-
- - {'Remove'} - -
+ + + +
); } @@ -148,35 +147,38 @@ export default class ManageIncomingHooks extends React.Component { } else if (hooks.length > 0) { displayHooks = hooks; } else { - displayHooks = ; + displayHooks =
{'None'}
; } const existingHooks = ( -
+
- {displayHooks} +
+
+ {displayHooks} +
); return (
{'Create webhook URLs for use in external integrations. Please see '}{'http://mattermost.org/webhooks'} {' to learn more.'} -
-
- -
- - {serverError} -
+ +
+
+ + {serverError} +
+
diff --git a/web/react/components/user_settings/manage_outgoing_hooks.jsx b/web/react/components/user_settings/manage_outgoing_hooks.jsx index f6d6b515b..6e9b2205d 100644 --- a/web/react/components/user_settings/manage_outgoing_hooks.jsx +++ b/web/react/components/user_settings/manage_outgoing_hooks.jsx @@ -6,6 +6,7 @@ var Constants = require('../../utils/constants.jsx'); var ChannelStore = require('../../stores/channel_store.jsx'); var LoadingScreen = require('../loading_screen.jsx'); + export default class ManageOutgoingHooks extends React.Component { constructor() { super(); @@ -180,9 +181,8 @@ export default class ManageOutgoingHooks extends React.Component { hooks.push( +
); }); @@ -218,13 +218,16 @@ export default class ManageOutgoingHooks extends React.Component { } else if (hooks.length > 0) { displayHooks = hooks; } else { - displayHooks = ; + displayHooks =
{'None'}
; } const existingHooks = ( -
+
- {displayHooks} +
+
+ {displayHooks} +
); @@ -234,41 +237,49 @@ export default class ManageOutgoingHooks extends React.Component {
- {'Channel:'} - - {'Only public channels can be used'} -
-
- {'Trigger Words:'} - - {'Comma separated words to trigger on'} -
-
- {'Callback URLs:'} -