From 461e8532a7b82b31964c47b2e69e8350b9c77474 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 10 Mar 2016 22:55:16 +0500 Subject: PLT-2138 - Fixing theme sharing box --- .../user_settings/custom_theme_chooser.jsx | 4 +++ web/react/utils/constants.jsx | 30 +++++++++++----------- 2 files changed, 19 insertions(+), 15 deletions(-) (limited to 'web/react') diff --git a/web/react/components/user_settings/custom_theme_chooser.jsx b/web/react/components/user_settings/custom_theme_chooser.jsx index 1e724bb6e..143eadccb 100644 --- a/web/react/components/user_settings/custom_theme_chooser.jsx +++ b/web/react/components/user_settings/custom_theme_chooser.jsx @@ -253,6 +253,9 @@ class CustomThemeChooser extends React.Component { ); + + colors += theme[element.id] + ','; + } else if (element.group === 'sidebarElements') { sidebarElements.push(
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index daea9f43e..4b1f73b79 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -370,21 +370,6 @@ export default { id: 'newMessageSeparator', uiName: 'New Message Separator' }, - { - group: 'linkAndButtonElements', - id: 'linkColor', - uiName: 'Link Color' - }, - { - group: 'linkAndButtonElements', - id: 'buttonBg', - uiName: 'Button BG' - }, - { - group: 'linkAndButtonElements', - id: 'buttonColor', - uiName: 'Button Text' - }, { group: 'centerChannelElements', id: 'mentionHighlightBg', @@ -417,6 +402,21 @@ export default { uiName: 'Monokai' } ] + }, + { + group: 'linkAndButtonElements', + id: 'linkColor', + uiName: 'Link Color' + }, + { + group: 'linkAndButtonElements', + id: 'buttonBg', + uiName: 'Button BG' + }, + { + group: 'linkAndButtonElements', + id: 'buttonColor', + uiName: 'Button Text' } ], DEFAULT_CODE_THEME: 'github', -- cgit v1.2.3-1-g7c22 From 3ee2d218130e01d8df729495e0d121615271e98b Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 10 Mar 2016 09:56:43 -0800 Subject: Fixing blue bar on iOS --- web/react/components/textbox.jsx | 2 +- web/react/stores/socket_store.jsx | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'web/react') diff --git a/web/react/components/textbox.jsx b/web/react/components/textbox.jsx index c8c0c071e..d4eb60676 100644 --- a/web/react/components/textbox.jsx +++ b/web/react/components/textbox.jsx @@ -61,7 +61,7 @@ export default class Textbox extends React.Component { onRecievedError() { const errorCount = ErrorStore.getConnectionErrorCount(); - if (errorCount > 0) { + if (errorCount > 1) { this.setState({connection: 'bad-connection'}); } else { this.setState({connection: ''}); diff --git a/web/react/stores/socket_store.jsx b/web/react/stores/socket_store.jsx index 9b2b049b7..ec25255d9 100644 --- a/web/react/stores/socket_store.jsx +++ b/web/react/stores/socket_store.jsx @@ -31,6 +31,7 @@ class SocketStoreClass extends EventEmitter { this.close = this.close.bind(this); this.failCount = 0; + this.isInitialize = false; this.translations = this.getDefaultTranslations(); @@ -58,24 +59,23 @@ class SocketStoreClass extends EventEmitter { if (this.failCount === 0) { console.log('websocket connecting to ' + connUrl); //eslint-disable-line no-console - if (ErrorStore.getConnectionErrorCount() > 0) { - ErrorStore.setConnectionErrorCount(0); - ErrorStore.emitChange(); - } } + conn = new WebSocket(connUrl); conn.onopen = () => { if (this.failCount > 0) { console.log('websocket re-established connection'); //eslint-disable-line no-console + AsyncClient.getChannels(); + AsyncClient.getPosts(ChannelStore.getCurrentId()); + } + if (this.isInitialize) { ErrorStore.clearLastError(); ErrorStore.emitChange(); - - AsyncClient.getChannels(); - AsyncClient.getPosts(ChannelStore.getCurrentId()); } + this.isInitialize = true; this.failCount = 0; }; -- cgit v1.2.3-1-g7c22 From b9f468623cac8e7afd5552da100f39c22c44ec25 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 10 Mar 2016 23:03:06 +0500 Subject: Removing console --- web/react/components/user_settings/custom_theme_chooser.jsx | 1 - 1 file changed, 1 deletion(-) (limited to 'web/react') diff --git a/web/react/components/user_settings/custom_theme_chooser.jsx b/web/react/components/user_settings/custom_theme_chooser.jsx index 143eadccb..33191a9f0 100644 --- a/web/react/components/user_settings/custom_theme_chooser.jsx +++ b/web/react/components/user_settings/custom_theme_chooser.jsx @@ -306,7 +306,6 @@ class CustomThemeChooser extends React.Component { }); colors += theme.codeTheme; - console.log(colors); const pasteBox = (
-- cgit v1.2.3-1-g7c22 From 060cc2c825cd951c37a715af79b982f8aa99ebc4 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 10 Mar 2016 23:19:36 +0500 Subject: Fixing padding issue --- web/react/components/user_settings/custom_theme_chooser.jsx | 1 - 1 file changed, 1 deletion(-) (limited to 'web/react') diff --git a/web/react/components/user_settings/custom_theme_chooser.jsx b/web/react/components/user_settings/custom_theme_chooser.jsx index 33191a9f0..4ee9fd0e2 100644 --- a/web/react/components/user_settings/custom_theme_chooser.jsx +++ b/web/react/components/user_settings/custom_theme_chooser.jsx @@ -255,7 +255,6 @@ class CustomThemeChooser extends React.Component { ); colors += theme[element.id] + ','; - } else if (element.group === 'sidebarElements') { sidebarElements.push(
Date: Wed, 9 Mar 2016 10:00:16 -0500 Subject: Disabled embed toggle when it's disabled in user settings --- .../components/post_body_additional_content.jsx | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) (limited to 'web/react') diff --git a/web/react/components/post_body_additional_content.jsx b/web/react/components/post_body_additional_content.jsx index c2a928f3b..70b3c8dbf 100644 --- a/web/react/components/post_body_additional_content.jsx +++ b/web/react/components/post_body_additional_content.jsx @@ -112,24 +112,32 @@ export default class PostBodyAdditionalContent extends React.Component { } render() { - var generateEmbed = this.generateEmbed(); + const generateEmbed = this.generateEmbed(); + if (generateEmbed) { - return ( -
+ let toggle; + if (Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMBED_TOGGLE)) { + toggle = ( - + /> + ); + } + + return ( +
+ {toggle}
- ); + ); } + return null; } } -- cgit v1.2.3-1-g7c22 From e4fed928d9365ba3e096a02e590cd741de4d2cb2 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 10 Mar 2016 13:27:34 +0500 Subject: Adding or separator between ldap, username, email, github Updating code theme name Updating conditions for login page updated the 2.0 Dockerfile to include the proper location of mm gzip Fixing search loading icon on mobile Adding or separator between ldap, username, email and github --- web/react/components/login.jsx | 34 ++++++++++++++++++++++++++++++++++ web/react/utils/constants.jsx | 6 +++--- 2 files changed, 37 insertions(+), 3 deletions(-) (limited to 'web/react') diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index 581b8e0b5..1c393c679 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -19,6 +19,8 @@ export default class Login extends React.Component { render() { const teamDisplayName = this.props.teamDisplayName; const teamName = this.props.teamName; + const ldapEnabled = global.window.mm_config.EnableLdap === 'true'; + const usernameSigninEnabled = global.window.mm_config.EnableSignInWithUsername === 'true'; let loginMessage = []; if (global.window.mm_config.EnableSignUpWithGitLab === 'true') { @@ -173,6 +175,22 @@ export default class Login extends React.Component { ); } + if (ldapEnabled && (loginMessage.length > 0 || emailSignup || usernameSigninEnabled)) { + ldapLogin = ( +
+
+ +
+ +
+ ); + } + let findTeams = null; if (!Utils.isMobileApp()) { findTeams = ( @@ -197,6 +215,22 @@ export default class Login extends React.Component { ); } + if (usernameSigninEnabled && (loginMessage.length > 0 || emailSignup || ldapEnabled)) { + usernameLogin = ( +
+
+ +
+ +
+ ); + } + return (
diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 4b1f73b79..3147bbd6a 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -267,7 +267,7 @@ export default { buttonColor: '#FFFFFF', mentionHighlightBg: '#984063', mentionHighlightLink: '#A4FFEB', - codeTheme: 'solarized_dark' + codeTheme: 'solarized-dark' }, windows10: { type: 'Windows Dark', @@ -386,11 +386,11 @@ export default { uiName: 'Code Theme', themes: [ { - id: 'solarized_dark', + id: 'solarized-dark', uiName: 'Solarized Dark' }, { - id: 'solarized_light', + id: 'solarized-light', uiName: 'Solarized Light' }, { -- cgit v1.2.3-1-g7c22