Run linting --fix
This commit is contained in:
parent
c429b13b05
commit
dad797d4a2
34 changed files with 64 additions and 66 deletions
|
@ -303,7 +303,7 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
// Check if user has previously chosen to hide the app drawer for this
|
// Check if user has previously chosen to hide the app drawer for this
|
||||||
// room. If so, do not show apps
|
// room. If so, do not show apps
|
||||||
let hideWidgetDrawer = localStorage.getItem(
|
const hideWidgetDrawer = localStorage.getItem(
|
||||||
room.roomId + "_hide_widget_drawer");
|
room.roomId + "_hide_widget_drawer");
|
||||||
|
|
||||||
if (hideWidgetDrawer === "true") {
|
if (hideWidgetDrawer === "true") {
|
||||||
|
@ -713,7 +713,7 @@ module.exports = React.createClass({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const joinedMembers = room.currentState.getMembers().filter(m => m.membership === "join" || m.membership === "invite");
|
const joinedMembers = room.currentState.getMembers().filter((m) => m.membership === "join" || m.membership === "invite");
|
||||||
this.setState({isAlone: joinedMembers.length === 1});
|
this.setState({isAlone: joinedMembers.length === 1});
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ module.exports = React.createClass({
|
||||||
<div className="mx_Login_smallError">
|
<div className="mx_Login_smallError">
|
||||||
{ _t('Please note you are logging into the %(hs)s server, not matrix.org.',
|
{ _t('Please note you are logging into the %(hs)s server, not matrix.org.',
|
||||||
{
|
{
|
||||||
hs: this.props.defaultHsUrl.replace(/^https?:\/\//, '')
|
hs: this.props.defaultHsUrl.replace(/^https?:\/\//, ''),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@ -393,8 +393,7 @@ module.exports = React.createClass({
|
||||||
const theme = SettingsStore.getValue("theme");
|
const theme = SettingsStore.getValue("theme");
|
||||||
if (theme !== "status") {
|
if (theme !== "status") {
|
||||||
header = <h2>{ _t('Sign in') }</h2>;
|
header = <h2>{ _t('Sign in') }</h2>;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
if (!this.state.errorText) {
|
if (!this.state.errorText) {
|
||||||
header = <h2>{ _t('Sign in to get started') }</h2>;
|
header = <h2>{ _t('Sign in to get started') }</h2>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -399,8 +399,7 @@ module.exports = React.createClass({
|
||||||
// FIXME: remove hardcoded Status team tweaks at some point
|
// FIXME: remove hardcoded Status team tweaks at some point
|
||||||
if (theme === 'status' && this.state.errorText) {
|
if (theme === 'status' && this.state.errorText) {
|
||||||
header = <div className="mx_Login_error">{ this.state.errorText }</div>;
|
header = <div className="mx_Login_error">{ this.state.errorText }</div>;
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
header = <h2>{ _t('Create an account') }</h2>;
|
header = <h2>{ _t('Create an account') }</h2>;
|
||||||
if (this.state.errorText) {
|
if (this.state.errorText) {
|
||||||
errorText = <div className="mx_Login_error">{ this.state.errorText }</div>;
|
errorText = <div className="mx_Login_error">{ this.state.errorText }</div>;
|
||||||
|
|
|
@ -304,7 +304,7 @@ module.exports = React.createClass({
|
||||||
return items[0];
|
return items[0];
|
||||||
} else if (remaining > 0) {
|
} else if (remaining > 0) {
|
||||||
items = items.slice(0, itemLimit);
|
items = items.slice(0, itemLimit);
|
||||||
return _t("%(items)s and %(count)s others", { items: items.join(', '), count: remaining } )
|
return _t("%(items)s and %(count)s others", { items: items.join(', '), count: remaining } );
|
||||||
} else {
|
} else {
|
||||||
const lastItem = items.pop();
|
const lastItem = items.pop();
|
||||||
return _t("%(items)s and %(lastItem)s", { items: items.join(', '), lastItem: lastItem });
|
return _t("%(items)s and %(lastItem)s", { items: items.join(', '), lastItem: lastItem });
|
||||||
|
|
|
@ -146,7 +146,7 @@ class PasswordLogin extends React.Component {
|
||||||
onChange={this.onUsernameChanged}
|
onChange={this.onUsernameChanged}
|
||||||
placeholder={SdkConfig.get().disable_custom_urls ?
|
placeholder={SdkConfig.get().disable_custom_urls ?
|
||||||
_t("Username on %(hs)s", {
|
_t("Username on %(hs)s", {
|
||||||
hs: this.props.hsUrl.replace(/^https?:\/\//, '')
|
hs: this.props.hsUrl.replace(/^https?:\/\//, ''),
|
||||||
}) : _t("User name")}
|
}) : _t("User name")}
|
||||||
value={this.state.username}
|
value={this.state.username}
|
||||||
autoFocus
|
autoFocus
|
||||||
|
|
|
@ -309,9 +309,9 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
|
|
||||||
// url preview settings
|
// url preview settings
|
||||||
let ps = this.saveUrlPreviewSettings();
|
const ps = this.saveUrlPreviewSettings();
|
||||||
if (ps.length > 0) {
|
if (ps.length > 0) {
|
||||||
ps.map(p => promises.push(p));
|
ps.map((p) => promises.push(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
// related groups
|
// related groups
|
||||||
|
@ -584,7 +584,7 @@ module.exports = React.createClass({
|
||||||
const roomState = this.props.room.currentState;
|
const roomState = this.props.room.currentState;
|
||||||
const isEncrypted = cli.isRoomEncrypted(this.props.room.roomId);
|
const isEncrypted = cli.isRoomEncrypted(this.props.room.roomId);
|
||||||
|
|
||||||
let settings = (
|
const settings = (
|
||||||
<SettingsFlag name="blacklistUnverifiedDevices"
|
<SettingsFlag name="blacklistUnverifiedDevices"
|
||||||
level={SettingLevel.ROOM_DEVICE}
|
level={SettingLevel.ROOM_DEVICE}
|
||||||
roomId={this.props.room.roomId}
|
roomId={this.props.room.roomId}
|
||||||
|
@ -747,7 +747,7 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
var tagsSection = null;
|
let tagsSection = null;
|
||||||
if (canSetTag || self.state.tags) {
|
if (canSetTag || self.state.tags) {
|
||||||
tagsSection =
|
tagsSection =
|
||||||
<div className="mx_RoomSettings_tags">
|
<div className="mx_RoomSettings_tags">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue