Updating client dependancies and ESLint (#2954)
* Updating client dependancies * Fixing eslint errors with updates * Updating eslint
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
a3cfdf0483
Коммит
4b260b761a
@@ -45,6 +45,7 @@ export default class AboutBuildModal extends React.Component {
|
||||
/>
|
||||
<a
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
href='http://www.mattermost.org/'
|
||||
>
|
||||
{'mattermost.org'}
|
||||
@@ -76,6 +77,7 @@ export default class AboutBuildModal extends React.Component {
|
||||
/>
|
||||
<a
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
href='http://about.mattermost.com/'
|
||||
>
|
||||
{'about.mattermost.com'}
|
||||
@@ -133,7 +135,7 @@ export default class AboutBuildModal extends React.Component {
|
||||
id='about.version'
|
||||
defaultMessage='Version:'
|
||||
/>
|
||||
{config.Version} ({config.BuildNumber})
|
||||
{'\u00a0' + config.Version + '\u00a0' + config.BuildNumber}
|
||||
</div>
|
||||
</div>
|
||||
{licensee}
|
||||
|
||||
@@ -23,7 +23,7 @@ export default class ActivityLogModal extends React.Component {
|
||||
this.onHide = this.onHide.bind(this);
|
||||
this.onShow = this.onShow.bind(this);
|
||||
|
||||
let state = this.getStateFromStores();
|
||||
const state = this.getStateFromStores();
|
||||
state.moreInfo = [];
|
||||
|
||||
this.state = state;
|
||||
@@ -43,14 +43,14 @@ export default class ActivityLogModal extends React.Component {
|
||||
modalContent.removeClass('animation--highlight');
|
||||
}, 1500);
|
||||
Client.revokeSession(altId,
|
||||
function handleRevokeSuccess() {
|
||||
() => {
|
||||
AsyncClient.getSessions();
|
||||
},
|
||||
function handleRevokeError(err) {
|
||||
let state = this.getStateFromStores();
|
||||
(err) => {
|
||||
const state = this.getStateFromStores();
|
||||
state.serverError = err;
|
||||
this.setState(state);
|
||||
}.bind(this)
|
||||
}
|
||||
);
|
||||
}
|
||||
onShow() {
|
||||
@@ -85,7 +85,7 @@ export default class ActivityLogModal extends React.Component {
|
||||
}
|
||||
}
|
||||
handleMoreInfo(index) {
|
||||
let newMoreInfo = this.state.moreInfo;
|
||||
const newMoreInfo = this.state.moreInfo;
|
||||
newMoreInfo[index] = true;
|
||||
this.setState({moreInfo: newMoreInfo});
|
||||
}
|
||||
|
||||
@@ -134,13 +134,13 @@ export default class AdminSidebar extends React.Component {
|
||||
placement='top'
|
||||
overlay={removeTooltip}
|
||||
>
|
||||
<span
|
||||
className='menu-icon--right menu__close'
|
||||
onClick={this.removeTeam.bind(this, team.id)}
|
||||
style={{cursor: 'pointer'}}
|
||||
>
|
||||
{'×'}
|
||||
</span>
|
||||
<span
|
||||
className='menu-icon--right menu__close'
|
||||
onClick={this.removeTeam.bind(this, team.id)}
|
||||
style={{cursor: 'pointer'}}
|
||||
>
|
||||
{'×'}
|
||||
</span>
|
||||
</OverlayTrigger>
|
||||
</a>
|
||||
</li>
|
||||
@@ -424,7 +424,7 @@ export default class AdminSidebar extends React.Component {
|
||||
</li>
|
||||
</ul>
|
||||
<ul className='nav nav__sub-menu'>
|
||||
<li>
|
||||
<li>
|
||||
<h4>
|
||||
<span className='icon fa fa-gear'></span>
|
||||
<span>
|
||||
@@ -442,14 +442,14 @@ export default class AdminSidebar extends React.Component {
|
||||
placement='top'
|
||||
overlay={addTeamTooltip}
|
||||
>
|
||||
<a
|
||||
href='#'
|
||||
onClick={this.showTeamSelect}
|
||||
>
|
||||
<i
|
||||
className='fa fa-plus'
|
||||
></i>
|
||||
</a>
|
||||
<a
|
||||
href='#'
|
||||
onClick={this.showTeamSelect}
|
||||
>
|
||||
<i
|
||||
className='fa fa-plus'
|
||||
></i>
|
||||
</a>
|
||||
</OverlayTrigger>
|
||||
</span>
|
||||
</h4>
|
||||
|
||||
@@ -277,7 +277,8 @@ export default class ComplianceReports extends React.Component {
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colSpan='5'
|
||||
<td
|
||||
colSpan='5'
|
||||
style={{paddingBottom: '6px'}}
|
||||
>
|
||||
<FormattedMessage
|
||||
|
||||
@@ -285,12 +285,12 @@ class EmailSettings extends React.Component {
|
||||
var emailSuccess = '';
|
||||
if (this.state.emailSuccess) {
|
||||
emailSuccess = (
|
||||
<div className='alert alert-success'>
|
||||
<div className='alert alert-success'>
|
||||
<i className='fa fa-check'></i>
|
||||
<FormattedMessage
|
||||
id='admin.email.emailSuccess'
|
||||
defaultMessage='No errors were reported while sending an email. Please check your inbox to make sure.'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.emailSuccess'
|
||||
defaultMessage='No errors were reported while sending an email. Please check your inbox to make sure.'
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -298,15 +298,15 @@ class EmailSettings extends React.Component {
|
||||
var emailFail = '';
|
||||
if (this.state.emailFail) {
|
||||
emailSuccess = (
|
||||
<div className='alert alert-warning'>
|
||||
<div className='alert alert-warning'>
|
||||
<i className='fa fa-warning'></i>
|
||||
<FormattedMessage
|
||||
id='admin.email.emailFail'
|
||||
defaultMessage='Connection unsuccessful: {error}'
|
||||
values={{
|
||||
error: this.state.emailFail
|
||||
}}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.emailFail'
|
||||
defaultMessage='Connection unsuccessful: {error}'
|
||||
values={{
|
||||
error: this.state.emailFail
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -507,10 +507,10 @@ class EmailSettings extends React.Component {
|
||||
defaultChecked={this.props.config.EmailSettings.EnableSignUpWithEmail}
|
||||
onChange={this.handleChange.bind(this, 'allowSignUpWithEmail_true')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -520,10 +520,10 @@ class EmailSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.EmailSettings.EnableSignUpWithEmail}
|
||||
onChange={this.handleChange.bind(this, 'allowSignUpWithEmail_false')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -648,10 +648,10 @@ class EmailSettings extends React.Component {
|
||||
defaultChecked={this.props.config.EmailSettings.SendEmailNotifications}
|
||||
onChange={this.handleChange.bind(this, 'sendEmailNotifications_true')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -661,10 +661,10 @@ class EmailSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.EmailSettings.SendEmailNotifications}
|
||||
onChange={this.handleChange.bind(this, 'sendEmailNotifications_false')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedHTMLMessage
|
||||
@@ -696,10 +696,10 @@ class EmailSettings extends React.Component {
|
||||
onChange={this.handleChange.bind(this, 'requireEmailVerification_true')}
|
||||
disabled={!this.state.sendEmailNotifications}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -710,10 +710,10 @@ class EmailSettings extends React.Component {
|
||||
onChange={this.handleChange.bind(this, 'requireEmailVerification_false')}
|
||||
disabled={!this.state.sendEmailNotifications}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.email.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
|
||||
@@ -122,7 +122,6 @@ class GitLabSettings extends React.Component {
|
||||
className='form-horizontal'
|
||||
role='form'
|
||||
>
|
||||
|
||||
<div className='form-group'>
|
||||
<label
|
||||
className='control-label col-sm-4'
|
||||
@@ -143,10 +142,10 @@ class GitLabSettings extends React.Component {
|
||||
defaultChecked={this.props.config.GitLabSettings.Enable}
|
||||
onChange={this.handleChange.bind(this, 'EnableTrue')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.gitlab.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.gitlab.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -156,10 +155,10 @@ class GitLabSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.GitLabSettings.Enable}
|
||||
onChange={this.handleChange.bind(this, 'EnableFalse')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.gitlab.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.gitlab.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
|
||||
@@ -592,10 +592,10 @@ class FileSettings extends React.Component {
|
||||
defaultChecked={this.props.config.FileSettings.EnablePublicLink}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.image.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.image.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -605,10 +605,10 @@ class FileSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.FileSettings.EnablePublicLink}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.image.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.image.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -689,4 +689,4 @@ FileSettings.propTypes = {
|
||||
config: React.PropTypes.object
|
||||
};
|
||||
|
||||
export default injectIntl(FileSettings);
|
||||
export default injectIntl(FileSettings);
|
||||
|
||||
@@ -152,6 +152,7 @@ class LicenseSettings extends React.Component {
|
||||
{'Mattermost Enterprise Edition. Unlock enterprise features in this software through the purchase of a subscription from '}
|
||||
<a
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
href='https://mattermost.com/'
|
||||
>
|
||||
{'https://mattermost.com/'}
|
||||
|
||||
@@ -143,10 +143,10 @@ class LogSettings extends React.Component {
|
||||
defaultChecked={this.props.config.LogSettings.EnableConsole}
|
||||
onChange={this.handleChange.bind(this, 'console_true')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.log.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.log.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -156,10 +156,10 @@ class LogSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.LogSettings.EnableConsole}
|
||||
onChange={this.handleChange.bind(this, 'console_false')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.log.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.log.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -221,10 +221,10 @@ class LogSettings extends React.Component {
|
||||
defaultChecked={this.props.config.LogSettings.EnableFile}
|
||||
onChange={this.handleChange.bind(this, 'file_true')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.log.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.log.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -234,10 +234,10 @@ class LogSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.LogSettings.EnableFile}
|
||||
onChange={this.handleChange.bind(this, 'file_false')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.log.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.log.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -415,4 +415,4 @@ LogSettings.propTypes = {
|
||||
config: React.PropTypes.object
|
||||
};
|
||||
|
||||
export default injectIntl(LogSettings);
|
||||
export default injectIntl(LogSettings);
|
||||
|
||||
@@ -108,10 +108,10 @@ class PrivacySettings extends React.Component {
|
||||
defaultChecked={this.props.config.PrivacySettings.ShowEmailAddress}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.privacy.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.privacy.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -121,10 +121,10 @@ class PrivacySettings extends React.Component {
|
||||
defaultChecked={!this.props.config.PrivacySettings.ShowEmailAddress}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.privacy.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.privacy.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -155,10 +155,10 @@ class PrivacySettings extends React.Component {
|
||||
defaultChecked={this.props.config.PrivacySettings.ShowFullName}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.privacy.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.privacy.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -168,10 +168,10 @@ class PrivacySettings extends React.Component {
|
||||
defaultChecked={!this.props.config.PrivacySettings.ShowFullName}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.privacy.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.privacy.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -212,4 +212,4 @@ PrivacySettings.propTypes = {
|
||||
config: React.PropTypes.object
|
||||
};
|
||||
|
||||
export default injectIntl(PrivacySettings);
|
||||
export default injectIntl(PrivacySettings);
|
||||
|
||||
@@ -172,10 +172,10 @@ class RateSettings extends React.Component {
|
||||
defaultChecked={this.props.config.RateLimitSettings.EnableRateLimiter}
|
||||
onChange={this.handleChange.bind(this, 'EnableRateLimiterTrue')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.rate.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.rate.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -185,10 +185,10 @@ class RateSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.RateLimitSettings.EnableRateLimiter}
|
||||
onChange={this.handleChange.bind(this, 'EnableRateLimiterFalse')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.rate.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.rate.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -280,10 +280,10 @@ class RateSettings extends React.Component {
|
||||
onChange={this.handleChange.bind(this, 'VaryByRemoteAddrTrue')}
|
||||
disabled={!this.state.EnableRateLimiter}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.rate.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.rate.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -294,10 +294,10 @@ class RateSettings extends React.Component {
|
||||
onChange={this.handleChange.bind(this, 'VaryByRemoteAddrFalse')}
|
||||
disabled={!this.state.EnableRateLimiter}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.rate.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.rate.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -368,4 +368,4 @@ RateSettings.propTypes = {
|
||||
config: React.PropTypes.object
|
||||
};
|
||||
|
||||
export default injectIntl(RateSettings);
|
||||
export default injectIntl(RateSettings);
|
||||
|
||||
@@ -379,10 +379,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={this.props.config.ServiceSettings.EnableIncomingWebhooks}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -392,10 +392,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.ServiceSettings.EnableIncomingWebhooks}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -426,10 +426,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={this.props.config.ServiceSettings.EnableOutgoingWebhooks}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -439,10 +439,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.ServiceSettings.EnableOutgoingWebhooks}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -473,10 +473,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={this.props.config.ServiceSettings.EnableCommands}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -486,10 +486,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.ServiceSettings.EnableCommands}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -520,10 +520,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={this.props.config.ServiceSettings.EnableOnlyAdminIntegrations}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -533,10 +533,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.ServiceSettings.EnableOnlyAdminIntegrations}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -567,10 +567,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={this.props.config.ServiceSettings.EnablePostUsernameOverride}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -580,10 +580,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.ServiceSettings.EnablePostUsernameOverride}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -594,7 +594,7 @@ class ServiceSettings extends React.Component {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className='form-group'>
|
||||
<div className='form-group'>
|
||||
<label
|
||||
className='control-label col-sm-4'
|
||||
htmlFor='EnablePostIconOverride'
|
||||
@@ -614,10 +614,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={this.props.config.ServiceSettings.EnablePostIconOverride}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -627,10 +627,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.ServiceSettings.EnablePostIconOverride}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -661,10 +661,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={this.props.config.ServiceSettings.EnableTesting}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -674,10 +674,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.ServiceSettings.EnableTesting}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -708,10 +708,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={this.props.config.ServiceSettings.EnableDeveloper}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -721,10 +721,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.ServiceSettings.EnableDeveloper}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -755,10 +755,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={this.props.config.ServiceSettings.EnableSecurityFixAlert}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -768,10 +768,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.ServiceSettings.EnableSecurityFixAlert}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -802,10 +802,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={this.props.config.ServiceSettings.EnableInsecureOutgoingConnections}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -815,10 +815,10 @@ class ServiceSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.ServiceSettings.EnableInsecureOutgoingConnections}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.service.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
|
||||
@@ -330,10 +330,10 @@ class SqlSettings extends React.Component {
|
||||
defaultChecked={this.props.config.SqlSettings.Trace}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.sql.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.sql.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -343,10 +343,10 @@ class SqlSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.SqlSettings.Trace}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.sql.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.sql.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -387,4 +387,4 @@ SqlSettings.propTypes = {
|
||||
config: React.PropTypes.object
|
||||
};
|
||||
|
||||
export default injectIntl(SqlSettings);
|
||||
export default injectIntl(SqlSettings);
|
||||
|
||||
@@ -473,10 +473,10 @@ class TeamSettings extends React.Component {
|
||||
defaultChecked={this.props.config.TeamSettings.EnableTeamCreation}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -486,10 +486,10 @@ class TeamSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.TeamSettings.EnableTeamCreation}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -520,10 +520,10 @@ class TeamSettings extends React.Component {
|
||||
defaultChecked={this.props.config.TeamSettings.EnableUserCreation}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -533,10 +533,10 @@ class TeamSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.TeamSettings.EnableUserCreation}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -567,10 +567,10 @@ class TeamSettings extends React.Component {
|
||||
defaultChecked={this.props.config.TeamSettings.EnableOpenServer}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -580,10 +580,10 @@ class TeamSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.TeamSettings.EnableOpenServer}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
@@ -643,10 +643,10 @@ class TeamSettings extends React.Component {
|
||||
defaultChecked={this.props.config.TeamSettings.RestrictTeamNames}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.true'
|
||||
defaultMessage='true'
|
||||
/>
|
||||
</label>
|
||||
<label className='radio-inline'>
|
||||
<input
|
||||
@@ -656,10 +656,10 @@ class TeamSettings extends React.Component {
|
||||
defaultChecked={!this.props.config.TeamSettings.RestrictTeamNames}
|
||||
onChange={this.handleChange}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='admin.team.false'
|
||||
defaultMessage='false'
|
||||
/>
|
||||
</label>
|
||||
<p className='help-text'>
|
||||
<FormattedMessage
|
||||
|
||||
@@ -224,8 +224,8 @@ export default class UserItem extends React.Component {
|
||||
let showMakeSystemAdmin = user.roles === '' || user.roles === 'admin';
|
||||
let showMakeActive = false;
|
||||
let showMakeNotActive = user.roles !== 'system_admin';
|
||||
let mfaEnabled = global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.MFA === 'true' && global.window.mm_config.EnableMultifactorAuthentication === 'true';
|
||||
let showMfaReset = mfaEnabled && user.mfa_active;
|
||||
const mfaEnabled = global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.MFA === 'true' && global.window.mm_config.EnableMultifactorAuthentication === 'true';
|
||||
const showMfaReset = mfaEnabled && user.mfa_active;
|
||||
|
||||
if (user.delete_at > 0) {
|
||||
currentRoles = (
|
||||
|
||||
@@ -7,7 +7,7 @@ import React from 'react';
|
||||
|
||||
export default class StatisticCount extends React.Component {
|
||||
render() {
|
||||
let loading = (
|
||||
const loading = (
|
||||
<FormattedMessage
|
||||
id='analytics.chart.loading'
|
||||
defaultMessage='Loading...'
|
||||
|
||||
@@ -4,13 +4,12 @@
|
||||
import React from 'react';
|
||||
|
||||
import * as AsyncClient from 'utils/async_client.jsx';
|
||||
import {browserHistory} from 'react-router';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
import BackstageHeader from './backstage_header.jsx';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import FormError from 'components/form_error.jsx';
|
||||
import {Link} from 'react-router';
|
||||
import {browserHistory, Link} from 'react-router';
|
||||
import SpinnerButton from 'components/spinner_button.jsx';
|
||||
|
||||
const REQUEST_POST = 'P';
|
||||
|
||||
@@ -4,14 +4,13 @@
|
||||
import React from 'react';
|
||||
|
||||
import * as AsyncClient from 'utils/async_client.jsx';
|
||||
import {browserHistory} from 'react-router';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
import BackstageHeader from './backstage_header.jsx';
|
||||
import ChannelSelect from 'components/channel_select.jsx';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import FormError from 'components/form_error.jsx';
|
||||
import {Link} from 'react-router';
|
||||
import {browserHistory, Link} from 'react-router';
|
||||
import SpinnerButton from 'components/spinner_button.jsx';
|
||||
|
||||
export default class AddIncomingWebhook extends React.Component {
|
||||
|
||||
@@ -4,14 +4,13 @@
|
||||
import React from 'react';
|
||||
|
||||
import * as AsyncClient from 'utils/async_client.jsx';
|
||||
import {browserHistory} from 'react-router';
|
||||
import * as Utils from 'utils/utils.jsx';
|
||||
|
||||
import BackstageHeader from './backstage_header.jsx';
|
||||
import ChannelSelect from 'components/channel_select.jsx';
|
||||
import {FormattedMessage} from 'react-intl';
|
||||
import FormError from 'components/form_error.jsx';
|
||||
import {Link} from 'react-router';
|
||||
import {browserHistory, Link} from 'react-router';
|
||||
import SpinnerButton from 'components/spinner_button.jsx';
|
||||
|
||||
export default class AddOutgoingWebhook extends React.Component {
|
||||
|
||||
@@ -478,11 +478,11 @@ export default class ChannelHeader extends React.Component {
|
||||
overlay={popoverContent}
|
||||
ref='headerOverlay'
|
||||
>
|
||||
<div
|
||||
onClick={TextFormatting.handleClick}
|
||||
className='description'
|
||||
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(channel.header, {singleline: true, mentionHighlight: false})}}
|
||||
/>
|
||||
<div
|
||||
onClick={TextFormatting.handleClick}
|
||||
className='description'
|
||||
dangerouslySetInnerHTML={{__html: TextFormatting.formatText(channel.header, {singleline: true, mentionHighlight: false})}}
|
||||
/>
|
||||
</OverlayTrigger>
|
||||
</div>
|
||||
</th>
|
||||
|
||||
@@ -289,10 +289,10 @@ export default class ChannelNotificationsModal extends React.Component {
|
||||
checked={this.state.unreadLevel === 'all'}
|
||||
onChange={this.handleUpdateMarkUnreadLevel.bind(this, 'all')}
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='channel_notifications.allUnread'
|
||||
defaultMessage='For all unread messages'
|
||||
/>
|
||||
<FormattedMessage
|
||||
id='channel_notifications.allUnread'
|
||||
defaultMessage='For all unread messages'
|
||||
/>
|
||||
</label>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
@@ -112,7 +112,7 @@ class CreateComment extends React.Component {
|
||||
return;
|
||||
}
|
||||
|
||||
let post = {};
|
||||
const post = {};
|
||||
post.filenames = [];
|
||||
post.message = this.state.messageText;
|
||||
|
||||
@@ -145,7 +145,7 @@ class CreateComment extends React.Component {
|
||||
AsyncClient.getPosts(this.props.channelId);
|
||||
|
||||
const channel = ChannelStore.get(this.props.channelId);
|
||||
let member = ChannelStore.getMember(this.props.channelId);
|
||||
const member = ChannelStore.getMember(this.props.channelId);
|
||||
member.msg_count = channel.total_msg_count;
|
||||
member.last_viewed_at = Date.now();
|
||||
ChannelStore.setChannelMember(member);
|
||||
@@ -192,7 +192,7 @@ class CreateComment extends React.Component {
|
||||
GlobalActions.emitLocalUserTypingEvent(this.props.channelId, this.props.rootId);
|
||||
}
|
||||
handleUserInput(messageText) {
|
||||
let draft = PostStore.getCommentDraft(this.props.rootId);
|
||||
const draft = PostStore.getCommentDraft(this.props.rootId);
|
||||
draft.message = messageText;
|
||||
PostStore.storeCommentDraft(this.props.rootId, draft);
|
||||
|
||||
@@ -240,7 +240,7 @@ class CreateComment extends React.Component {
|
||||
this.focusTextbox();
|
||||
}
|
||||
handleUploadStart(clientIds) {
|
||||
let draft = PostStore.getCommentDraft(this.props.rootId);
|
||||
const draft = PostStore.getCommentDraft(this.props.rootId);
|
||||
|
||||
draft.uploadsInProgress = draft.uploadsInProgress.concat(clientIds);
|
||||
PostStore.storeCommentDraft(this.props.rootId, draft);
|
||||
@@ -252,7 +252,7 @@ class CreateComment extends React.Component {
|
||||
this.focusTextbox();
|
||||
}
|
||||
handleFileUploadComplete(filenames, clientIds) {
|
||||
let draft = PostStore.getCommentDraft(this.props.rootId);
|
||||
const draft = PostStore.getCommentDraft(this.props.rootId);
|
||||
|
||||
// remove each finished file from uploads
|
||||
for (let i = 0; i < clientIds.length; i++) {
|
||||
@@ -272,7 +272,7 @@ class CreateComment extends React.Component {
|
||||
if (clientId === -1) {
|
||||
this.setState({serverError: err});
|
||||
} else {
|
||||
let draft = PostStore.getCommentDraft(this.props.rootId);
|
||||
const draft = PostStore.getCommentDraft(this.props.rootId);
|
||||
|
||||
const index = draft.uploadsInProgress.indexOf(clientId);
|
||||
if (index !== -1) {
|
||||
@@ -285,8 +285,8 @@ class CreateComment extends React.Component {
|
||||
}
|
||||
}
|
||||
removePreview(id) {
|
||||
let previews = this.state.previews;
|
||||
let uploadsInProgress = this.state.uploadsInProgress;
|
||||
const previews = this.state.previews;
|
||||
const uploadsInProgress = this.state.uploadsInProgress;
|
||||
|
||||
// id can either be the path of an uploaded file or the client id of an in progress upload
|
||||
let index = previews.indexOf(id);
|
||||
@@ -301,7 +301,7 @@ class CreateComment extends React.Component {
|
||||
previews.splice(index, 1);
|
||||
}
|
||||
|
||||
let draft = PostStore.getCommentDraft(this.props.rootId);
|
||||
const draft = PostStore.getCommentDraft(this.props.rootId);
|
||||
draft.previews = previews;
|
||||
draft.uploadsInProgress = uploadsInProgress;
|
||||
PostStore.storeCommentDraft(this.props.rootId, draft);
|
||||
|
||||
@@ -81,7 +81,7 @@ export default class ErrorBar extends React.Component {
|
||||
className='error-bar__close'
|
||||
onClick={this.handleClose}
|
||||
>
|
||||
×
|
||||
{'×'}
|
||||
</a>
|
||||
</div>
|
||||
);
|
||||
|
||||
@@ -149,12 +149,12 @@ class FileAttachment extends React.Component {
|
||||
if (this.state.fileSize < 0) {
|
||||
Client.getFileInfo(
|
||||
filename,
|
||||
function success(data) {
|
||||
(data) => {
|
||||
if (this.canSetState) {
|
||||
this.setState({fileSize: parseInt(data.size, 10)});
|
||||
}
|
||||
}.bind(this),
|
||||
function error() {
|
||||
},
|
||||
() => {
|
||||
// Do nothing
|
||||
}
|
||||
);
|
||||
@@ -175,7 +175,8 @@ class FileAttachment extends React.Component {
|
||||
className='post-image__column'
|
||||
key={filename}
|
||||
>
|
||||
<a className='post-image__thumbnail'
|
||||
<a
|
||||
className='post-image__thumbnail'
|
||||
href='#'
|
||||
onClick={() => this.props.handleImageClick(this.props.index)}
|
||||
>
|
||||
@@ -186,9 +187,10 @@ class FileAttachment extends React.Component {
|
||||
href={fileUrl}
|
||||
download={filenameString}
|
||||
data-toggle='tooltip'
|
||||
title={this.props.intl.formatMessage(holders.download) + ' \"' + filenameString + '\"'}
|
||||
title={this.props.intl.formatMessage(holders.download) + ' "' + filenameString + '"'}
|
||||
className='post-image__name'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
{trimmedFilename}
|
||||
</a>
|
||||
@@ -198,6 +200,7 @@ class FileAttachment extends React.Component {
|
||||
download={filenameString}
|
||||
className='post-image__download'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
<span
|
||||
className='fa fa-download'
|
||||
|
||||
@@ -38,6 +38,7 @@ export default function FileInfoPreview({filename, fileUrl, fileInfo, formatMess
|
||||
className={'file-details__preview'}
|
||||
to={fileUrl}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
<span className='file-details__preview-helper'/>
|
||||
<img src={Utils.getPreviewImagePath(filename)}/>
|
||||
|
||||
@@ -33,8 +33,8 @@ export default class NotLoggedIn extends React.Component {
|
||||
id='help_link'
|
||||
className='pull-right footer-link'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
href={global.window.mm_config.HelpLink}
|
||||
rel='noreferrer'
|
||||
>
|
||||
<FormattedMessage id='web.footer.help'/>
|
||||
</a>
|
||||
@@ -42,8 +42,8 @@ export default class NotLoggedIn extends React.Component {
|
||||
id='terms_link'
|
||||
className='pull-right footer-link'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
href={global.window.mm_config.TermsOfServiceLink}
|
||||
rel='noreferrer'
|
||||
>
|
||||
<FormattedMessage id='web.footer.terms'/>
|
||||
</a>
|
||||
@@ -51,8 +51,8 @@ export default class NotLoggedIn extends React.Component {
|
||||
id='privacy_link'
|
||||
className='pull-right footer-link'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
href={global.window.mm_config.PrivacyPolicyLink}
|
||||
rel='noreferrer'
|
||||
>
|
||||
<FormattedMessage id='web.footer.privacy'/>
|
||||
</a>
|
||||
@@ -60,8 +60,8 @@ export default class NotLoggedIn extends React.Component {
|
||||
id='about_link'
|
||||
className='pull-right footer-link'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
href={global.window.mm_config.AboutLink}
|
||||
rel='noreferrer'
|
||||
>
|
||||
<FormattedMessage id='web.footer.about'/>
|
||||
</a>
|
||||
|
||||
@@ -258,15 +258,17 @@ class InviteMemberModal extends React.Component {
|
||||
|
||||
var removeButton = null;
|
||||
if (index) {
|
||||
removeButton = (<div>
|
||||
<button
|
||||
type='button'
|
||||
className='btn btn-link remove__member'
|
||||
onClick={this.removeInviteFields.bind(this, index)}
|
||||
>
|
||||
<span className='fa fa-trash'></span>
|
||||
</button>
|
||||
</div>);
|
||||
removeButton = (
|
||||
<div>
|
||||
<button
|
||||
type='button'
|
||||
className='btn btn-link remove__member'
|
||||
onClick={this.removeInviteFields.bind(this, index)}
|
||||
>
|
||||
<span className='fa fa-trash'></span>
|
||||
</button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
var emailClass = 'form-group invite';
|
||||
if (emailError) {
|
||||
@@ -283,54 +285,56 @@ class InviteMemberModal extends React.Component {
|
||||
if (lastNameError) {
|
||||
lastNameClass += ' has-error';
|
||||
}
|
||||
nameFields = (<div className='row--invite'>
|
||||
<div className='col-sm-6'>
|
||||
<div className={firstNameClass}>
|
||||
<input
|
||||
type='text'
|
||||
className='form-control'
|
||||
ref={'first_name' + index}
|
||||
placeholder={formatMessage(holders.firstname)}
|
||||
maxLength='64'
|
||||
disabled={!this.state.emailEnabled || !this.state.userCreationEnabled}
|
||||
spellCheck='false'
|
||||
/>
|
||||
{firstNameError}
|
||||
</div>
|
||||
</div>
|
||||
<div className='col-sm-6'>
|
||||
<div className={lastNameClass}>
|
||||
<input
|
||||
type='text'
|
||||
className='form-control'
|
||||
ref={'last_name' + index}
|
||||
placeholder={formatMessage(holders.lastname)}
|
||||
maxLength='64'
|
||||
disabled={!this.state.emailEnabled || !this.state.userCreationEnabled}
|
||||
spellCheck='false'
|
||||
/>
|
||||
{lastNameError}
|
||||
</div>
|
||||
</div>
|
||||
</div>);
|
||||
nameFields = (
|
||||
<div className='row--invite'>
|
||||
<div className='col-sm-6'>
|
||||
<div className={firstNameClass}>
|
||||
<input
|
||||
type='text'
|
||||
className='form-control'
|
||||
ref={'first_name' + index}
|
||||
placeholder={formatMessage(holders.firstname)}
|
||||
maxLength='64'
|
||||
disabled={!this.state.emailEnabled || !this.state.userCreationEnabled}
|
||||
spellCheck='false'
|
||||
/>
|
||||
{firstNameError}
|
||||
</div>
|
||||
</div>
|
||||
<div className='col-sm-6'>
|
||||
<div className={lastNameClass}>
|
||||
<input
|
||||
type='text'
|
||||
className='form-control'
|
||||
ref={'last_name' + index}
|
||||
placeholder={formatMessage(holders.lastname)}
|
||||
maxLength='64'
|
||||
disabled={!this.state.emailEnabled || !this.state.userCreationEnabled}
|
||||
spellCheck='false'
|
||||
/>
|
||||
{lastNameError}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
inviteSections[index] = (
|
||||
<div key={'key' + index}>
|
||||
{removeButton}
|
||||
<div className={emailClass}>
|
||||
<input
|
||||
onKeyUp={this.displayNameKeyUp}
|
||||
type='text'
|
||||
ref={'email' + index}
|
||||
className='form-control'
|
||||
placeholder='email@domain.com'
|
||||
maxLength='64'
|
||||
disabled={!this.state.emailEnabled || !this.state.userCreationEnabled}
|
||||
spellCheck='false'
|
||||
/>
|
||||
{emailError}
|
||||
</div>
|
||||
{nameFields}
|
||||
{removeButton}
|
||||
<div className={emailClass}>
|
||||
<input
|
||||
onKeyUp={this.displayNameKeyUp}
|
||||
type='text'
|
||||
ref={'email' + index}
|
||||
className='form-control'
|
||||
placeholder='email@domain.com'
|
||||
maxLength='64'
|
||||
disabled={!this.state.emailEnabled || !this.state.userCreationEnabled}
|
||||
spellCheck='false'
|
||||
/>
|
||||
{emailError}
|
||||
</div>
|
||||
{nameFields}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -235,8 +235,8 @@ export default class NavbarDropdown extends React.Component {
|
||||
<li>
|
||||
<Link
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
to={global.window.mm_config.HelpLink}
|
||||
rel='noreferrer'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='navbar_dropdown.help'
|
||||
@@ -253,8 +253,8 @@ export default class NavbarDropdown extends React.Component {
|
||||
<li>
|
||||
<Link
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
to={global.window.mm_config.ReportAProblemLink}
|
||||
rel='noreferrer'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='navbar_dropdown.report'
|
||||
|
||||
@@ -59,7 +59,7 @@ class PostAttachment extends React.Component {
|
||||
toggleCollapseState(e) {
|
||||
e.preventDefault();
|
||||
|
||||
let state = this.state;
|
||||
const state = this.state;
|
||||
state.text = state.collapsed ? state.uncollapsedText : state.collapsedText;
|
||||
state.collapsed = !state.collapsed;
|
||||
this.setState(state);
|
||||
@@ -142,22 +142,22 @@ class PostAttachment extends React.Component {
|
||||
});
|
||||
if (headerCols.length > 0) { // Flush last fields
|
||||
fieldTables.push(
|
||||
<table
|
||||
className='attachment___fields'
|
||||
key={'attachment__table__' + nrTables}
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
<table
|
||||
className='attachment___fields'
|
||||
key={'attachment__table__' + nrTables}
|
||||
>
|
||||
<thead>
|
||||
<tr>
|
||||
{headerCols}
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
{bodyCols}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
);
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
{bodyCols}
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
);
|
||||
}
|
||||
return (
|
||||
<div>
|
||||
@@ -209,6 +209,7 @@ class PostAttachment extends React.Component {
|
||||
<a
|
||||
href={data.author_link}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
{author}
|
||||
</a>
|
||||
@@ -226,6 +227,7 @@ class PostAttachment extends React.Component {
|
||||
className='attachment__title-link'
|
||||
href={data.title_link}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
{data.title}
|
||||
</a>
|
||||
|
||||
@@ -72,30 +72,31 @@ export default class PostAttachmentOEmbed extends React.Component {
|
||||
className='attachment attachment--oembed'
|
||||
ref='attachment'
|
||||
>
|
||||
<div className='attachment__content'>
|
||||
<div
|
||||
className={'clearfix attachment__container'}
|
||||
<div className='attachment__content'>
|
||||
<div
|
||||
className={'clearfix attachment__container'}
|
||||
>
|
||||
<h1
|
||||
className='attachment__title'
|
||||
>
|
||||
<h1
|
||||
className='attachment__title'
|
||||
<a
|
||||
className='attachment__title-link'
|
||||
href={data.url}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
<a
|
||||
className='attachment__title-link'
|
||||
href={data.url}
|
||||
target='_blank'
|
||||
>
|
||||
{data.title}
|
||||
</a>
|
||||
</h1>
|
||||
<div >
|
||||
<div
|
||||
className={'attachment__body attachment__body--no_thumb'}
|
||||
>
|
||||
{content}
|
||||
</div>
|
||||
{data.title}
|
||||
</a>
|
||||
</h1>
|
||||
<div >
|
||||
<div
|
||||
className={'attachment__body attachment__body--no_thumb'}
|
||||
>
|
||||
{content}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -120,7 +120,8 @@ export default class PostBodyAdditionalContent extends React.Component {
|
||||
let toggle;
|
||||
if (Utils.isFeatureEnabled(Constants.PRE_RELEASE_FEATURES.EMBED_TOGGLE)) {
|
||||
toggle = (
|
||||
<a className='post__embed-visibility'
|
||||
<a
|
||||
className='post__embed-visibility'
|
||||
data-expanded={this.state.embedVisible}
|
||||
aria-label='Toggle Embed Visibility'
|
||||
onClick={this.toggleEmbedVisibility}
|
||||
@@ -131,7 +132,8 @@ export default class PostBodyAdditionalContent extends React.Component {
|
||||
return (
|
||||
<div>
|
||||
{toggle}
|
||||
<div className='post__embed-container'
|
||||
<div
|
||||
className='post__embed-container'
|
||||
hidden={!this.state.embedVisible}
|
||||
>
|
||||
{generateEmbed}
|
||||
|
||||
@@ -98,7 +98,11 @@ export default class RemovedFromChannelModal extends React.Component {
|
||||
className='close'
|
||||
data-dismiss='modal'
|
||||
aria-label='Close'
|
||||
><span aria-hidden='true'>×</span></button>
|
||||
>
|
||||
<span aria-hidden='true'>
|
||||
{'×'}
|
||||
</span>
|
||||
</button>
|
||||
<h4 className='modal-title'>
|
||||
<FormattedMessage
|
||||
id='removed_channel.from'
|
||||
@@ -107,16 +111,16 @@ export default class RemovedFromChannelModal extends React.Component {
|
||||
<span className='name'>{channelName}</span></h4>
|
||||
</div>
|
||||
<div className='modal-body'>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id='removed_channel.remover'
|
||||
defaultMessage='{remover} removed you from {channel}'
|
||||
values={{
|
||||
remover: (remover),
|
||||
channel: (channelName)
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id='removed_channel.remover'
|
||||
defaultMessage='{remover} removed you from {channel}'
|
||||
values={{
|
||||
remover: (remover),
|
||||
channel: (channelName)
|
||||
}}
|
||||
/>
|
||||
</p>
|
||||
</div>
|
||||
<div className='modal-footer'>
|
||||
<button
|
||||
|
||||
@@ -23,7 +23,7 @@ export default class SettingsSidebar extends React.Component {
|
||||
}
|
||||
}
|
||||
render() {
|
||||
let tabList = this.props.tabs.map(function makeTab(tab) {
|
||||
let tabList = this.props.tabs.map((tab) => {
|
||||
let key = `${tab.name}_li`;
|
||||
let className = '';
|
||||
if (this.props.activeTab === tab.name) {
|
||||
@@ -44,7 +44,7 @@ export default class SettingsSidebar extends React.Component {
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
}.bind(this));
|
||||
});
|
||||
|
||||
return (
|
||||
<div>
|
||||
|
||||
@@ -640,13 +640,13 @@ export default class Sidebar extends React.Component {
|
||||
placement='top'
|
||||
overlay={createChannelTootlip}
|
||||
>
|
||||
<a
|
||||
className='add-channel-btn'
|
||||
href='#'
|
||||
onClick={this.showNewChannelModal.bind(this, 'O')}
|
||||
>
|
||||
{'+'}
|
||||
</a>
|
||||
<a
|
||||
className='add-channel-btn'
|
||||
href='#'
|
||||
onClick={this.showNewChannelModal.bind(this, 'O')}
|
||||
>
|
||||
{'+'}
|
||||
</a>
|
||||
</OverlayTrigger>
|
||||
</h4>
|
||||
</li>
|
||||
@@ -677,13 +677,13 @@ export default class Sidebar extends React.Component {
|
||||
placement='top'
|
||||
overlay={createGroupTootlip}
|
||||
>
|
||||
<a
|
||||
className='add-channel-btn'
|
||||
href='#'
|
||||
onClick={this.showNewChannelModal.bind(this, 'P')}
|
||||
>
|
||||
{'+'}
|
||||
</a>
|
||||
<a
|
||||
className='add-channel-btn'
|
||||
href='#'
|
||||
onClick={this.showNewChannelModal.bind(this, 'P')}
|
||||
>
|
||||
{'+'}
|
||||
</a>
|
||||
</OverlayTrigger>
|
||||
</h4>
|
||||
</li>
|
||||
|
||||
@@ -89,7 +89,7 @@ export default class SidebarHeader extends React.Component {
|
||||
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>
|
||||
</a>
|
||||
|
||||
@@ -174,8 +174,8 @@ export default class SidebarRightMenu extends React.Component {
|
||||
<li>
|
||||
<Link
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
to={global.window.mm_config.HelpLink}
|
||||
rel='noreferrer'
|
||||
>
|
||||
<i className='fa fa-question'></i>
|
||||
<FormattedMessage
|
||||
@@ -193,8 +193,8 @@ export default class SidebarRightMenu extends React.Component {
|
||||
<li>
|
||||
<Link
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
to={global.window.mm_config.ReportAProblemLink}
|
||||
rel='noreferrer'
|
||||
>
|
||||
<i className='fa fa-phone'></i>
|
||||
<FormattedMessage
|
||||
|
||||
@@ -198,6 +198,33 @@ export default class SignupUserComplete extends React.Component {
|
||||
);
|
||||
}
|
||||
|
||||
handleUserCreated(user, data) {
|
||||
Client.track('signup', 'signup_user_02_complete');
|
||||
Client.loginById(
|
||||
data.id,
|
||||
user.password,
|
||||
'',
|
||||
() => {
|
||||
if (this.state.hash > 0) {
|
||||
BrowserStore.setGlobalItem(this.state.hash, JSON.stringify({usedBefore: true}));
|
||||
}
|
||||
|
||||
GlobalActions.emitInitialLoad(
|
||||
() => {
|
||||
browserHistory.push('/select_team');
|
||||
}
|
||||
);
|
||||
},
|
||||
(err) => {
|
||||
if (err.id === 'api.user.login.not_verified.app_error') {
|
||||
browserHistory.push('/should_verify_email?email=' + encodeURIComponent(user.email) + '&teamname=' + encodeURIComponent(this.state.teamName));
|
||||
} else {
|
||||
this.setState({serverError: err.message});
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
|
||||
@@ -296,32 +323,7 @@ export default class SignupUserComplete extends React.Component {
|
||||
this.state.data,
|
||||
this.state.hash,
|
||||
this.state.inviteId,
|
||||
(data) => {
|
||||
Client.track('signup', 'signup_user_02_complete');
|
||||
Client.loginById(
|
||||
data.id,
|
||||
user.password,
|
||||
'',
|
||||
() => {
|
||||
if (this.state.hash > 0) {
|
||||
BrowserStore.setGlobalItem(this.state.hash, JSON.stringify({usedBefore: true}));
|
||||
}
|
||||
|
||||
GlobalActions.emitInitialLoad(
|
||||
() => {
|
||||
browserHistory.push('/select_team');
|
||||
}
|
||||
);
|
||||
},
|
||||
(err) => {
|
||||
if (err.id === 'api.user.login.not_verified.app_error') {
|
||||
browserHistory.push('/should_verify_email?email=' + encodeURIComponent(user.email) + '&teamname=' + encodeURIComponent(this.state.teamName));
|
||||
} else {
|
||||
this.setState({serverError: err.message});
|
||||
}
|
||||
}
|
||||
);
|
||||
},
|
||||
this.handleUserCreated.bind(this, user),
|
||||
(err) => {
|
||||
this.setState({serverError: err.message});
|
||||
}
|
||||
|
||||
@@ -473,7 +473,9 @@ class GeneralTab extends React.Component {
|
||||
data-dismiss='modal'
|
||||
aria-label='Close'
|
||||
>
|
||||
<span aria-hidden='true'>×</span>
|
||||
<span aria-hidden='true'>
|
||||
{'×'}
|
||||
</span>
|
||||
</button>
|
||||
<h4
|
||||
className='modal-title'
|
||||
@@ -518,4 +520,4 @@ GeneralTab.propTypes = {
|
||||
activeSection: React.PropTypes.string.isRequired
|
||||
};
|
||||
|
||||
export default injectIntl(GeneralTab);
|
||||
export default injectIntl(GeneralTab);
|
||||
|
||||
@@ -123,7 +123,8 @@ class TeamImportTab extends React.Component {
|
||||
return (
|
||||
<div>
|
||||
<div className='modal-header'>
|
||||
<button type='button'
|
||||
<button
|
||||
type='button'
|
||||
className='close'
|
||||
data-dismiss='modal'
|
||||
aria-label='Close'
|
||||
|
||||
@@ -92,7 +92,9 @@ class TeamSettingsModal extends React.Component {
|
||||
data-dismiss='modal'
|
||||
aria-label='Close'
|
||||
>
|
||||
<span aria-hidden='true'>×</span>
|
||||
<span aria-hidden='true'>
|
||||
{'×'}
|
||||
</span>
|
||||
</button>
|
||||
<h4
|
||||
className='modal-title'
|
||||
@@ -133,4 +135,4 @@ TeamSettingsModal.propTypes = {
|
||||
intl: intlShape.isRequired
|
||||
};
|
||||
|
||||
export default injectIntl(TeamSettingsModal);
|
||||
export default injectIntl(TeamSettingsModal);
|
||||
|
||||
@@ -211,6 +211,7 @@ export default class Textbox extends React.Component {
|
||||
{previewLink}
|
||||
<a
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
href='http://docs.mattermost.com/help/getting-started/messaging-basics.html'
|
||||
className='textbox-help-link'
|
||||
>
|
||||
|
||||
@@ -25,7 +25,7 @@ export default class ModalToggleButton extends React.Component {
|
||||
}
|
||||
|
||||
render() {
|
||||
const {children, dialogType, dialogProps, onClick, ...props} = this.props; // eslint-disable-line no-use-before-define
|
||||
const {children, dialogType, dialogProps, onClick, ...props} = this.props;
|
||||
|
||||
// allow callers to provide an onClick which will be called before the modal is shown
|
||||
let clickHandler = this.show;
|
||||
@@ -38,7 +38,7 @@ export default class ModalToggleButton extends React.Component {
|
||||
}
|
||||
|
||||
// this assumes that all modals will have a show property and an onHide event
|
||||
const dialog = React.createElement(this.props.dialogType, Object.assign({}, dialogProps, {
|
||||
const dialog = React.createElement(dialogType, Object.assign({}, dialogProps, {
|
||||
show: this.state.show,
|
||||
onHide: () => {
|
||||
this.hide();
|
||||
|
||||
@@ -149,6 +149,7 @@ export default class TutorialIntroScreens extends React.Component {
|
||||
<a
|
||||
href={'mailto:' + global.window.mm_config.SupportEmail}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
{global.window.mm_config.SupportEmail}
|
||||
</a>
|
||||
|
||||
@@ -230,11 +230,11 @@ class CustomThemeChooser extends React.Component {
|
||||
overlay={popoverContent}
|
||||
ref='headerOverlay'
|
||||
>
|
||||
<span className='input-group-addon'>
|
||||
<img
|
||||
src={codeThemeURL}
|
||||
/>
|
||||
</span>
|
||||
<span className='input-group-addon'>
|
||||
<img
|
||||
src={codeThemeURL}
|
||||
/>
|
||||
</span>
|
||||
</OverlayTrigger>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -81,7 +81,7 @@ class ImportThemeModal extends React.Component {
|
||||
theme.mentionHighlightLink = '#2f81b7';
|
||||
theme.codeTheme = 'github';
|
||||
|
||||
let user = UserStore.getCurrentUser();
|
||||
const user = UserStore.getCurrentUser();
|
||||
user.theme_props = theme;
|
||||
|
||||
Client.updateUser(user,
|
||||
|
||||
@@ -59,6 +59,7 @@ export default class PremadeThemeChooser extends React.Component {
|
||||
<a
|
||||
href='http://docs.mattermost.com/help/settings/theme-colors.html#custom-theme-examples'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='user.settings.display.theme.otherThemes'
|
||||
|
||||
@@ -150,13 +150,13 @@ class NotificationsTab extends React.Component {
|
||||
data.channel = this.state.channelKey.toString();
|
||||
|
||||
Client.updateUserNotifyProps(data,
|
||||
function success() {
|
||||
() => {
|
||||
this.props.updateSection('');
|
||||
AsyncClient.getMe();
|
||||
}.bind(this),
|
||||
function failure(err) {
|
||||
},
|
||||
(err) => {
|
||||
this.setState({serverError: err.message});
|
||||
}.bind(this)
|
||||
}
|
||||
);
|
||||
}
|
||||
handleCancel(e) {
|
||||
@@ -254,7 +254,8 @@ class NotificationsTab extends React.Component {
|
||||
<div key='userNotificationLevelOption'>
|
||||
<div className='radio'>
|
||||
<label>
|
||||
<input type='radio'
|
||||
<input
|
||||
type='radio'
|
||||
checked={notifyActive[0]}
|
||||
onChange={this.handleNotifyRadio.bind(this, 'all')}
|
||||
/>
|
||||
@@ -393,8 +394,8 @@ class NotificationsTab extends React.Component {
|
||||
/>
|
||||
</label>
|
||||
<br/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
const extraInfo = (
|
||||
|
||||
@@ -608,11 +608,11 @@ class SecurityTab extends React.Component {
|
||||
const inputs = [];
|
||||
inputs.push(
|
||||
<div key='userSignInOption'>
|
||||
{emailOption}
|
||||
{gitlabOption}
|
||||
<br/>
|
||||
{ldapOption}
|
||||
{googleOption}
|
||||
{emailOption}
|
||||
{gitlabOption}
|
||||
<br/>
|
||||
{ldapOption}
|
||||
{googleOption}
|
||||
</div>
|
||||
);
|
||||
|
||||
|
||||
@@ -212,7 +212,8 @@ export default class ThemeSetting extends React.Component {
|
||||
key='premadeThemeColorLabel'
|
||||
>
|
||||
<label>
|
||||
<input type='radio'
|
||||
<input
|
||||
type='radio'
|
||||
checked={!displayCustom}
|
||||
onChange={this.updateType.bind(this, 'premade')}
|
||||
/>
|
||||
@@ -233,7 +234,8 @@ export default class ThemeSetting extends React.Component {
|
||||
key='customThemeColorLabel'
|
||||
>
|
||||
<label>
|
||||
<input type='radio'
|
||||
<input
|
||||
type='radio'
|
||||
checked={displayCustom}
|
||||
onChange={this.updateType.bind(this, 'custom')}
|
||||
/>
|
||||
|
||||
@@ -404,6 +404,7 @@ function ImagePreview({filename, fileUrl, fileInfo, maxHeight}) {
|
||||
<a
|
||||
href={fileUrl}
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
download={true}
|
||||
>
|
||||
<img
|
||||
|
||||
@@ -54,6 +54,7 @@ export default class ViewImagePopoverBar extends React.Component {
|
||||
download={this.props.filename}
|
||||
className='text'
|
||||
target='_blank'
|
||||
rel='noopener noreferrer'
|
||||
>
|
||||
<FormattedMessage
|
||||
id='view_image_popover.download'
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import $ from 'jquery';
|
||||
import ChannelStore from 'stores/channel_store.jsx';
|
||||
|
||||
const ytRegex = /(?:http|https):\/\/(?:www\.)?(?:(?:youtube\.com\/(?:(?:v\/)|(\/u\/\w\/)|(?:(?:watch|embed\/watch)(?:\/|.*v=))|(?:embed\/)|(?:user\/[^\/]+\/u\/[0-9]\/)))|(?:youtu\.be\/))([^#\&\?]*)/;
|
||||
const ytRegex = /(?:http|https):\/\/(?:www\.)?(?:(?:youtube\.com\/(?:(?:v\/)|(\/u\/\w\/)|(?:(?:watch|embed\/watch)(?:\/|.*v=))|(?:embed\/)|(?:user\/[^\/]+\/u\/[0-9]\/)))|(?:youtu\.be\/))([^#&\?]*)/;
|
||||
|
||||
import React from 'react';
|
||||
import {Link} from 'react-router';
|
||||
|
||||
Ссылка в новой задаче
Block a user