Merge pull request #1016 from asaadmahmoodspin/ui-improvements

Multiple UI Improvements
Этот коммит содержится в:
Corey Hulen
2015-10-12 11:29:46 -07:00
родитель 2d4d25051e 0c5835e350
Коммит 246d934e5e
9 изменённых файлов: 18 добавлений и 20 удалений

Просмотреть файл

@@ -104,12 +104,6 @@ export default class ChannelLoader extends React.Component {
} }
}); });
/* Setup modal events */
$('.modal').on('show.bs.modal', function onShow() {
$('.modal-body').css('overflow-y', 'auto');
$('.modal-body').css('max-height', $(window).height() * 0.7);
});
/* Prevent backspace from navigating back a page */ /* Prevent backspace from navigating back a page */
$(window).on('keydown.preventBackspace', (e) => { $(window).on('keydown.preventBackspace', (e) => {
if (e.which === 8 && !$(e.target).is('input, textarea')) { if (e.which === 8 && !$(e.target).is('input, textarea')) {

Просмотреть файл

@@ -10,7 +10,7 @@ export default class SettingsSidebar extends React.Component {
handleClick(tab, e) { handleClick(tab, e) {
e.preventDefault(); e.preventDefault();
this.props.updateTab(tab.name); this.props.updateTab(tab.name);
$('.settings-modal').addClass('display--content'); $(e.target).closest('.settings-modal').addClass('display--content');
} }
render() { render() {
let tabList = this.props.tabs.map(function makeTab(tab) { let tabList = this.props.tabs.map(function makeTab(tab) {

Просмотреть файл

@@ -195,6 +195,7 @@ export default class ViewImageModal extends React.Component {
target='_blank' target='_blank'
> >
<img <img
style={{maxHeight: this.state.imgHeight}}
ref='image' ref='image'
src={this.getPreviewImagePath(filename)} src={this.getPreviewImagePath(filename)}
/> />
@@ -210,6 +211,7 @@ export default class ViewImageModal extends React.Component {
content = ( content = (
<video <video
style={{maxHeight: this.state.imgHeight}}
ref='video' ref='video'
data-setup='{}' data-setup='{}'
controls='controls' controls='controls'
@@ -334,7 +336,6 @@ export default class ViewImageModal extends React.Component {
> >
<div <div
className={'image-wrapper ' + bgClass} className={'image-wrapper ' + bgClass}
style={{maxHeight: this.state.imgHeight}}
onMouseEnter={this.onMouseEnterImage} onMouseEnter={this.onMouseEnterImage}
onMouseLeave={this.onMouseLeaveImage} onMouseLeave={this.onMouseLeaveImage}
onClick={(e) => e.stopPropagation()} onClick={(e) => e.stopPropagation()}

Просмотреть файл

@@ -201,7 +201,7 @@ module.exports = {
centerChannelBg: '#1F1F1F', centerChannelBg: '#1F1F1F',
centerChannelColor: '#DDDDDD', centerChannelColor: '#DDDDDD',
newMessageSeparator: '#CC992D', newMessageSeparator: '#CC992D',
linkColor: '#0177e7', linkColor: '#0D93FF',
buttonBg: '#0177e7', buttonBg: '#0177e7',
buttonColor: '#FFFFFF', buttonColor: '#FFFFFF',
mentionHighlightBg: '#784098', mentionHighlightBg: '#784098',

Просмотреть файл

@@ -423,7 +423,10 @@ export function applyTheme(theme) {
if (theme.sidebarTextActiveColor) { if (theme.sidebarTextActiveColor) {
changeCss('.sidebar--left .nav-pills__container li.active a, .sidebar--left .nav-pills__container li.active a:hover, .sidebar--left .nav-pills__container li.active a:focus, .settings-modal .nav-pills>li.active a, .settings-modal .nav-pills>li.active a:hover, .settings-modal .nav-pills>li.active a:active', 'color:' + theme.sidebarTextActiveColor, 2); changeCss('.sidebar--left .nav-pills__container li.active a, .sidebar--left .nav-pills__container li.active a:hover, .sidebar--left .nav-pills__container li.active a:focus, .settings-modal .nav-pills>li.active a, .settings-modal .nav-pills>li.active a:hover, .settings-modal .nav-pills>li.active a:active', 'color:' + theme.sidebarTextActiveColor, 2);
changeCss('.sidebar--left .nav-pills__container li.active a .status .online--icon', 'fill:' + theme.sidebarTextActiveColor, 2); }
if (theme.sidebarTextActiveBg === theme.onlineIndicator) {
changeCss('.sidebar--left .nav-pills__container li.active a .status .online--icon', 'fill:' + theme.sidebarTextActiveColor, 1);
} }
if (theme.sidebarHeaderBg) { if (theme.sidebarHeaderBg) {
@@ -497,7 +500,7 @@ export function applyTheme(theme) {
changeCss('.date-separator .separator__hr, .modal-footer, .modal .custom-textarea, .post-right__container .post.post--root hr, .search-item-container', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.date-separator .separator__hr, .modal-footer, .modal .custom-textarea, .post-right__container .post.post--root hr, .search-item-container', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1);
changeCss('.modal .custom-textarea:focus', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.3), 1); changeCss('.modal .custom-textarea:focus', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.3), 1);
changeCss('.channel-intro, .settings-modal .settings-table .settings-content .divider-dark, hr, .settings-modal .settings-table .settings-links', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.channel-intro, .settings-modal .settings-table .settings-content .divider-dark, hr, .settings-modal .settings-table .settings-links', '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, pre', '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, .modal .more-channel-table tbody>tr td, .member-div:first-child, .member-div, .access-history__table .access__report, .activity-log__table', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.1), 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, .modal .more-channel-table tbody>tr td, .member-div:first-child, .member-div, .access-history__table .access__report, .activity-log__table', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.1), 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: 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);

Просмотреть файл

@@ -34,6 +34,11 @@ body {
} }
} }
img {
max-width: 100%;
height: auto;
}
.input-group-addon { .input-group-addon {
background: transparent; background: transparent;
} }

Просмотреть файл

@@ -53,15 +53,10 @@ blockquote {
} }
pre { pre {
border: none; border: none;
background-color: #f7f7f7;
margin: 5px 0; margin: 5px 0;
.current--user & { color: inherit;
background: #fff;
}
code {
color: #c7254e;
}
} }
code { code {
background: #fff; background: #fff;
color: inherit;
} }

Просмотреть файл

@@ -667,7 +667,7 @@
.modal-image { .modal-image {
.image-wrapper { .image-wrapper {
font-size: 12px; font-size: 12px;
max-width: 280px; min-width: 280px;
.modal-close { .modal-close {
@include opacity(1); @include opacity(1);
} }

Просмотреть файл

@@ -54,7 +54,7 @@
<script> <script>
window.setup_channel_page({{ .Props }}); window.setup_channel_page({{ .Props }});
$('body').tooltip( {selector: '[data-toggle=tooltip]'} ); $('body').tooltip( {selector: '[data-toggle=tooltip]'} );
$('.modal-body').css('max-height', $(window).height() * 0.7); $('.modal-body').css('max-height', $(window).height() - 150);
$('.modal-body').perfectScrollbar(); $('.modal-body').perfectScrollbar();
</script> </script>
</body> </body>