DM and Modal changes (#2927)
* DM and Modal changes * Fixing image previews
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
b4d28fe205
Коммит
64b6d8cde5
@@ -104,26 +104,9 @@ class FilteredUserList extends React.Component {
|
|||||||
|
|
||||||
let count;
|
let count;
|
||||||
if (users.length === this.state.users.length) {
|
if (users.length === this.state.users.length) {
|
||||||
count = (
|
count = '(' + users.length + ')';
|
||||||
<FormattedMessage
|
|
||||||
id='filtered_user_list.count'
|
|
||||||
defaultMessage='{count} {count, plural, =0 {0 members} one {member} other {members}}'
|
|
||||||
values={{
|
|
||||||
count: users.length
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
} else {
|
} else {
|
||||||
count = (
|
count = '(' + this.state.users.length + ')';
|
||||||
<FormattedMessage
|
|
||||||
id='filtered_user_list.countTotal'
|
|
||||||
defaultMessage='{count} {count, plural, =0 {0 members} one {member} other {members}} of {total} Total'
|
|
||||||
values={{
|
|
||||||
count: users.length,
|
|
||||||
total: this.state.users.length
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let teamToggle;
|
let teamToggle;
|
||||||
@@ -133,9 +116,10 @@ class FilteredUserList extends React.Component {
|
|||||||
teamMembers = [];
|
teamMembers = [];
|
||||||
|
|
||||||
teamToggle = (
|
teamToggle = (
|
||||||
<div className='col-sm-6'>
|
<div className='member-select__container'>
|
||||||
|
<span className='member-count'>{count}</span>
|
||||||
<select
|
<select
|
||||||
className='form-control member-select'
|
className='form-control'
|
||||||
id='restrictList'
|
id='restrictList'
|
||||||
ref='restrictList'
|
ref='restrictList'
|
||||||
defaultValue='team'
|
defaultValue='team'
|
||||||
@@ -171,9 +155,8 @@ class FilteredUserList extends React.Component {
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className='col-sm-6'>
|
<div className='col-sm-6'>
|
||||||
<span className='member-count'>{count}</span>
|
{teamToggle}
|
||||||
</div>
|
</div>
|
||||||
{teamToggle}
|
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
ref='userList'
|
ref='userList'
|
||||||
|
|||||||
@@ -509,7 +509,15 @@ export default class Sidebar extends React.Component {
|
|||||||
|
|
||||||
let directDivider;
|
let directDivider;
|
||||||
if (directMessageNonTeamItems.length !== 0) {
|
if (directMessageNonTeamItems.length !== 0) {
|
||||||
directDivider = <hr/>;
|
directDivider =
|
||||||
|
(<div className='sidebar__divider'>
|
||||||
|
<div className='sidebar__divider__text'>
|
||||||
|
<FormattedMessage
|
||||||
|
id='sidebar.otherMembers'
|
||||||
|
defaultMessage='Other teams'
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>);
|
||||||
}
|
}
|
||||||
|
|
||||||
// update the favicon to show if there are any notifications
|
// update the favicon to show if there are any notifications
|
||||||
|
|||||||
@@ -319,7 +319,6 @@ class ViewImageModal extends React.Component {
|
|||||||
onClick={this.props.onModalDismissed}
|
onClick={this.props.onModalDismissed}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className='modal-back'
|
|
||||||
onMouseEnter={this.onMouseEnterImage}
|
onMouseEnter={this.onMouseEnterImage}
|
||||||
onMouseLeave={this.onMouseLeaveImage}
|
onMouseLeave={this.onMouseLeaveImage}
|
||||||
onClick={(e) => e.stopPropagation()}
|
onClick={(e) => e.stopPropagation()}
|
||||||
@@ -328,7 +327,9 @@ class ViewImageModal extends React.Component {
|
|||||||
className={closeButtonClass}
|
className={closeButtonClass}
|
||||||
onClick={this.props.onModalDismissed}
|
onClick={this.props.onModalDismissed}
|
||||||
/>
|
/>
|
||||||
{content}
|
<div className='modal-image__content'>
|
||||||
|
{content}
|
||||||
|
</div>
|
||||||
<ViewImagePopoverBar
|
<ViewImagePopoverBar
|
||||||
show={this.state.showFooter}
|
show={this.state.showFooter}
|
||||||
fileId={this.state.imgId}
|
fileId={this.state.imgId}
|
||||||
|
|||||||
@@ -1129,6 +1129,7 @@
|
|||||||
"sidebar.createGroup": "Create new group",
|
"sidebar.createGroup": "Create new group",
|
||||||
"sidebar.direct": "Direct Messages",
|
"sidebar.direct": "Direct Messages",
|
||||||
"sidebar.more": "More",
|
"sidebar.more": "More",
|
||||||
|
"sidebar.otherMembers": "Other teams",
|
||||||
"sidebar.moreElips": "More...",
|
"sidebar.moreElips": "More...",
|
||||||
"sidebar.pg": "Private Groups",
|
"sidebar.pg": "Private Groups",
|
||||||
"sidebar.removeList": "Remove from list",
|
"sidebar.removeList": "Remove from list",
|
||||||
|
|||||||
@@ -217,6 +217,13 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-image__content {
|
||||||
|
max-height: 85vh;
|
||||||
|
max-width: 90vw;
|
||||||
|
overflow-x: hidden;
|
||||||
|
overflow-y: visible;
|
||||||
|
}
|
||||||
|
|
||||||
.modal-image__wrapper {
|
.modal-image__wrapper {
|
||||||
@include border-radius(3px);
|
@include border-radius(3px);
|
||||||
display: table-cell;
|
display: table-cell;
|
||||||
@@ -365,6 +372,7 @@
|
|||||||
bottom: -40px;
|
bottom: -40px;
|
||||||
left: 0;
|
left: 0;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
max-width: 90vw;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -439,16 +447,21 @@
|
|||||||
.member-show {
|
.member-show {
|
||||||
@include opacity(.8);
|
@include opacity(.8);
|
||||||
float: right;
|
float: right;
|
||||||
margin-top: 12px;
|
|
||||||
margin-right: 3px;
|
margin-right: 3px;
|
||||||
|
margin-top: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.member-select {
|
.member-select__container {
|
||||||
@include opacity(.8);
|
.member-count {
|
||||||
float: right;
|
margin: 12px 0 0 3px;
|
||||||
width: auto;
|
}
|
||||||
margin-top: 5px;
|
|
||||||
margin-right: 5px;
|
select {
|
||||||
|
@include opacity(.8);
|
||||||
|
float: right;
|
||||||
|
margin: 5px 5px 0 2px;
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.more-purpose {
|
.more-purpose {
|
||||||
|
|||||||
@@ -12,6 +12,32 @@
|
|||||||
padding-top: 44px;
|
padding-top: 44px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.sidebar__divider {
|
||||||
|
color: $white;
|
||||||
|
font-size: .9em;
|
||||||
|
height: 20px;
|
||||||
|
margin: 5px 0 6px;
|
||||||
|
line-height: 20px;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
&:before {
|
||||||
|
background: $light-gray;
|
||||||
|
content: '';
|
||||||
|
height: 1px;
|
||||||
|
position: absolute;
|
||||||
|
top: 10px;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar__divider__text {
|
||||||
|
background: $primary-color;
|
||||||
|
float: right;
|
||||||
|
padding: 0 10px;
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.dropdown-menu {
|
.dropdown-menu {
|
||||||
max-height: 400px;
|
max-height: 400px;
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
|
|||||||
@@ -327,7 +327,7 @@ export default {
|
|||||||
sidebarText: '#fff',
|
sidebarText: '#fff',
|
||||||
sidebarUnreadText: '#fff',
|
sidebarUnreadText: '#fff',
|
||||||
sidebarTextHoverBg: '#4A5664',
|
sidebarTextHoverBg: '#4A5664',
|
||||||
sidebarTextActiveBorder: '#39769C',
|
sidebarTextActiveBorder: '#66B9A7',
|
||||||
sidebarTextActiveColor: '#FFFFFF',
|
sidebarTextActiveColor: '#FFFFFF',
|
||||||
sidebarHeaderBg: '#1B2C3E',
|
sidebarHeaderBg: '#1B2C3E',
|
||||||
sidebarHeaderTextColor: '#FFFFFF',
|
sidebarHeaderTextColor: '#FFFFFF',
|
||||||
|
|||||||
@@ -590,7 +590,7 @@ export function toTitleCase(str) {
|
|||||||
|
|
||||||
export function applyTheme(theme) {
|
export function applyTheme(theme) {
|
||||||
if (theme.sidebarBg) {
|
if (theme.sidebarBg) {
|
||||||
changeCss('.app__body .sidebar--left, .app__body .modal .settings-modal .settings-table .settings-links, .app__body .sidebar--menu', 'background:' + theme.sidebarBg, 1);
|
changeCss('.app__body .sidebar--left, .app__body .sidebar--left .sidebar__divider .sidebar__divider__text, .app__body .modal .settings-modal .settings-table .settings-links, .app__body .sidebar--menu', 'background:' + theme.sidebarBg, 1);
|
||||||
changeCss('body.app__body', 'scrollbar-face-color:' + theme.sidebarBg, 3);
|
changeCss('body.app__body', 'scrollbar-face-color:' + theme.sidebarBg, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -614,6 +614,8 @@ export function applyTheme(theme) {
|
|||||||
|
|
||||||
if (theme.sidebarTextActiveBorder) {
|
if (theme.sidebarTextActiveBorder) {
|
||||||
changeCss('.app__body .sidebar--left .nav li.active a:before, .app__body .modal .settings-modal .nav-pills>li.active a:before', 'background:' + theme.sidebarTextActiveBorder, 1);
|
changeCss('.app__body .sidebar--left .nav li.active a:before, .app__body .modal .settings-modal .nav-pills>li.active a:before', 'background:' + theme.sidebarTextActiveBorder, 1);
|
||||||
|
changeCss('.app__body .sidebar--left .sidebar__divider:before', 'background:' + changeOpacity(theme.sidebarTextActiveBorder, 0.5), 1);
|
||||||
|
changeCss('.app__body .sidebar--left .sidebar__divider', 'color:' + theme.sidebarTextActiveBorder, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (theme.sidebarTextActiveColor) {
|
if (theme.sidebarTextActiveColor) {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user