Multiple UI fixes (#3357)
* Multiple UI fixes * Removing utils from tutorial file
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
ca138883ab
Коммит
b130a32eac
@@ -54,7 +54,10 @@ export default class MultiSelectSetting extends React.Component {
|
||||
onChange={this.handleChange}
|
||||
value={this.props.selected}
|
||||
/>
|
||||
<FormError error={this.state.error}/>
|
||||
<FormError
|
||||
noMargin={true}
|
||||
error={this.state.error}
|
||||
/>
|
||||
</Setting>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ export default class StatisticCount extends React.Component {
|
||||
);
|
||||
|
||||
return (
|
||||
<div className='col-sm-3'>
|
||||
<div className='col-md-3 col-sm-6'>
|
||||
<div className='total-count'>
|
||||
<div className='title'>
|
||||
{this.props.title}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// See License.txt for license information.
|
||||
|
||||
import ReactDOM from 'react-dom';
|
||||
import {Modal} from 'react-bootstrap';
|
||||
import {Modal, Tooltip, OverlayTrigger} from 'react-bootstrap';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
@@ -131,6 +131,9 @@ export default class ChangeUrlModal extends React.Component {
|
||||
|
||||
const fullTeamUrl = Utils.getTeamURLFromAddressBar();
|
||||
const teamURL = Utils.getShortenedTeamURL();
|
||||
const urlTooltip = (
|
||||
<Tooltip id='urlTooltip'>{fullTeamUrl}</Tooltip>
|
||||
);
|
||||
|
||||
return (
|
||||
<Modal
|
||||
@@ -150,13 +153,12 @@ export default class ChangeUrlModal extends React.Component {
|
||||
<label className='col-sm-2 form__label control-label'>{this.props.urlLabel}</label>
|
||||
<div className='col-sm-10'>
|
||||
<div className={urlClass}>
|
||||
<span
|
||||
data-toggle='tooltip'
|
||||
title={fullTeamUrl}
|
||||
className='input-group-addon'
|
||||
<OverlayTrigger
|
||||
placement='top'
|
||||
overlay={urlTooltip}
|
||||
>
|
||||
{teamURL}
|
||||
</span>
|
||||
<span className='input-group-addon'>{teamURL}</span>
|
||||
</OverlayTrigger>
|
||||
<input
|
||||
type='text'
|
||||
ref='urlinput'
|
||||
|
||||
@@ -8,6 +8,7 @@ export default class FormError extends React.Component {
|
||||
// accepts either a single error or an array of errors
|
||||
return {
|
||||
error: React.PropTypes.node,
|
||||
noMargin: React.PropTypes.node,
|
||||
errors: React.PropTypes.arrayOf(React.PropTypes.node)
|
||||
};
|
||||
}
|
||||
@@ -26,6 +27,7 @@ export default class FormError extends React.Component {
|
||||
|
||||
// look for the first truthy error to display
|
||||
let message = this.props.error;
|
||||
const noMargin = this.props.noMargin;
|
||||
|
||||
if (!message) {
|
||||
for (const error of this.props.errors) {
|
||||
@@ -39,6 +41,16 @@ export default class FormError extends React.Component {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (noMargin) {
|
||||
return (
|
||||
<div className='has-error'>
|
||||
<label className='control-label'>
|
||||
{message}
|
||||
</label>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='form-group has-error'>
|
||||
<label className='control-label'>
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
import UserStore from 'stores/user_store.jsx';
|
||||
import TeamStore from 'stores/team_store.jsx';
|
||||
import PreferenceStore from 'stores/preference_store.jsx';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
import * as AsyncClient from 'utils/async_client.jsx';
|
||||
import * as GlobalActions from 'actions/global_actions.jsx';
|
||||
|
||||
@@ -218,40 +217,34 @@ export default class TutorialIntroScreens extends React.Component {
|
||||
);
|
||||
}
|
||||
render() {
|
||||
const height = Utils.windowHeight() - 100;
|
||||
const screen = this.createScreen();
|
||||
|
||||
return (
|
||||
<div
|
||||
className='tutorials__scroll'
|
||||
style={{height}}
|
||||
>
|
||||
<div className='tutorial-steps__container'>
|
||||
<div className='tutorial__content'>
|
||||
<div className='tutorial__steps'>
|
||||
{screen}
|
||||
<div className='tutorial__footer'>
|
||||
<button
|
||||
className='btn btn-primary'
|
||||
tabIndex='1'
|
||||
onClick={this.handleNext}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='tutorial_intro.next'
|
||||
defaultMessage='Next'
|
||||
/>
|
||||
</button>
|
||||
<a
|
||||
className='tutorial-skip'
|
||||
href='#'
|
||||
onClick={this.skipTutorial}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='tutorial_intro.skip'
|
||||
defaultMessage='Skip tutorial'
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
<div className='tutorial-steps__container'>
|
||||
<div className='tutorial__content'>
|
||||
<div className='tutorial__steps'>
|
||||
{screen}
|
||||
<div className='tutorial__footer'>
|
||||
<button
|
||||
className='btn btn-primary'
|
||||
tabIndex='1'
|
||||
onClick={this.handleNext}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='tutorial_intro.next'
|
||||
defaultMessage='Next'
|
||||
/>
|
||||
</button>
|
||||
<a
|
||||
className='tutorial-skip'
|
||||
href='#'
|
||||
onClick={this.skipTutorial}
|
||||
>
|
||||
<FormattedMessage
|
||||
id='tutorial_intro.skip'
|
||||
defaultMessage='Skip tutorial'
|
||||
/>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -320,7 +320,7 @@ class NotificationsTab extends React.Component {
|
||||
inputs.push(
|
||||
<div
|
||||
key='oauthEmailInfo'
|
||||
className='form-group'
|
||||
className='padding-top'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='user.settings.push_notification.disabled_long'
|
||||
|
||||
Ссылка в новой задаче
Block a user