From 7110aa42d9b0110de6375681aa83edb06dad2645 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 28 Sep 2015 11:10:18 -0700 Subject: Fixing gitlab settings in admin console --- .../components/admin_console/gitlab_settings.jsx | 40 +++++++++++----------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'web') diff --git a/web/react/components/admin_console/gitlab_settings.jsx b/web/react/components/admin_console/gitlab_settings.jsx index 1e10c5592..eaea15b8f 100644 --- a/web/react/components/admin_console/gitlab_settings.jsx +++ b/web/react/components/admin_console/gitlab_settings.jsx @@ -12,7 +12,7 @@ export default class GitLabSettings extends React.Component { this.handleSubmit = this.handleSubmit.bind(this); this.state = { - Allow: this.props.config.GitLabSettings.Allow, + Enable: this.props.config.GitLabSettings.Enable, saveNeeded: false, serverError: null }; @@ -21,12 +21,12 @@ export default class GitLabSettings extends React.Component { handleChange(action) { var s = {saveNeeded: true, serverError: this.state.serverError}; - if (action === 'AllowTrue') { - s.Allow = true; + if (action === 'EnableTrue') { + s.Enable = true; } - if (action === 'AllowFalse') { - s.Allow = false; + if (action === 'EnableFalse') { + s.Enable = false; } this.setState(s); @@ -37,7 +37,7 @@ export default class GitLabSettings extends React.Component { $('#save-button').button('loading'); var config = this.props.config; - config.GitLabSettings.Allow = React.findDOMNode(this.refs.Allow).checked; + config.GitLabSettings.Enable = React.findDOMNode(this.refs.Enable).checked; config.GitLabSettings.Secret = React.findDOMNode(this.refs.Secret).value.trim(); config.GitLabSettings.Id = React.findDOMNode(this.refs.Id).value.trim(); config.GitLabSettings.Scope = React.findDOMNode(this.refs.Scope).value.trim(); @@ -88,7 +88,7 @@ export default class GitLabSettings extends React.Component {
@@ -96,21 +96,21 @@ export default class GitLabSettings extends React.Component { @@ -134,7 +134,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex "jcuS8PuvcpGhpgHhlcpT1Mx42pnqMxQY"' defaultValue={this.props.config.GitLabSettings.Secret} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'Obtain this value via the instructions above for logging into GitLab.'}

@@ -156,7 +156,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex "jcuS8PuvcpGhpgHhlcpT1Mx42pnqMxQY"' defaultValue={this.props.config.GitLabSettings.Id} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'Obtain this value via the instructions above for logging into GitLab'}

@@ -178,7 +178,7 @@ export default class GitLabSettings extends React.Component { placeholder='Not currently used by GitLab. Please leave blank' defaultValue={this.props.config.GitLabSettings.Scope} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'This field is not yet used by GitLab OAuth. Other OAuth providers may use this field to specify the scope of account data from OAuth provider that is sent to Mattermost.'}

@@ -200,7 +200,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex ""' defaultValue={this.props.config.GitLabSettings.AuthEndpoint} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'Enter /oauth/authorize (example http://localhost:3000/oauth/authorize).'}

@@ -222,7 +222,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex ""' defaultValue={this.props.config.GitLabSettings.TokenEndpoint} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'Enter /oauth/token.'}

@@ -244,7 +244,7 @@ export default class GitLabSettings extends React.Component { placeholder='Ex ""' defaultValue={this.props.config.GitLabSettings.UserApiEndpoint} onChange={this.handleChange} - disabled={!this.state.Allow} + disabled={!this.state.Enable} />

{'Enter /api/v3/user.'}

-- cgit v1.2.3-1-g7c22 From fdc0851be58455417968b70a10a0d4829274d86a Mon Sep 17 00:00:00 2001 From: hmhealey Date: Mon, 28 Sep 2015 15:44:02 -0400 Subject: Changed mobile search bar to use the colour of the sidebar header --- web/react/utils/utils.jsx | 1 + 1 file changed, 1 insertion(+) (limited to 'web') diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 61dcae6d8..27b8ff0de 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -580,6 +580,7 @@ export function applyTheme(theme) { changeCss('.sidebar--left .team__header, .sidebar--menu .team__header', 'background:' + theme.sidebarHeaderBg, 1); changeCss('.modal .modal-header', 'background:' + theme.sidebarHeaderBg, 1); changeCss('#navbar .navbar-default', 'background:' + theme.sidebarHeaderBg, 1); + changeCss('@media screen and (max-width: 768px) { .search-bar__container', 'background:' + theme.sidebarHeaderBg, 1); } if (theme.sidebarHeaderTextColor) { -- cgit v1.2.3-1-g7c22 From 5b67abf34bccee1425b980675865319eb3c7602c Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Mon, 28 Sep 2015 14:58:14 -0700 Subject: Better parsing of the website's title when viewing a channel --- web/react/components/sidebar.jsx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'web') diff --git a/web/react/components/sidebar.jsx b/web/react/components/sidebar.jsx index 14664ed4d..6033f200f 100644 --- a/web/react/components/sidebar.jsx +++ b/web/react/components/sidebar.jsx @@ -268,14 +268,19 @@ export default class Sidebar extends React.Component { } } updateTitle() { - var channel = ChannelStore.getCurrent(); + const channel = ChannelStore.getCurrent(); if (channel) { + let currentSiteName = ''; + if (global.window.config.SiteName != null) { + currentSiteName = global.window.config.SiteName; + } + + let currentChannelName = channel.display_name; if (channel.type === 'D') { - var teammateUsername = Utils.getDirectTeammate(channel.id).username; - document.title = teammateUsername + ' ' + document.title.substring(document.title.lastIndexOf('-')); - } else { - document.title = channel.display_name + ' ' + document.title.substring(document.title.lastIndexOf('-')); + currentChannelName = Utils.getDirectTeammate(channel.id).username; } + + document.title = currentChannelName + ' - ' + this.props.teamDisplayName + ' ' + currentSiteName; } } onScroll() { -- cgit v1.2.3-1-g7c22 From a9f5918a9df9fca2fcab97e2c7e623187755ae78 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Tue, 29 Sep 2015 08:38:26 -0400 Subject: Update incoming webhooks to hide DMs and accept direct JSON payloads. --- .../components/user_settings/manage_incoming_hooks.jsx | 16 +++++++++------- web/react/utils/constants.jsx | 1 + web/web.go | 7 ++++++- 3 files changed, 16 insertions(+), 8 deletions(-) (limited to 'web') diff --git a/web/react/components/user_settings/manage_incoming_hooks.jsx b/web/react/components/user_settings/manage_incoming_hooks.jsx index 1bbfbd162..fa2e2e5e4 100644 --- a/web/react/components/user_settings/manage_incoming_hooks.jsx +++ b/web/react/components/user_settings/manage_incoming_hooks.jsx @@ -21,7 +21,7 @@ export default class ManageIncomingHooks extends React.Component { this.getHooks(); } addNewHook() { - let hook = {}; //eslint-disable-line prefer-const + const hook = {}; hook.channel_id = this.state.channelId; Client.addIncomingHook( @@ -40,13 +40,13 @@ export default class ManageIncomingHooks extends React.Component { ); } removeHook(id) { - let data = {}; //eslint-disable-line prefer-const + const data = {}; data.id = id; Client.deleteIncomingHook( data, () => { - let hooks = this.state.hooks; //eslint-disable-line prefer-const + const hooks = this.state.hooks; let index = -1; for (let i = 0; i < hooks.length; i++) { if (hooks[i].id === id) { @@ -69,7 +69,7 @@ export default class ManageIncomingHooks extends React.Component { getHooks() { Client.listIncomingHooks( (data) => { - let state = this.state; //eslint-disable-line prefer-const + const state = this.state; if (data) { state.hooks = data; @@ -93,9 +93,11 @@ export default class ManageIncomingHooks extends React.Component { } const channels = ChannelStore.getAll(); - let options = []; //eslint-disable-line prefer-const + const options = []; channels.forEach((channel) => { - options.push(); + if (channel.type !== Constants.DM_CHANNEL) { + options.push(); + } }); let disableButton = ''; @@ -103,7 +105,7 @@ export default class ManageIncomingHooks extends React.Component { disableButton = ' disable'; } - let hooks = []; //eslint-disable-line prefer-const + const hooks = []; this.state.hooks.forEach((hook) => { const c = ChannelStore.get(hook.channel_id); hooks.push( diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 75e80bc7e..da59f8e5a 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -111,6 +111,7 @@ module.exports = { ], MONTHS: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], MAX_DMS: 20, + DM_CHANNEL: 'D', MAX_POST_LEN: 4000, EMOJI_SIZE: 16, ONLINE_ICON_SVG: "", diff --git a/web/web.go b/web/web.go index da7eff13d..bf985a5a0 100644 --- a/web/web.go +++ b/web/web.go @@ -850,7 +850,12 @@ func incomingWebhook(c *api.Context, w http.ResponseWriter, r *http.Request) { r.ParseForm() - props := model.MapFromJson(strings.NewReader(r.FormValue("payload"))) + var props map[string]string + if r.Header.Get("Content-Type") == "application/json" { + props = model.MapFromJson(r.Body) + } else { + props = model.MapFromJson(strings.NewReader(r.FormValue("payload"))) + } text := props["text"] if len(text) == 0 { -- cgit v1.2.3-1-g7c22 From 3e77df8532a227e4994f9418dc04381d7285d47a Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Tue, 29 Sep 2015 19:23:21 +0500 Subject: plt-479 - Fixing command lists and also making them theme compatible --- web/react/components/command_list.jsx | 4 ++-- web/react/utils/utils.jsx | 12 ++++++++---- web/sass-files/sass/partials/_command-box.scss | 17 +++++++++++++---- 3 files changed, 23 insertions(+), 10 deletions(-) (limited to 'web') diff --git a/web/react/components/command_list.jsx b/web/react/components/command_list.jsx index 553dcabe7..fea7085b7 100644 --- a/web/react/components/command_list.jsx +++ b/web/react/components/command_list.jsx @@ -70,8 +70,8 @@ export default class CommandList extends React.Component { className='command-name' onClick={this.handleClick.bind(this, i)} > -
{this.state.suggestions[i].suggestion}
-
{this.state.suggestions[i].description}
+
{this.state.suggestions[i].suggestion}
+
{this.state.suggestions[i].description}
); } diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index e133ee128..9425f3ea6 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -449,7 +449,7 @@ export function applyTheme(theme) { } if (theme.centerChannelBg) { - changeCss('.app__content, .markdown__table, .markdown__table tbody tr', 'background:' + theme.centerChannelBg, 1); + changeCss('.app__content, .markdown__table, .markdown__table tbody tr, .command-box', 'background:' + theme.centerChannelBg, 1); changeCss('#post-list .post-list-holder-by-time', 'background:' + theme.centerChannelBg, 1); changeCss('#post-create', 'background:' + theme.centerChannelBg, 1); changeCss('.search-bar__container .search__form .search-bar', 'background:' + theme.centerChannelBg, 1); @@ -459,14 +459,18 @@ export function applyTheme(theme) { } if (theme.centerChannelColor) { - changeCss('.app__content, .post-create__container .post-create-body .btn-file, .post-create__container .post-create-footer .msg-typing, .loading-screen .loading__content .round', 'color:' + theme.centerChannelColor, 1); + changeCss('.app__content, .post-create__container .post-create-body .btn-file, .post-create__container .post-create-footer .msg-typing, .loading-screen .loading__content .round, .command-name', 'color:' + theme.centerChannelColor, 1); changeCss('#post-create', 'color:' + theme.centerChannelColor, 2); + changeCss('.mentions--top, .command-box', 'box-shadow:' + changeOpacity(theme.centerChannelColor, 0.2) + ' 1px -3px 12px', 3); + changeCss('.mentions--top, .command-box', '-webkit-box-shadow:' + changeOpacity(theme.centerChannelColor, 0.2) + ' 1px -3px 12px', 2); + changeCss('.mentions--top, .command-box', '-moz-box-shadow:' + changeOpacity(theme.centerChannelColor, 0.2) + ' 1px -3px 12px', 1); changeCss('.post-body hr', 'background:' + theme.centerChannelColor, 1); changeCss('.channel-header .heading', 'color:' + theme.centerChannelColor, 1); changeCss('.markdown__table tbody tr:nth-child(2n)', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); changeCss('.channel-header__info>div.dropdown .header-dropdown__icon', 'color:' + changeOpacity(theme.centerChannelColor, 0.8), 1); changeCss('.channel-header #member_popover', 'color:' + changeOpacity(theme.centerChannelColor, 0.8), 1); - changeCss('.custom-textarea, .custom-textarea:focus, .preview-container .preview-div, .post-image__column .post-image__details, .sidebar--right .sidebar-right__body, .markdown__table th, .markdown__table td', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); + changeCss('.custom-textarea, .custom-textarea:focus, .preview-container .preview-div, .post-image__column .post-image__details, .sidebar--right .sidebar-right__body, .markdown__table th, .markdown__table td, .command-box', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); + changeCss('.command-name', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.custom-textarea', 'color:' + theme.centerChannelColor, 1); changeCss('.post-image__column', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 2); changeCss('.post-image__column .post-image__details', 'color:' + theme.centerChannelColor, 2); @@ -484,7 +488,7 @@ export function applyTheme(theme) { changeCss('@media(max-width: 1800px){.inner__wrap.move--left .post.post--comment.same--root', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2); changeCss('.post:hover, .sidebar--right .sidebar--right__header', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); changeCss('.date-separator.hovered--before:after, .new-separator.hovered--before:after', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); - changeCss('.date-separator.hovered--after:before, .new-separator.hovered--after:before', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); + changeCss('.date-separator.hovered--after:before, .new-separator.hovered--after:before, .command-name:hover', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); changeCss('.post.current--user:hover .post-body ', 'background: none;', 1); changeCss('.sidebar--right', 'color:' + theme.centerChannelColor, 2); } diff --git a/web/sass-files/sass/partials/_command-box.scss b/web/sass-files/sass/partials/_command-box.scss index 44eb9b8df..f1aa4dca2 100644 --- a/web/sass-files/sass/partials/_command-box.scss +++ b/web/sass-files/sass/partials/_command-box.scss @@ -4,20 +4,29 @@ width: 100%; border: $border-gray; bottom: 38px; + overflow: auto; @extend %popover-box-shadow; + .sidebar--right & { + bottom: 100px; + } } .command-name { position: relative; width: 100%; - background-color: #fff; - height: 37px; - line-height: 37px; - padding: 2px 10px 2px 5px; + line-height: 24px; + padding: 5px 10px 8px; z-index: 101; + font-size: 0.95em; + border-bottom: 1px solid #ddd; &:hover { background-color: #e8eaed; } + .command__desc { + margin-left: 5px; + @include opacity(0.5); + line-height: normal; + } } .command-desc { -- cgit v1.2.3-1-g7c22 From 558f8a322feba9fa22509a58a01411225c81b469 Mon Sep 17 00:00:00 2001 From: Reed Garmsen Date: Mon, 28 Sep 2015 16:31:18 -0700 Subject: Removed unused title update code --- web/react/components/more_direct_channels.jsx | 2 +- web/react/components/rename_channel_modal.jsx | 1 - web/react/components/search_results_item.jsx | 7 +------ web/react/utils/utils.jsx | 12 +----------- 4 files changed, 3 insertions(+), 19 deletions(-) (limited to 'web') diff --git a/web/react/components/more_direct_channels.jsx b/web/react/components/more_direct_channels.jsx index b7bce9b34..54d77c358 100644 --- a/web/react/components/more_direct_channels.jsx +++ b/web/react/components/more_direct_channels.jsx @@ -43,7 +43,7 @@ export default class MoreDirectChannels extends React.Component { handleClick = function clickHandler(e) { e.preventDefault(); - utils.switchChannel(channel, channel.teammate_username); + utils.switchChannel(channel); $(React.findDOMNode(self.refs.modal)).modal('hide'); }; } else { diff --git a/web/react/components/rename_channel_modal.jsx b/web/react/components/rename_channel_modal.jsx index 37958b649..9d514c741 100644 --- a/web/react/components/rename_channel_modal.jsx +++ b/web/react/components/rename_channel_modal.jsx @@ -78,7 +78,6 @@ export default class RenameChannelModal extends React.Component { $(React.findDOMNode(this.refs.modal)).modal('hide'); AsyncClient.getChannel(channel.id); - Utils.updateTabTitle(channel.display_name); Utils.updateAddressBar(channel.name); React.findDOMNode(this.refs.displayName).value = ''; diff --git a/web/react/components/search_results_item.jsx b/web/react/components/search_results_item.jsx index 32b521560..bdefdbee8 100644 --- a/web/react/components/search_results_item.jsx +++ b/web/react/components/search_results_item.jsx @@ -47,13 +47,8 @@ export default class SearchResultsItem extends React.Component { ); var postChannel = ChannelStore.get(this.props.post.channel_id); - var teammate = ''; - if (postChannel.type === 'D') { - teammate = utils.getDirectTeammate(this.props.post.channel_id).username; - } - - utils.switchChannel(postChannel, teammate); + utils.switchChannel(postChannel); } render() { diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 61dcae6d8..fec13abe9 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -790,16 +790,12 @@ export function isValidUsername(name) { return error; } -export function updateTabTitle(name) { - document.title = name + ' ' + document.title.substring(document.title.lastIndexOf('-')); -} - export function updateAddressBar(channelName) { var teamURL = window.location.href.split('/channels')[0]; history.replaceState('data', '', teamURL + '/channels/' + channelName); } -export function switchChannel(channel, teammateName) { +export function switchChannel(channel) { AppDispatcher.handleViewAction({ type: ActionTypes.CLICK_CHANNEL, name: channel.name, @@ -808,12 +804,6 @@ export function switchChannel(channel, teammateName) { updateAddressBar(channel.name); - if (channel.type === 'D' && teammateName) { - updateTabTitle(teammateName); - } else { - updateTabTitle(channel.display_name); - } - AsyncClient.getChannels(true, true, true); AsyncClient.getChannelExtraInfo(true); AsyncClient.getPosts(channel.id); -- cgit v1.2.3-1-g7c22 From b1bb2a7a54e55af5e31435254a4154be85805e6b Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 29 Sep 2015 11:19:03 -0700 Subject: PLT-483 adding better help text --- web/react/components/admin_console/gitlab_settings.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web') diff --git a/web/react/components/admin_console/gitlab_settings.jsx b/web/react/components/admin_console/gitlab_settings.jsx index 1e10c5592..a887967ea 100644 --- a/web/react/components/admin_console/gitlab_settings.jsx +++ b/web/react/components/admin_console/gitlab_settings.jsx @@ -202,7 +202,7 @@ export default class GitLabSettings extends React.Component { onChange={this.handleChange} disabled={!this.state.Allow} /> -

{'Enter /oauth/authorize (example http://localhost:3000/oauth/authorize).'}

+

{'Enter /oauth/authorize (example http://localhost:3000/oauth/authorize). Make sure you use HTTP or HTTPS in your URLs as appropriate.'}

@@ -224,7 +224,7 @@ export default class GitLabSettings extends React.Component { onChange={this.handleChange} disabled={!this.state.Allow} /> -

{'Enter /oauth/token.'}

+

{'Enter /oauth/token. Make sure you use HTTP or HTTPS in your URLs as appropriate.'}

@@ -246,7 +246,7 @@ export default class GitLabSettings extends React.Component { onChange={this.handleChange} disabled={!this.state.Allow} /> -

{'Enter /api/v3/user.'}

+

{'Enter /api/v3/user. Make sure you use HTTP or HTTPS in your URLs as appropriate.'}

-- cgit v1.2.3-1-g7c22 From 0e028d04e2d6442ee15e46c08d26686a2c2f7201 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 29 Sep 2015 11:20:16 -0700 Subject: PLT-429 removing scope field. --- .../components/admin_console/gitlab_settings.jsx | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'web') diff --git a/web/react/components/admin_console/gitlab_settings.jsx b/web/react/components/admin_console/gitlab_settings.jsx index a887967ea..a0c024f08 100644 --- a/web/react/components/admin_console/gitlab_settings.jsx +++ b/web/react/components/admin_console/gitlab_settings.jsx @@ -40,7 +40,7 @@ export default class GitLabSettings extends React.Component { config.GitLabSettings.Allow = React.findDOMNode(this.refs.Allow).checked; config.GitLabSettings.Secret = React.findDOMNode(this.refs.Secret).value.trim(); config.GitLabSettings.Id = React.findDOMNode(this.refs.Id).value.trim(); - config.GitLabSettings.Scope = React.findDOMNode(this.refs.Scope).value.trim(); + //config.GitLabSettings.Scope = React.findDOMNode(this.refs.Scope).value.trim(); config.GitLabSettings.AuthEndpoint = React.findDOMNode(this.refs.AuthEndpoint).value.trim(); config.GitLabSettings.TokenEndpoint = React.findDOMNode(this.refs.TokenEndpoint).value.trim(); config.GitLabSettings.UserApiEndpoint = React.findDOMNode(this.refs.UserApiEndpoint).value.trim(); @@ -162,28 +162,6 @@ export default class GitLabSettings extends React.Component { -
- -
- -

{'This field is not yet used by GitLab OAuth. Other OAuth providers may use this field to specify the scope of account data from OAuth provider that is sent to Mattermost.'}

-
-
-
+ GitLabSettings.propTypes = { config: React.PropTypes.object }; -- cgit v1.2.3-1-g7c22 From 80d1acab228b4fb8c16c0f81be8bd6655b30f8ca Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Tue, 29 Sep 2015 11:21:27 -0700 Subject: PLT-472 switching field ordering. --- .../components/admin_console/gitlab_settings.jsx | 27 +++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'web') diff --git a/web/react/components/admin_console/gitlab_settings.jsx b/web/react/components/admin_console/gitlab_settings.jsx index a0c024f08..f57affb90 100644 --- a/web/react/components/admin_console/gitlab_settings.jsx +++ b/web/react/components/admin_console/gitlab_settings.jsx @@ -40,7 +40,6 @@ export default class GitLabSettings extends React.Component { config.GitLabSettings.Allow = React.findDOMNode(this.refs.Allow).checked; config.GitLabSettings.Secret = React.findDOMNode(this.refs.Secret).value.trim(); config.GitLabSettings.Id = React.findDOMNode(this.refs.Id).value.trim(); - //config.GitLabSettings.Scope = React.findDOMNode(this.refs.Scope).value.trim(); config.GitLabSettings.AuthEndpoint = React.findDOMNode(this.refs.AuthEndpoint).value.trim(); config.GitLabSettings.TokenEndpoint = React.findDOMNode(this.refs.TokenEndpoint).value.trim(); config.GitLabSettings.UserApiEndpoint = React.findDOMNode(this.refs.UserApiEndpoint).value.trim(); @@ -121,44 +120,44 @@ export default class GitLabSettings extends React.Component {
-

{'Obtain this value via the instructions above for logging into GitLab.'}

+

{'Obtain this value via the instructions above for logging into GitLab'}

-

{'Obtain this value via the instructions above for logging into GitLab'}

+

{'Obtain this value via the instructions above for logging into GitLab.'}

@@ -250,6 +249,8 @@ export default class GitLabSettings extends React.Component { } } + +//config.GitLabSettings.Scope = React.findDOMNode(this.refs.Scope).value.trim(); //
//
- {'Feedback Email:'} + {'Notification Email Address:'}
Date: Tue, 29 Sep 2015 13:16:55 -0700 Subject: PLT-435 adding system console link to RHS --- web/react/components/navbar_dropdown.jsx | 2 +- web/react/components/sidebar_right_menu.jsx | 15 +++++++++++++++ web/react/utils/utils.jsx | 8 ++++++++ 3 files changed, 24 insertions(+), 1 deletion(-) (limited to 'web') diff --git a/web/react/components/navbar_dropdown.jsx b/web/react/components/navbar_dropdown.jsx index 4c01d2c43..57a78a0d4 100644 --- a/web/react/components/navbar_dropdown.jsx +++ b/web/react/components/navbar_dropdown.jsx @@ -62,7 +62,7 @@ export default class NavbarDropdown extends React.Component { if (currentUser != null) { isAdmin = Utils.isAdmin(currentUser.roles); - isSystemAdmin = Utils.isInRole(currentUser.roles, 'system_admin'); + isSystemAdmin = Utils.isSystemAdmin(currentUser.roles); inviteLink = (
  • diff --git a/web/react/components/sidebar_right_menu.jsx b/web/react/components/sidebar_right_menu.jsx index f1341d9d7..2df2c8ffd 100644 --- a/web/react/components/sidebar_right_menu.jsx +++ b/web/react/components/sidebar_right_menu.jsx @@ -26,11 +26,14 @@ export default class SidebarRightMenu extends React.Component { var inviteLink = ''; var teamSettingsLink = ''; var manageLink = ''; + var consoleLink = ''; var currentUser = UserStore.getCurrentUser(); var isAdmin = false; + var isSystemAdmin = false; if (currentUser != null) { isAdmin = utils.isAdmin(currentUser.roles); + isSystemAdmin = utils.isSystemAdmin(currentUser.roles); inviteLink = (
  • @@ -77,6 +80,17 @@ export default class SidebarRightMenu extends React.Component { ); } + if (isSystemAdmin) { + consoleLink = ( +
  • + + System Console +
  • + ); + } + var siteName = ''; if (global.window.config.SiteName != null) { siteName = global.window.config.SiteName; @@ -107,6 +121,7 @@ export default class SidebarRightMenu extends React.Component { {inviteLink} {teamLink} {manageLink} + {consoleLink}
  • Date: Tue, 29 Sep 2015 14:40:43 -0600 Subject: Update email notification help text MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Current: Email notifications are sent for mentions and direct messages after you have been away from Mattermost for 5 minutes. New: Email notifications are sent for mentions and direct messages after you’ve been offline for more than 60 seconds or away from Mattermost for more than 5 minutes. --- web/react/components/user_settings/user_settings_notifications.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web') diff --git a/web/react/components/user_settings/user_settings_notifications.jsx b/web/react/components/user_settings/user_settings_notifications.jsx index ba14f019f..42c65ef5d 100644 --- a/web/react/components/user_settings/user_settings_notifications.jsx +++ b/web/react/components/user_settings/user_settings_notifications.jsx @@ -420,7 +420,7 @@ export default class NotificationsTab extends React.Component {
  • -

    {'Email notifications are sent for mentions and direct messages after you have been away from ' + global.window.config.SiteName + ' for 5 minutes.'}
    +

    {'Email notifications are sent for mentions and direct messages after you’ve been offline for more than 60 seconds or away from ' + global.window.config.SiteName + ' for more than 5 minutes.'}
    ); -- cgit v1.2.3-1-g7c22 From 95b4d63d3f26f5fa9fea2dfad57cdfd66edaa909 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Wed, 30 Sep 2015 07:54:24 -0400 Subject: Fix RHS scrolling center pane. --- web/react/components/sidebar_right.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'web') diff --git a/web/react/components/sidebar_right.jsx b/web/react/components/sidebar_right.jsx index e63418ae8..708cd04cb 100644 --- a/web/react/components/sidebar_right.jsx +++ b/web/react/components/sidebar_right.jsx @@ -33,7 +33,7 @@ export default class SidebarRight extends React.Component { if (!this.plScrolledToBottom) { $('.top-visible-post')[0].scrollIntoView(); } else { - var postHolder = $('.post-list-holder-by-time'); + var postHolder = $('.post-list-holder-by-time').not('.inactive'); postHolder.scrollTop(postHolder[0].scrollHeight); } } @@ -51,7 +51,7 @@ export default class SidebarRight extends React.Component { } } render() { - var postHolder = $('.post-list-holder-by-time'); + var postHolder = $('.post-list-holder-by-time').not('.inactive'); const position = postHolder.scrollTop() + postHolder.height() + 14; const bottom = postHolder[0].scrollHeight; this.plScrolledToBottom = position >= bottom; -- cgit v1.2.3-1-g7c22