From 1626a6de6f16ba0878160b0a7eae9f49b8d34d4f Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Wed, 23 Sep 2015 12:49:28 -0700 Subject: PLT-349 adding team mgt to admin console --- web/react/utils/async_client.jsx | 26 ++++++++++++++++++++++++++ web/react/utils/client.jsx | 29 +++++++++++++++++++++++++++++ web/react/utils/constants.jsx | 4 ++-- 3 files changed, 57 insertions(+), 2 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/async_client.jsx b/web/react/utils/async_client.jsx index ed228f6c4..ab2965000 100644 --- a/web/react/utils/async_client.jsx +++ b/web/react/utils/async_client.jsx @@ -371,6 +371,32 @@ export function getConfig() { ); } +export function getAllTeams() { + if (isCallInProgress('getAllTeams')) { + return; + } + + callTracker.getAllTeams = utils.getTimestamp(); + client.getAllTeams( + (data, textStatus, xhr) => { + callTracker.getAllTeams = 0; + + if (xhr.status === 304 || !data) { + return; + } + + AppDispatcher.handleServerAction({ + type: ActionTypes.RECIEVED_ALL_TEAMS, + teams: data + }); + }, + (err) => { + callTracker.getAllTeams = 0; + dispatchError(err, 'getAllTeams'); + } + ); +} + export function findTeams(email) { if (isCallInProgress('findTeams_' + email)) { return; diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index a19f58e61..63924bff2 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -347,6 +347,20 @@ export function testEmail(config, success, error) { }); } +export function getAllTeams(success, error) { + $.ajax({ + url: '/api/v1/teams/all', + dataType: 'json', + contentType: 'application/json', + type: 'GET', + success, + error: function onError(xhr, status, err) { + var e = handleError('getAllTeams', xhr, status, err); + error(e); + } + }); +} + export function getMeSynchronous(success, error) { var currentUser = null; $.ajax({ @@ -890,6 +904,21 @@ export function getProfiles(success, error) { }); } +export function getProfilesForTeam(teamId, success, error) { + $.ajax({ + cache: false, + url: '/api/v1/users/profiles/' + teamId, + dataType: 'json', + contentType: 'application/json', + type: 'GET', + success, + error: function onError(xhr, status, err) { + var e = handleError('getProfilesForTeam', xhr, status, err); + error(e); + } + }); +} + export function uploadFile(formData, success, error) { var request = $.ajax({ url: '/api/v1/files/upload', diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 03e4635b5..d17dfbe30 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -35,8 +35,8 @@ module.exports = { RECIEVED_TEAM: null, RECIEVED_CONFIG: null, - - RECIEVED_LOGS: null + RECIEVED_LOGS: null, + RECIEVED_ALL_TEAMS: null }), PayloadSources: keyMirror({ -- cgit v1.2.3-1-g7c22 From 511fcce55345adb2a6b05cf058fd4d238abcc521 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Wed, 23 Sep 2015 17:42:57 -0400 Subject: Restricted markdown output to only appear on one line when in singleline mode --- web/react/utils/markdown.jsx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'web/react/utils') diff --git a/web/react/utils/markdown.jsx b/web/react/utils/markdown.jsx index 347024e1a..8b511cd07 100644 --- a/web/react/utils/markdown.jsx +++ b/web/react/utils/markdown.jsx @@ -15,6 +15,14 @@ export class MattermostMarkdownRenderer extends marked.Renderer { this.formattingOptions = formattingOptions; } + br() { + if (this.formattingOptions.singleline) { + return ' '; + } + + return super.br(); + } + heading(text, level, raw) { const id = `${this.options.headerPrefix}${raw.toLowerCase().replace(/[^\w]+/g, '-')}`; return `${text}`; @@ -36,6 +44,14 @@ export class MattermostMarkdownRenderer extends marked.Renderer { return output; } + paragraph(text) { + if (this.formattingOptions.singleline) { + return `

${text}

`; + } + + return super.paragraph(text); + } + table(header, body) { return `${header}${body}
`; } -- cgit v1.2.3-1-g7c22 From 5183103e8f62187034b95d5c99cc2b7c0b29e947 Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Thu, 24 Sep 2015 18:55:53 +0500 Subject: plt-363 - Adding organisation theme --- web/react/utils/constants.jsx | 34 +++++++++++++++++----------------- web/react/utils/utils.jsx | 14 ++++++++++---- 2 files changed, 27 insertions(+), 21 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index f58816862..90af9beda 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -134,24 +134,24 @@ module.exports = { buttonBg: '#2389d7', buttonColor: '#FFFFFF' }, - slack: { - type: 'Slack', - sidebarBg: '#4D394B', - sidebarText: '#ab9ba9', - sidebarUnreadText: '#FFFFFF', - sidebarTextHoverBg: '#3e313c', - sidebarTextHoverColor: '#ab9ba9', - sidebarTextActiveBg: '#4c9689', + organization: { + type: 'Organization', + sidebarBg: '#2071a7', + sidebarText: '#bfcde8', + sidebarUnreadText: '#fff', + sidebarTextHoverBg: '#136197', + sidebarTextHoverColor: '#bfcde8', + sidebarTextActiveBg: '#136197', sidebarTextActiveColor: '#FFFFFF', - sidebarHeaderBg: '#4D394B', + sidebarHeaderBg: '#2f81b7', sidebarHeaderTextColor: '#FFFFFF', - onlineIndicator: '#4c9689', - mentionBj: '#eb4d5c', - mentionColor: '#FFFFFF', - centerChannelBg: '#FFFFFF', + onlineIndicator: '#7DBE00', + mentionBj: '#136197', + mentionColor: '#bfcde8', + centerChannelBg: '#f2f4f8', centerChannelColor: '#333333', - linkColor: '#2389d7', - buttonBg: '#26a970', + linkColor: '#2f81b7', + buttonBg: '#1dacfc', buttonColor: '#FFFFFF' }, dark: { @@ -165,13 +165,13 @@ module.exports = { sidebarTextActiveColor: '#FFFFFF', sidebarHeaderBg: '#1B2C3E', sidebarHeaderTextColor: '#FFFFFF', - onlineIndicator: '#4c9689', + onlineIndicator: '#55C5B2', mentionBj: '#B74A4A', mentionColor: '#FFFFFF', centerChannelBg: '#2F3E4E', centerChannelColor: '#DDDDDD', linkColor: '#A4FFEB', - buttonBg: '#2B9C99', + buttonBg: '#1dacfc', buttonColor: '#FFFFFF' } }, diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 82bb82d6b..50438c6cf 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -553,7 +553,6 @@ export function applyTheme(theme) { changeCss('.sidebar--left .nav li>h4, .sidebar--left .add-channel-btn', 'color:' + changeOpacity(theme.sidebarText, 0.8), 1); changeCss('.sidebar--left .add-channel-btn:hover, .sidebar--left .add-channel-btn:focus', 'color:' + theme.sidebarText, 1); changeCss('.sidebar--left, .sidebar--right .sidebar--right__header', 'border-color:' + changeOpacity(theme.sidebarText, 0.2), 1); - changeCss('.sidebar--right .sidebar-right__body', 'border-color:' + changeOpacity(theme.sidebarText, 0.2), 2); changeCss('.sidebar--left .status path', 'fill:' + changeOpacity(theme.sidebarText, 0.5), 1); } @@ -607,11 +606,12 @@ export function applyTheme(theme) { } if (theme.centerChannelBg) { - changeCss('.app__content', 'background:' + theme.centerChannelBg, 1); + changeCss('.app__content, .markdown__table, .markdown__table tbody tr', '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); changeCss('.date-separator .separator__text, .new-separator .separator__text', 'background:' + theme.centerChannelBg, 1); + changeCss('.post-image__column .post-image__details', 'background:' + theme.centerChannelBg, 1); changeCss('.sidebar--right', 'background:' + theme.centerChannelBg, 1); } @@ -619,9 +619,14 @@ export function applyTheme(theme) { changeCss('.app__content', 'color:' + theme.centerChannelColor, 2); changeCss('#post-create', 'color:' + theme.centerChannelColor, 2); 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', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2) + '!important; color: ' + theme.centerChannelColor, 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', '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); + changeCss('.post-image__column a, .post-image__column a:hover, .post-image__column a:focus', 'color:' + theme.centerChannelColor, 1); changeCss('.search-bar__container .search__form .search-bar', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2) + '; color: ' + theme.centerChannelColor, 2); changeCss('.search-bar__container .search__form', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.channel-intro .channel-intro__content', 'background:' + changeOpacity(theme.centerChannelColor, 0.05), 1); @@ -629,7 +634,8 @@ export function applyTheme(theme) { changeCss('.date-separator .separator__hr, .new-separator .separator__hr, .post-right__container .post.post--root hr, .search-item-container', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.channel-intro', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); - changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2); + changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment, .post.post--comment.other--root .post-comment, .post.same--root .post-body', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2); + changeCss('@media(max-width: 1440px){.post.same--root', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2); changeCss('@media(max-width: 1440px){.post.same--root', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2); 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); -- cgit v1.2.3-1-g7c22 From a374419ad5c5f35174ee6285b4eaa57ef82235bd Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 24 Sep 2015 10:52:32 -0700 Subject: Removing old valet crud --- web/react/utils/client.jsx | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index 63924bff2..4effa7307 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -1042,23 +1042,6 @@ export function getMyTeam(success, error) { }); } -export function updateValetFeature(data, success, error) { - $.ajax({ - url: '/api/v1/teams/update_valet_feature', - dataType: 'json', - contentType: 'application/json', - type: 'POST', - data: JSON.stringify(data), - success, - error: function onError(xhr, status, err) { - var e = handleError('updateValetFeature', xhr, status, err); - error(e); - } - }); - - track('api', 'api_teams_update_valet_feature'); -} - export function registerOAuthApp(app, success, error) { $.ajax({ url: '/api/v1/oauth/register', -- cgit v1.2.3-1-g7c22 From fe55c77a41b8a82a68f19f2acb77198eec4f8ca4 Mon Sep 17 00:00:00 2001 From: hmhealey Date: Thu, 24 Sep 2015 13:54:48 -0400 Subject: Removed smilies that start with a semicolon --- web/react/utils/emoticons.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/emoticons.jsx b/web/react/utils/emoticons.jsx index 7210201ff..a7c837199 100644 --- a/web/react/utils/emoticons.jsx +++ b/web/react/utils/emoticons.jsx @@ -5,15 +5,14 @@ const emoticonPatterns = { smile: /:-?\)/g, // :) open_mouth: /:o/gi, // :o scream: /:-o/gi, // :-o - smirk: /[:;]-?]/g, // :] - grinning: /[:;]-?d/gi, // :D + smirk: /:-?]/g, // :] + grinning: /:-?d/gi, // :D stuck_out_tongue_closed_eyes: /x-d/gi, // x-d - stuck_out_tongue_winking_eye: /[:;]-?p/gi, // ;p + stuck_out_tongue_winking_eye: /:-?p/gi, // :p rage: /:-?[\[@]/g, // :@ frowning: /:-?\(/g, // :( sob: /:['’]-?\(|:'\(/g, // :`( kissing_heart: /:-?\*/g, // :* - wink: /;-?\)/g, // ;) pensive: /:-?\//g, // :/ confounded: /:-?s/gi, // :s flushed: /:-?\|/g, // :| -- cgit v1.2.3-1-g7c22 From 04c12ba58e21297ebe08d0c1e489d5da81cba19e Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Thu, 24 Sep 2015 15:06:54 -0700 Subject: Fixing blue bar and renders warning when mis-configured. --- web/react/utils/client.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/react/utils') diff --git a/web/react/utils/client.jsx b/web/react/utils/client.jsx index 4effa7307..715e26197 100644 --- a/web/react/utils/client.jsx +++ b/web/react/utils/client.jsx @@ -27,7 +27,7 @@ function handleError(methodName, xhr, status, err) { msg = 'error in ' + methodName + ' status=' + status + ' statusCode=' + xhr.status + ' err=' + err; if (xhr.status === 0) { - e = {message: 'There appears to be a problem with your internet connection'}; + e = {message: 'There appears to be a problem with your internet connection', connErrorCount: 1}; } else { e = {message: 'We received an unexpected status code from the server (' + xhr.status + ')'}; } -- cgit v1.2.3-1-g7c22 From b1a7225f30e8443f87830a578c306b8f93e6587f Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Fri, 25 Sep 2015 16:38:11 +0500 Subject: Bug fixes and UI improvements for multiple tickets --- web/react/utils/utils.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/react/utils') diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 50438c6cf..fba57e8e6 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -616,8 +616,9 @@ export function applyTheme(theme) { } if (theme.centerChannelColor) { - changeCss('.app__content', 'color:' + theme.centerChannelColor, 2); + changeCss('.app__content, .post-create__container .post-create-body .btn-file', 'color:' + theme.centerChannelColor, 1); changeCss('#post-create', 'color:' + theme.centerChannelColor, 2); + 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); -- cgit v1.2.3-1-g7c22 From b86833f0c589e2aef866ea095c1bac7fa8b9a0c3 Mon Sep 17 00:00:00 2001 From: mishimi Date: Fri, 25 Sep 2015 05:23:04 -0700 Subject: PLT 381 In Theme Color settings, change the "Button Color" to "Button Text" Also made the following changes 1. Capitalize all words 2. Remove the word "color" if it comes after "text" Ex. Sidebar text color --> Sidebar Text --- web/react/utils/constants.jsx | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 90af9beda..8c9e1ee85 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -182,7 +182,7 @@ module.exports = { }, { id: 'sidebarText', - uiName: 'Sidebar text color' + uiName: 'Sidebar Text' }, { id: 'sidebarHeaderBg', @@ -190,51 +190,51 @@ module.exports = { }, { id: 'sidebarHeaderTextColor', - uiName: 'Sidebar Header text color' + uiName: 'Sidebar Header Text' }, { id: 'sidebarUnreadText', - uiName: 'Sidebar unread text color' + uiName: 'Sidebar Unread Text' }, { id: 'sidebarTextHoverBg', - uiName: 'Sidebar text hover BG' + uiName: 'Sidebar Text Hover BG' }, { id: 'sidebarTextHoverColor', - uiName: 'Sidebar text hover color' + uiName: 'Sidebar Text Hover Color' }, { id: 'sidebarTextActiveBg', - uiName: 'Sidebar text active BG' + uiName: 'Sidebar Text Active BG' }, { id: 'sidebarTextActiveColor', - uiName: 'Sidebar text active color' + uiName: 'Sidebar Text Active Color' }, { id: 'onlineIndicator', - uiName: 'Online indicator' + uiName: 'Online Indicator' }, { id: 'mentionBj', - uiName: 'Mention jewel BG' + uiName: 'Mention Jewel BG' }, { id: 'mentionColor', - uiName: 'Mention jewel text color' + uiName: 'Mention Jewel Text' }, { id: 'centerChannelBg', - uiName: 'Center channel BG' + uiName: 'Center Channel BG' }, { id: 'centerChannelColor', - uiName: 'Center channel text color' + uiName: 'Center Channel Text' }, { id: 'linkColor', - uiName: 'Link color' + uiName: 'Link Color' }, { id: 'buttonBg', @@ -243,7 +243,7 @@ module.exports = { { id: 'buttonColor', - uiName: 'Button Color' + uiName: 'Button Text' } ] }; -- cgit v1.2.3-1-g7c22 From a45095c0b6de02779e9beab655ab9cbd65fe4295 Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Fri, 25 Sep 2015 09:03:07 -0400 Subject: Fixes youtube videos causing random scrolling. --- web/react/utils/utils.jsx | 1 - 1 file changed, 1 deletion(-) (limited to 'web/react/utils') diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 50438c6cf..6688436de 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -314,7 +314,6 @@ function getYoutubeEmbed(link) { $('.video-type.' + youtubeId).html('Youtube - '); $('.video-uploader.' + youtubeId).html(metadata.channelTitle); $('.video-title.' + youtubeId).find('a').html(metadata.title); - $('.post-list-holder-by-time').scrollTop($('.post-list-holder-by-time')[0].scrollHeight); } if (global.window.config.GoogleDeveloperKey) { -- cgit v1.2.3-1-g7c22 From ad346f8734f5419067c4988f118281955516a356 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Fri, 25 Sep 2015 09:16:26 -0700 Subject: fixing more redirect places --- web/react/utils/utils.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'web/react/utils') diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index 6688436de..4b1b37397 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -4,6 +4,7 @@ var AppDispatcher = require('../dispatcher/app_dispatcher.jsx'); var ChannelStore = require('../stores/channel_store.jsx'); var UserStore = require('../stores/user_store.jsx'); +var TeamStore = require('../stores/team_store.jsx'); var Constants = require('../utils/constants.jsx'); var ActionTypes = Constants.ActionTypes; var AsyncClient = require('./async_client.jsx'); @@ -113,7 +114,7 @@ export function notifyMe(title, body, channel) { if (channel) { switchChannel(channel); } else { - window.location.href = '/'; + window.location.href = TeamStore.getCurrentTeamUrl() + '/channels/town-square'; } }; setTimeout(function closeNotificationOnTimeout() { -- cgit v1.2.3-1-g7c22 From a20c63ff35f6407d232f7e1d7dcbd3caeb74492e Mon Sep 17 00:00:00 2001 From: JoramWilander Date: Fri, 25 Sep 2015 12:55:27 -0400 Subject: Force videos to be set dimensions. --- web/react/utils/constants.jsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'web/react/utils') diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 8c9e1ee85..40d52c165 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -72,6 +72,10 @@ module.exports = { MAX_FILE_SIZE: 50000000, // 50 MB THUMBNAIL_WIDTH: 128, THUMBNAIL_HEIGHT: 100, + WEB_VIDEO_WIDTH: 640, + WEB_VIDEO_HEIGHT: 480, + MOBILE_VIDEO_WIDTH: 480, + MOBILE_VIDEO_HEIGHT: 360, DEFAULT_CHANNEL: 'town-square', OFFTOPIC_CHANNEL: 'off-topic', GITLAB_SERVICE: 'gitlab', -- cgit v1.2.3-1-g7c22 From 9d1dddb7f4cd6ee9682bb48d88f5f0271a72dcba Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Fri, 25 Sep 2015 22:44:36 +0500 Subject: plt-366 - Adding Windows 8 theme --- web/react/utils/constants.jsx | 32 ++++++++++++++++++++++++++++++-- web/react/utils/utils.jsx | 11 ++++++++--- 2 files changed, 38 insertions(+), 5 deletions(-) (limited to 'web/react/utils') diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 8c9e1ee85..0650fb92b 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -130,6 +130,7 @@ module.exports = { mentionColor: '#ffffff', centerChannelBg: '#ffffff', centerChannelColor: '#333333', + newMessageSeparator: '#FF8800', linkColor: '#2389d7', buttonBg: '#2389d7', buttonColor: '#FFFFFF' @@ -150,12 +151,13 @@ module.exports = { mentionColor: '#bfcde8', centerChannelBg: '#f2f4f8', centerChannelColor: '#333333', + newMessageSeparator: '#FF8800', linkColor: '#2f81b7', buttonBg: '#1dacfc', buttonColor: '#FFFFFF' }, - dark: { - type: 'Dark', + mattermostDark: { + type: 'Mattermost Dark', sidebarBg: '#1B2C3E', sidebarText: '#bbbbbb', sidebarUnreadText: '#fff', @@ -170,9 +172,31 @@ module.exports = { mentionColor: '#FFFFFF', centerChannelBg: '#2F3E4E', centerChannelColor: '#DDDDDD', + newMessageSeparator: '#5de5da', linkColor: '#A4FFEB', buttonBg: '#1dacfc', buttonColor: '#FFFFFF' + }, + windows10: { + type: 'Windows 10 Dark', + sidebarBg: '#171717', + sidebarText: '#eee', + sidebarUnreadText: '#fff', + sidebarTextHoverBg: '#302e30', + sidebarTextHoverColor: '#fff', + sidebarTextActiveBg: '#484748', + sidebarTextActiveColor: '#FFFFFF', + sidebarHeaderBg: '#1f1f1f', + sidebarHeaderTextColor: '#FFFFFF', + onlineIndicator: '#0177e7', + mentionBj: '#0177e7', + mentionColor: '#FFFFFF', + centerChannelBg: '#1F1F1F', + centerChannelColor: '#DDDDDD', + newMessageSeparator: '#CC992D', + linkColor: '#0177e7', + buttonBg: '#0177e7', + buttonColor: '#FFFFFF' } }, THEME_ELEMENTS: [ @@ -232,6 +256,10 @@ module.exports = { id: 'centerChannelColor', uiName: 'Center Channel Text' }, + { + id: 'newMessageSeparator', + uiName: 'New message separator' + }, { id: 'linkColor', uiName: 'Link Color' diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx index d45240f9a..280370c33 100644 --- a/web/react/utils/utils.jsx +++ b/web/react/utils/utils.jsx @@ -615,7 +615,7 @@ export function applyTheme(theme) { } if (theme.centerChannelColor) { - changeCss('.app__content, .post-create__container .post-create-body .btn-file', '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', 'color:' + theme.centerChannelColor, 1); changeCss('#post-create', 'color:' + theme.centerChannelColor, 2); changeCss('.post-body hr', 'background:' + theme.centerChannelColor, 1); changeCss('.channel-header .heading', 'color:' + theme.centerChannelColor, 1); @@ -630,8 +630,8 @@ export function applyTheme(theme) { changeCss('.search-bar__container .search__form .search-bar', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2) + '; color: ' + theme.centerChannelColor, 2); changeCss('.search-bar__container .search__form', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.channel-intro .channel-intro__content', 'background:' + changeOpacity(theme.centerChannelColor, 0.05), 1); - changeCss('.date-separator .separator__text, .new-separator .separator__text', 'color:' + theme.centerChannelColor, 2); - changeCss('.date-separator .separator__hr, .new-separator .separator__hr, .post-right__container .post.post--root hr, .search-item-container', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); + changeCss('.date-separator .separator__text', 'color:' + theme.centerChannelColor, 2); + changeCss('.date-separator .separator__hr, .post-right__container .post.post--root hr, .search-item-container', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.channel-intro', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment', 'background:' + changeOpacity(theme.centerChannelColor, 0.07), 1); changeCss('.post.current--user .post-body, .post.post--comment.other--root.current--user .post-comment, .post.post--comment.other--root .post-comment, .post.same--root .post-body', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07), 2); @@ -645,6 +645,11 @@ export function applyTheme(theme) { changeCss('.sidebar--right', 'color:' + theme.centerChannelColor, 2); } + if (theme.newMessageSeparator) { + changeCss('.new-separator .separator__text', 'color:' + theme.newMessageSeparator, 1); + changeCss('.new-separator .separator__hr', 'border-color:' + changeOpacity(theme.newMessageSeparator, 0.5), 1); + } + if (theme.linkColor) { changeCss('a, a:focus, a:hover', 'color:' + theme.linkColor, 1); changeCss('.post .comment-icon__container', 'fill:' + theme.linkColor, 1); -- cgit v1.2.3-1-g7c22 From 93255ab44bb784990e1304d89591a32561696206 Mon Sep 17 00:00:00 2001 From: it33 Date: Fri, 25 Sep 2015 23:15:58 -0700 Subject: Renaming "Windows 10 Dark" to "Windows Dark" --- web/react/utils/constants.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/react/utils') diff --git a/web/react/utils/constants.jsx b/web/react/utils/constants.jsx index 7497d8450..75e80bc7e 100644 --- a/web/react/utils/constants.jsx +++ b/web/react/utils/constants.jsx @@ -182,7 +182,7 @@ module.exports = { buttonColor: '#FFFFFF' }, windows10: { - type: 'Windows 10 Dark', + type: 'Windows Dark', sidebarBg: '#171717', sidebarText: '#eee', sidebarUnreadText: '#fff', -- cgit v1.2.3-1-g7c22