summaryrefslogtreecommitdiffstats
path: root/webapp/utils
diff options
context:
space:
mode:
authorSaturnino Abril <saturnino.abril@gmail.com>2017-08-03 14:29:31 +0800
committerGitHub <noreply@github.com>2017-08-03 14:29:31 +0800
commitf3934bc7e1e8ef555e1c2e1fe0ece3dbd88ea687 (patch)
tree8555be93795821a35dfe64ec6c8e749d235bbd4d /webapp/utils
parent345bb2236f1f34c2b1ddfec0024ea47c4b1b8950 (diff)
downloadchat-f3934bc7e1e8ef555e1c2e1fe0ece3dbd88ea687.tar.gz
chat-f3934bc7e1e8ef555e1c2e1fe0ece3dbd88ea687.tar.bz2
chat-f3934bc7e1e8ef555e1c2e1fe0ece3dbd88ea687.zip
[PLT-1249] Add close button 'x' to the right of a link preview (#7017)
* add close button 'x' to the right of a link preview * Updating webhook UI * UI improvements for close button * Adding hover state * Making the close button visible on mobile * previews are permanently disabled/closed for that link * make post as required props * fix JS error of undefined * fix update issue both at center and RHS view
Diffstat (limited to 'webapp/utils')
-rw-r--r--webapp/utils/constants.jsx3
-rw-r--r--webapp/utils/utils.jsx2
2 files changed, 4 insertions, 1 deletions
diff --git a/webapp/utils/constants.jsx b/webapp/utils/constants.jsx
index a36a518d8..e9246fdaf 100644
--- a/webapp/utils/constants.jsx
+++ b/webapp/utils/constants.jsx
@@ -270,7 +270,8 @@ export const PostTypes = {
DISPLAYNAME_CHANGE: 'system_displayname_change',
PURPOSE_CHANGE: 'system_purpose_change',
CHANNEL_DELETED: 'system_channel_deleted',
- EPHEMERAL: 'system_ephemeral'
+ EPHEMERAL: 'system_ephemeral',
+ REMOVE_LINK_PREVIEW: 'remove_link_preview'
};
export const StatTypes = keyMirror({
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx
index 94a2cf286..94f6ca91f 100644
--- a/webapp/utils/utils.jsx
+++ b/webapp/utils/utils.jsx
@@ -653,6 +653,8 @@ export function applyTheme(theme) {
changeCss('.app__body .post.post--comment.other--root.current--user .post-comment, .app__body .more-modal__list .more-modal__row, .app__body .member-div:first-child, .app__body .member-div, .app__body .access-history__table .access__report, .app__body .activity-log__table', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.1));
changeCss('@media(max-width: 1800px){.app__body .inner-wrap.move--left .post.post--comment.same--root', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.07));
changeCss('.app__body .post.post--hovered', 'background:' + changeOpacity(theme.centerChannelColor, 0.08));
+ changeCss('.app__body .attachment__body__wrap.btn-close', 'background:' + changeOpacity(theme.centerChannelColor, 0.08));
+ changeCss('.app__body .attachment__body__wrap.btn-close', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2));
changeCss('@media(min-width: 768px){.app__body .post:hover, .app__body .more-modal__list .more-modal__row:hover, .app__body .modal .settings-modal .settings-table .settings-content .section-min:hover', 'background:' + changeOpacity(theme.centerChannelColor, 0.08));
changeCss('.app__body .more-modal__row.more-modal__row--selected, .app__body .date-separator.hovered--before:after, .app__body .date-separator.hovered--after:before, .app__body .new-separator.hovered--after:before, .app__body .new-separator.hovered--before:after', 'background:' + changeOpacity(theme.centerChannelColor, 0.07));
changeCss('@media(min-width: 768px){.app__body .suggestion-list__content .command:hover, .app__body .mentions__name:hover, .app__body .dropdown-menu>li>a:focus, .app__body .dropdown-menu>li>a:hover', 'background:' + changeOpacity(theme.centerChannelColor, 0.15));