Multiple UI changes
Этот коммит содержится в:
@@ -270,7 +270,7 @@ export default class FileAttachment extends React.Component {
|
|||||||
href={fileUrl}
|
href={fileUrl}
|
||||||
download={filenameString}
|
download={filenameString}
|
||||||
data-toggle='tooltip'
|
data-toggle='tooltip'
|
||||||
title={filenameString}
|
title={'Download ' + filenameString}
|
||||||
className='post-image__name'
|
className='post-image__name'
|
||||||
>
|
>
|
||||||
{trimmedFilename}
|
{trimmedFilename}
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ export default class GetLinkModal extends React.Component {
|
|||||||
<br /><br />
|
<br /><br />
|
||||||
</p>
|
</p>
|
||||||
<textarea
|
<textarea
|
||||||
className='form-control no-resize'
|
className='form-control no-resize min-height'
|
||||||
readOnly='true'
|
readOnly='true'
|
||||||
ref='textarea'
|
ref='textarea'
|
||||||
value={this.state.value}
|
value={this.state.value}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ export default class NavbarDropdown extends React.Component {
|
|||||||
TeamStore.addChangeListener(this.onListenerChange);
|
TeamStore.addChangeListener(this.onListenerChange);
|
||||||
|
|
||||||
$(ReactDOM.findDOMNode(this.refs.dropdown)).on('hide.bs.dropdown', () => {
|
$(ReactDOM.findDOMNode(this.refs.dropdown)).on('hide.bs.dropdown', () => {
|
||||||
|
$('.sidebar--left .dropdown-menu').scrollTop(0);
|
||||||
this.blockToggle = true;
|
this.blockToggle = true;
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.blockToggle = false;
|
this.blockToggle = false;
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ const patterns = new Map([
|
|||||||
['channels', /\b(?:in|channel):\s*(\S*)$/i],
|
['channels', /\b(?:in|channel):\s*(\S*)$/i],
|
||||||
['users', /\bfrom:\s*(\S*)$/i]
|
['users', /\bfrom:\s*(\S*)$/i]
|
||||||
]);
|
]);
|
||||||
|
const Popover = ReactBootstrap.Popover;
|
||||||
|
|
||||||
export default class SearchAutocomplete extends React.Component {
|
export default class SearchAutocomplete extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -36,6 +37,11 @@ export default class SearchAutocomplete extends React.Component {
|
|||||||
$(document).on('click', this.handleDocumentClick);
|
$(document).on('click', this.handleDocumentClick);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
componentDidUpdate() {
|
||||||
|
$(ReactDOM.findDOMNode(this.refs.searchPopover)).find('.popover-content').perfectScrollbar();
|
||||||
|
$(ReactDOM.findDOMNode(this.refs.searchPopover)).find('.popover-content').css('max-height', $(window).height() - 200);
|
||||||
|
}
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
$(document).off('click', this.handleDocumentClick);
|
$(document).off('click', this.handleDocumentClick);
|
||||||
}
|
}
|
||||||
@@ -193,7 +199,7 @@ export default class SearchAutocomplete extends React.Component {
|
|||||||
|
|
||||||
if (this.state.mode === 'channels') {
|
if (this.state.mode === 'channels') {
|
||||||
suggestions = this.state.suggestions.map((channel, index) => {
|
suggestions = this.state.suggestions.map((channel, index) => {
|
||||||
let className = 'search-autocomplete__channel';
|
let className = 'search-autocomplete__item';
|
||||||
if (this.state.selection === index) {
|
if (this.state.selection === index) {
|
||||||
className += ' selected';
|
className += ' selected';
|
||||||
}
|
}
|
||||||
@@ -211,7 +217,7 @@ export default class SearchAutocomplete extends React.Component {
|
|||||||
});
|
});
|
||||||
} else if (this.state.mode === 'users') {
|
} else if (this.state.mode === 'users') {
|
||||||
suggestions = this.state.suggestions.map((user, index) => {
|
suggestions = this.state.suggestions.map((user, index) => {
|
||||||
let className = 'search-autocomplete__user';
|
let className = 'search-autocomplete__item';
|
||||||
if (this.state.selection === index) {
|
if (this.state.selection === index) {
|
||||||
className += ' selected';
|
className += ' selected';
|
||||||
}
|
}
|
||||||
@@ -224,7 +230,7 @@ export default class SearchAutocomplete extends React.Component {
|
|||||||
className={className}
|
className={className}
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
className='profile-img'
|
className='profile-img rounded'
|
||||||
src={'/api/v1/users/' + user.id + '/image?time=' + user.update_at}
|
src={'/api/v1/users/' + user.id + '/image?time=' + user.update_at}
|
||||||
/>
|
/>
|
||||||
{user.username}
|
{user.username}
|
||||||
@@ -234,12 +240,15 @@ export default class SearchAutocomplete extends React.Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<Popover
|
||||||
ref='container'
|
ref='searchPopover'
|
||||||
className='search-autocomplete'
|
onShow={this.componentDidMount}
|
||||||
|
id='search-autocomplete__popover'
|
||||||
|
className='search-help-popover autocomplete visible'
|
||||||
|
placement='bottom'
|
||||||
>
|
>
|
||||||
{suggestions}
|
{suggestions}
|
||||||
</div>
|
</Popover>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export default class SettingPicture extends React.Component {
|
|||||||
img = (
|
img = (
|
||||||
<img
|
<img
|
||||||
ref='image'
|
ref='image'
|
||||||
className='profile-img'
|
className='profile-img rounded'
|
||||||
src=''
|
src=''
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@@ -50,7 +50,7 @@ export default class SettingPicture extends React.Component {
|
|||||||
img = (
|
img = (
|
||||||
<img
|
<img
|
||||||
ref='image'
|
ref='image'
|
||||||
className='profile-img'
|
className='profile-img rounded'
|
||||||
src={this.props.src}
|
src={this.props.src}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ var NavbarDropdown = require('./navbar_dropdown.jsx');
|
|||||||
var UserStore = require('../stores/user_store.jsx');
|
var UserStore = require('../stores/user_store.jsx');
|
||||||
const Utils = require('../utils/utils.jsx');
|
const Utils = require('../utils/utils.jsx');
|
||||||
|
|
||||||
|
const Tooltip = ReactBootstrap.Tooltip;
|
||||||
|
const OverlayTrigger = ReactBootstrap.OverlayTrigger;
|
||||||
|
|
||||||
export default class SidebarHeader extends React.Component {
|
export default class SidebarHeader extends React.Component {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
@@ -47,7 +50,15 @@ export default class SidebarHeader extends React.Component {
|
|||||||
{profilePicture}
|
{profilePicture}
|
||||||
<div className='header__info'>
|
<div className='header__info'>
|
||||||
<div className='user__name'>{'@' + me.username}</div>
|
<div className='user__name'>{'@' + me.username}</div>
|
||||||
|
<OverlayTrigger
|
||||||
|
trigger={['hover', 'focus']}
|
||||||
|
delayShow={1000}
|
||||||
|
placement='bottom'
|
||||||
|
overlay={<Tooltip id='team-name__tooltip'>{this.props.teamDisplayName}</Tooltip>}
|
||||||
|
ref='descriptionOverlay'
|
||||||
|
>
|
||||||
<div className='team__name'>{this.props.teamDisplayName}</div>
|
<div className='team__name'>{this.props.teamDisplayName}</div>
|
||||||
|
</OverlayTrigger>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<NavbarDropdown
|
<NavbarDropdown
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ export default class EmailSignUpPage extends React.Component {
|
|||||||
className='btn btn-md btn-primary'
|
className='btn btn-md btn-primary'
|
||||||
type='submit'
|
type='submit'
|
||||||
>
|
>
|
||||||
{'Sign up'}
|
{'Create Team'}
|
||||||
</button>
|
</button>
|
||||||
{serverError}
|
{serverError}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -438,6 +438,8 @@ 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 li.active a, .sidebar--left .nav li.active a:hover, .sidebar--left .nav li.active a:focus', 'background:' + changeOpacity(theme.sidebarTextActiveColor, 0.1), 1);
|
changeCss('.sidebar--left .nav li.active a, .sidebar--left .nav li.active a:hover, .sidebar--left .nav li.active a:focus', 'background:' + changeOpacity(theme.sidebarTextActiveColor, 0.1), 1);
|
||||||
|
changeCss('.search-help-popover .search-autocomplete__item:hover', 'background:' + changeOpacity(theme.sidebarTextActiveColor, 0.05), 1);
|
||||||
|
changeCss('.search-help-popover .search-autocomplete__item.selected', 'background:' + changeOpacity(theme.sidebarTextActiveColor, 0.15), 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (theme.sidebarHeaderBg) {
|
if (theme.sidebarHeaderBg) {
|
||||||
|
|||||||
@@ -37,6 +37,9 @@ body {
|
|||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
&.rounded {
|
||||||
|
@include border-radius(100%);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.popover {
|
.popover {
|
||||||
@@ -122,6 +125,9 @@ a:focus, a:hover {
|
|||||||
&.no-resize {
|
&.no-resize {
|
||||||
resize: none;
|
resize: none;
|
||||||
}
|
}
|
||||||
|
&.min-height {
|
||||||
|
min-height: 100px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
|
.form-control[disabled], .form-control[readonly], fieldset[disabled] .form-control {
|
||||||
|
|||||||
@@ -113,11 +113,10 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 2em 1em;
|
padding: 2em 1em;
|
||||||
.primary-message {
|
.primary-message {
|
||||||
font-size: 1.2em;
|
font-size: 1.25em;
|
||||||
}
|
}
|
||||||
.secondary-message {
|
.secondary-message {
|
||||||
font-size: 1.25em;
|
@include opacity(0.8);
|
||||||
color: #888;
|
|
||||||
margin: 1em 0 0;
|
margin: 1em 0 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -28,6 +28,36 @@
|
|||||||
@include single-transition(opacity, 0.3s, ease-in);
|
@include single-transition(opacity, 0.3s, ease-in);
|
||||||
font-size: em(13px);
|
font-size: em(13px);
|
||||||
|
|
||||||
|
&.autocomplete {
|
||||||
|
display: block;
|
||||||
|
.popover-content {
|
||||||
|
padding: 10px;
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-autocomplete__item {
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 6px 8px;
|
||||||
|
margin: 3px 0;
|
||||||
|
@include border-radius(2px);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: rgba(black, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.selected {
|
||||||
|
background: rgba(black, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.profile-img {
|
||||||
|
margin-top: -1px;
|
||||||
|
height: 16px;
|
||||||
|
margin-right: 6px;
|
||||||
|
width: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&.bottom > .arrow {
|
&.bottom > .arrow {
|
||||||
top: -18px;
|
top: -18px;
|
||||||
border-width: 9px;
|
border-width: 9px;
|
||||||
|
|||||||
@@ -379,7 +379,9 @@
|
|||||||
}
|
}
|
||||||
.btn {
|
.btn {
|
||||||
&.btn-primary {
|
&.btn-primary {
|
||||||
margin: 8px 0 0 -10px;
|
display: block;
|
||||||
|
margin: 10px 0 6px;
|
||||||
|
width: 100%;
|
||||||
float: none;
|
float: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -401,7 +403,13 @@
|
|||||||
&.minimize-settings {
|
&.minimize-settings {
|
||||||
display: block;
|
display: block;
|
||||||
.section-edit {
|
.section-edit {
|
||||||
text-align: left;
|
position: absolute;
|
||||||
|
top: 7px;
|
||||||
|
right: 0;
|
||||||
|
width: 50px;
|
||||||
|
.fa {
|
||||||
|
display: inline-block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.no-padding--left {
|
.no-padding--left {
|
||||||
|
|||||||
@@ -108,44 +108,4 @@
|
|||||||
|
|
||||||
.search-highlight {
|
.search-highlight {
|
||||||
background-color: #FFF2BB;
|
background-color: #FFF2BB;
|
||||||
}
|
}
|
||||||
|
|
||||||
.search-autocomplete {
|
|
||||||
background-color: #fff;
|
|
||||||
border: $border-gray;
|
|
||||||
line-height: 36px;
|
|
||||||
overflow-x: hidden;
|
|
||||||
overflow-y: scroll;
|
|
||||||
position: absolute;
|
|
||||||
text-align: left;
|
|
||||||
width: 100%;
|
|
||||||
z-index: 100;
|
|
||||||
@extend %popover-box-shadow;
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-autocomplete__channel {
|
|
||||||
cursor: pointer;
|
|
||||||
height: 36px;
|
|
||||||
padding: 0px 6px;
|
|
||||||
|
|
||||||
&.selected {
|
|
||||||
background-color:rgba(51, 51, 51, 0.15);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.search-autocomplete__user {
|
|
||||||
cursor: pointer;
|
|
||||||
height: 36px;
|
|
||||||
padding: 0px;
|
|
||||||
|
|
||||||
.profile-img {
|
|
||||||
height: 32px;
|
|
||||||
margin-right: 6px;
|
|
||||||
width: 32px;
|
|
||||||
@include border-radius(16px);
|
|
||||||
}
|
|
||||||
|
|
||||||
&.selected {
|
|
||||||
background-color:rgba(51, 51, 51, 0.15);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
.nav {
|
.nav {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
top: 57px;
|
top: 57px;
|
||||||
width: 180px;
|
width: 179px;
|
||||||
}
|
}
|
||||||
.security-links {
|
.security-links {
|
||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
@@ -93,6 +93,7 @@
|
|||||||
padding: 1em 0;
|
padding: 1em 0;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
@include clearfix;
|
@include clearfix;
|
||||||
&:hover {
|
&:hover {
|
||||||
background: #f9f9f9;
|
background: #f9f9f9;
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user