diff options
author | Christopher Speller <crspeller@gmail.com> | 2015-09-29 11:24:52 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2015-09-29 11:24:52 -0400 |
commit | bf61c0336e3fee47e6079c2804596c2079a9e9c5 (patch) | |
tree | 4c137e74b8d2be0772a192aecc764e2fed2e6fac /web | |
parent | d8d850b2f759e4ba54fe56a3ceb1f6e2c8ac2eb6 (diff) | |
parent | 3e77df8532a227e4994f9418dc04381d7285d47a (diff) | |
download | chat-bf61c0336e3fee47e6079c2804596c2079a9e9c5.tar.gz chat-bf61c0336e3fee47e6079c2804596c2079a9e9c5.tar.bz2 chat-bf61c0336e3fee47e6079c2804596c2079a9e9c5.zip |
Merge pull request #851 from asaadmahmoodspin/plt-479
plt-479 - Fixing command lists and also making them theme compatible
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/command_list.jsx | 4 | ||||
-rw-r--r-- | web/react/utils/utils.jsx | 12 | ||||
-rw-r--r-- | web/sass-files/sass/partials/_command-box.scss | 17 |
3 files changed, 23 insertions, 10 deletions
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)} > - <div className='command__title pull-left'><strong>{this.state.suggestions[i].suggestion}</strong></div> - <div className='command__desc pull-right'>{this.state.suggestions[i].description}</div> + <div className='command__title'><strong>{this.state.suggestions[i].suggestion}</strong></div> + <div className='command__desc'>{this.state.suggestions[i].description}</div> </div> ); } 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 { |