summaryrefslogtreecommitdiffstats
path: root/webapp/utils/utils.jsx
diff options
context:
space:
mode:
Diffstat (limited to 'webapp/utils/utils.jsx')
-rw-r--r--webapp/utils/utils.jsx17
1 files changed, 9 insertions, 8 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index c860987af..b3370e88c 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -32,7 +32,7 @@ export function isMac() {
}
export function cmdOrCtrlPressed(e) {
- return (isMac() && e.metaKey) || (!isMac() && e.ctrlKey);
+ return (isMac() && e.metaKey) || (!isMac() && e.ctrlKey && !e.altKey);
}
export function isInRole(roles, inRole) {
@@ -179,7 +179,7 @@ export function displayTime(ticks, utc) {
ampm = ' PM';
}
- hours = hours % 12;
+ hours %= 12;
if (!hours) {
hours = '12';
}
@@ -591,6 +591,7 @@ export function applyTheme(theme) {
changeCss('.app__body .markdown__table tbody tr:nth-child(2n)', 'background:' + changeOpacity(theme.centerChannelColor, 0.07));
changeCss('.app__body .channel-header__info>div.dropdown .header-dropdown__icon', 'color:' + changeOpacity(theme.centerChannelColor, 0.8));
changeCss('.app__body .channel-header #member_popover', 'color:' + changeOpacity(theme.centerChannelColor, 0.8));
+ changeCss('.app__body .channel-header #pinned-posts-button', 'fill:' + changeOpacity(theme.centerChannelColor, 0.8));
changeCss('.app__body .custom-textarea, .app__body .custom-textarea:focus, .app__body .file-preview, .app__body .post-image__details, .app__body .sidebar--right .sidebar-right__body, .app__body .markdown__table th, .app__body .markdown__table td, .app__body .suggestion-list__content, .app__body .modal .modal-content, .app__body .modal .settings-modal .settings-table .settings-content .divider-light, .app__body .webhooks__container, .app__body .dropdown-menu, .app__body .modal .modal-header, .app__body .popover', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2));
changeCss('.app__body .popover.bottom>.arrow', 'border-bottom-color:' + changeOpacity(theme.centerChannelColor, 0.25));
changeCss('.app__body .search-help-popover .search-autocomplete__divider span, .app__body .suggestion-list__divider > span', 'color:' + changeOpacity(theme.centerChannelColor, 0.7));
@@ -659,12 +660,12 @@ export function applyTheme(theme) {
}
if (theme.buttonBg) {
- changeCss('.app__body .btn.btn-primary, .app__body .tutorial__circles .circle.active', 'background:' + theme.buttonBg);
+ changeCss('.app__body .btn.btn-primary, .app__body .tutorial__circles .circle.active, .app__body .post__pinned-badge', 'background:' + theme.buttonBg);
changeCss('.app__body .btn.btn-primary:hover, .app__body .btn.btn-primary:active, .app__body .btn.btn-primary:focus', 'background:' + changeColor(theme.buttonBg, -0.25));
}
if (theme.buttonColor) {
- changeCss('.app__body .btn.btn-primary', 'color:' + theme.buttonColor);
+ changeCss('.app__body .btn.btn-primary, .app__body .post__pinned-badge', 'color:' + theme.buttonColor);
}
if (theme.mentionHighlightBg) {
@@ -1216,7 +1217,7 @@ export function isValidPassword(password) {
error = true;
}
- errorId = errorId + 'Lowercase';
+ errorId += 'Lowercase';
}
if (global.window.mm_config.PasswordRequireUppercase === 'true') {
@@ -1224,7 +1225,7 @@ export function isValidPassword(password) {
error = true;
}
- errorId = errorId + 'Uppercase';
+ errorId += 'Uppercase';
}
if (global.window.mm_config.PasswordRequireNumber === 'true') {
@@ -1232,7 +1233,7 @@ export function isValidPassword(password) {
error = true;
}
- errorId = errorId + 'Number';
+ errorId += 'Number';
}
if (global.window.mm_config.PasswordRequireSymbol === 'true') {
@@ -1240,7 +1241,7 @@ export function isValidPassword(password) {
error = true;
}
- errorId = errorId + 'Symbol';
+ errorId += 'Symbol';
}
minimumLength = global.window.mm_config.PasswordMinimumLength;