Merge pull request #1760 from asaadmahmoodspin/ui-improvements

Multiple UI Improvements
Этот коммит содержится в:
Corey Hulen
2015-12-21 09:04:42 -08:00
родитель 840335911f 9ab31d0a2b
Коммит a960cf5244
9 изменённых файлов: 37 добавлений и 15 удалений

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

@@ -52,14 +52,29 @@ export default class SidebarRight extends React.Component {
doStrangeThings() { doStrangeThings() {
// We should have a better way to do this stuff // We should have a better way to do this stuff
// Hence the function name. // Hence the function name.
var windowWidth = $(window).outerWidth();
var sidebarRightWidth = $('.sidebar--right').outerWidth();
$('.inner__wrap').removeClass('.move--right'); $('.inner__wrap').removeClass('.move--right');
$('.inner__wrap').addClass('move--left'); $('.inner__wrap').addClass('move--left');
$('.sidebar--left').removeClass('move--right'); $('.sidebar--left').removeClass('move--right');
$('.sidebar--right').addClass('move--left'); $('.sidebar--right').addClass('move--left');
//$('.sidebar--right').prepend('<div class="sidebar__overlay"></div>'); //$('.sidebar--right').prepend('<div class="sidebar__overlay"></div>');
if (this.state.search_visible || this.state.post_right_visible) {
if (!(this.state.search_visible || this.state.post_right_visible)) { if (windowWidth > 960) {
$('.inner__wrap').velocity({marginRight: sidebarRightWidth}, {duration: 500, easing: 'easeOutSine'});
$('.sidebar--right').velocity({translateX: 0}, {duration: 500, easing: 'easeOutSine'});
} else {
$('.inner__wrap, .sidebar--right').attr('style', '');
}
} else {
if (windowWidth > 960) {
$('.inner__wrap').velocity({marginRight: 0}, {duration: 500, easing: 'easeOutSine'});
$('.sidebar--right').velocity({translateX: sidebarRightWidth}, {duration: 500, easing: 'easeOutSine'});
} else {
$('.inner__wrap, .sidebar--right').attr('style', '');
}
$('.inner__wrap').removeClass('move--left').removeClass('move--right'); $('.inner__wrap').removeClass('move--left').removeClass('move--right');
$('.sidebar--right').removeClass('move--left'); $('.sidebar--right').removeClass('move--left');
return ( return (

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

@@ -617,6 +617,7 @@ export function applyTheme(theme) {
if (theme.centerChannelColor) { if (theme.centerChannelColor) {
changeCss('.sidebar--left, .sidebar--right .sidebar--right__header', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1); changeCss('.sidebar--left, .sidebar--right .sidebar--right__header', 'border-color:' + changeOpacity(theme.centerChannelColor, 0.2), 1);
changeCss('.app__content, .post-create__container .post-create-body .btn-file, .post-create__container .post-create-footer .msg-typing, .command-name, .modal .modal-content, .dropdown-menu, .popover, .mentions-name, .tip-overlay', 'color:' + theme.centerChannelColor, 1); changeCss('.app__content, .post-create__container .post-create-body .btn-file, .post-create__container .post-create-footer .msg-typing, .command-name, .modal .modal-content, .dropdown-menu, .popover, .mentions-name, .tip-overlay', 'color:' + theme.centerChannelColor, 1);
changeCss('#archive-link-home', 'background:' + changeOpacity(theme.centerChannelColor, 0.15), 1);
changeCss('#post-create', 'color:' + theme.centerChannelColor, 2); changeCss('#post-create', 'color:' + theme.centerChannelColor, 2);
changeCss('.mentions--top, .suggestion-list', 'box-shadow:' + changeOpacity(theme.centerChannelColor, 0.2) + ' 1px -3px 12px', 3); changeCss('.mentions--top, .suggestion-list', 'box-shadow:' + changeOpacity(theme.centerChannelColor, 0.2) + ' 1px -3px 12px', 3);
changeCss('.mentions--top, .suggestion-list', '-webkit-box-shadow:' + changeOpacity(theme.centerChannelColor, 0.2) + ' 1px -3px 12px', 2); changeCss('.mentions--top, .suggestion-list', '-webkit-box-shadow:' + changeOpacity(theme.centerChannelColor, 0.2) + ' 1px -3px 12px', 2);
@@ -685,11 +686,11 @@ export function applyTheme(theme) {
} }
if (theme.mentionHighlightBg) { if (theme.mentionHighlightBg) {
changeCss('.mention-highlight, .search-highlight, #archive-link-home', 'background:' + theme.mentionHighlightBg, 1); changeCss('.mention-highlight, .search-highlight', 'background:' + theme.mentionHighlightBg, 1);
} }
if (theme.mentionHighlightBg) { if (theme.mentionHighlightBg) {
changeCss('.post.post--highlight, #archive-link-home', 'background:' + changeOpacity(theme.mentionHighlightBg, 0.5), 1); changeCss('.post.post--highlight', 'background:' + changeOpacity(theme.mentionHighlightBg, 0.5), 1);
} }
if (theme.mentionHighlightLink) { if (theme.mentionHighlightLink) {

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

@@ -1,9 +1,7 @@
@charset "UTF-8"; @charset "UTF-8";
.inner__wrap { .inner__wrap {
@include single-transition(all, 0.5s, ease);
&.move--left { &.move--left {
margin-right: 400px;
.search-bar__container { .search-bar__container {
display: none; display: none;
} }

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

@@ -231,12 +231,12 @@ body.ios {
} }
.more-messages-text { .more-messages-text {
margin-top: 2px; margin: 5px 0 10px;
margin-bottom: 5px;
display: block; display: block;
text-align: center; text-align: center;
outline: none; outline: none;
border: none; border: none;
font-size: 13px;
} }
.beginning-messages-text { .beginning-messages-text {
margin-top: 2px; margin-top: 2px;
@@ -683,7 +683,7 @@ body.ios {
} }
.post__time { .post__time {
font-size: 13px; font-size: 0.9em;
} }
.post__time, &.post--system .post__body { .post__time, &.post--system .post__body {

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

@@ -56,6 +56,7 @@
.sidebar--right { .sidebar--right {
z-index: 5; z-index: 5;
@include translateX(100%); @include translateX(100%);
@include single-transition(all, 0.5s, ease);
&.move--left { &.move--left {
@include translateX(0); @include translateX(0);
@@ -628,6 +629,7 @@
height: calc(100% - 44px); height: calc(100% - 44px);
} }
.inner__wrap { .inner__wrap {
@include single-transition(all, 0.5s, ease);
&.move--right { &.move--right {
@include translate3d(290px, 0, 0); @include translate3d(290px, 0, 0);
&:before { &:before {

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

@@ -18,6 +18,12 @@
z-index: 5; z-index: 5;
cursor: pointer; cursor: pointer;
} }
.search-item-snippet {
@include clearfix;
text-overflow: ellipsis;
}
.sidebar__collapse { .sidebar__collapse {
cursor: pointer; cursor: pointer;
z-index: 5; z-index: 5;
@@ -135,6 +141,7 @@
.search-item-time { .search-item-time {
@include opacity(0.7); @include opacity(0.7);
font-size: 0.9em;
} }
.search-results-none { .search-results-none {

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

@@ -7,13 +7,7 @@
right: 0px; right: 0px;
padding: 0; padding: 0;
background: #fff; background: #fff;
@include single-transition(transform, 0.5s, ease);
@include translateX(400px); @include translateX(400px);
&.move--left {
@include translateX(0);
}
.post-body { .post-body {
img { img {

4
web/static/js/velocity.min.js поставляемый Обычный файл

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

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

@@ -36,6 +36,7 @@
<script src="/static/js/bootstrap-3.3.5.js"></script> <script src="/static/js/bootstrap-3.3.5.js"></script>
<script src="/static/js/bootstrap-colorpicker.min.js"></script> <script src="/static/js/bootstrap-colorpicker.min.js"></script>
<script src="/static/js/react-bootstrap-0.28.1.js"></script> <script src="/static/js/react-bootstrap-0.28.1.js"></script>
<script src="/static/js/velocity.min.js"></script>
<script src="/static/js/perfect-scrollbar-0.6.7.jquery.min.js"></script> <script src="/static/js/perfect-scrollbar-0.6.7.jquery.min.js"></script>
<script src="/static/js/jquery-dragster/jquery.dragster.js"></script> <script src="/static/js/jquery-dragster/jquery.dragster.js"></script>
<script src="/static/js/babel-polyfill-6.1.18.min.js"></script> <script src="/static/js/babel-polyfill-6.1.18.min.js"></script>