diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/post_body_additional_content.jsx | 20 | ||||
-rw-r--r-- | web/react/components/textbox.jsx | 2 | ||||
-rw-r--r-- | web/react/components/user_settings/custom_theme_chooser.jsx | 2 | ||||
-rw-r--r-- | web/react/stores/socket_store.jsx | 14 | ||||
-rw-r--r-- | web/react/utils/constants.jsx | 30 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_responsive.scss | 3 |
6 files changed, 40 insertions, 31 deletions
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 ( - <div> + let toggle; + if (Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMBED_TOGGLE)) { + toggle = ( <a className='post__embed-visibility' data-expanded={this.state.embedVisible} aria-label='Toggle Embed Visibility' onClick={this.toggleEmbedVisibility} - > - </a> + /> + ); + } + + return ( + <div> + {toggle} <div className='post__embed-container' hidden={!this.state.embedVisible} > {generateEmbed} </div> </div> - ); + ); } + return null; } } 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/components/user_settings/custom_theme_chooser.jsx b/web/react/components/user_settings/custom_theme_chooser.jsx index 1e724bb6e..4ee9fd0e2 100644 --- a/web/react/components/user_settings/custom_theme_chooser.jsx +++ b/web/react/components/user_settings/custom_theme_chooser.jsx @@ -253,6 +253,8 @@ class CustomThemeChooser extends React.Component { </div> </div> ); + + colors += theme[element.id] + ','; } else if (element.group === 'sidebarElements') { sidebarElements.push( <div 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; }; 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 @@ -371,21 +371,6 @@ export default { 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', uiName: 'Mention Highlight BG' @@ -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', diff --git a/web/sass-files/sass/partials/_responsive.scss b/web/sass-files/sass/partials/_responsive.scss index a9a572768..06ce17041 100644 --- a/web/sass-files/sass/partials/_responsive.scss +++ b/web/sass-files/sass/partials/_responsive.scss @@ -573,8 +573,7 @@ .glyphicon-refresh-animate { right: 33px; top: 15px; - color: #fff; - color: rgba(255,255,255,0.5); + color: #aaa; } .form-control { border: none; |