Actually fix indent lint errors
This commit is contained in:
parent
2344ddd164
commit
f34489e2df
7 changed files with 121 additions and 120 deletions
|
@ -30,7 +30,6 @@ module.exports = {
|
||||||
"@typescript-eslint/ban-ts-comment": "off",
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
|
|
||||||
"quotes": "off",
|
"quotes": "off",
|
||||||
"indent": "off",
|
|
||||||
"no-extra-boolean-cast": "off",
|
"no-extra-boolean-cast": "off",
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
|
|
|
@ -152,7 +152,7 @@ export default class ManageEventIndexDialog extends React.Component<IProps, ISta
|
||||||
crawlerState = _t("Not currently indexing messages for any room.");
|
crawlerState = _t("Not currently indexing messages for any room.");
|
||||||
} else {
|
} else {
|
||||||
crawlerState = (
|
crawlerState = (
|
||||||
_t("Currently indexing: %(currentRoom)s", { currentRoom: this.state.currentRoom })
|
_t("Currently indexing: %(currentRoom)s", { currentRoom: this.state.currentRoom })
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -925,7 +925,7 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
// so that the correct avatar is shown as the text is
|
// so that the correct avatar is shown as the text is
|
||||||
// `$target accepted the invitation for $email`
|
// `$target accepted the invitation for $email`
|
||||||
if (this.props.mxEvent.getContent().third_party_invite) {
|
if (this.props.mxEvent.getContent().third_party_invite) {
|
||||||
member = this.props.mxEvent.target;
|
member = this.props.mxEvent.target;
|
||||||
} else {
|
} else {
|
||||||
member = this.props.mxEvent.sender;
|
member = this.props.mxEvent.sender;
|
||||||
}
|
}
|
||||||
|
@ -942,8 +942,9 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
if (needsSenderProfile) {
|
if (needsSenderProfile) {
|
||||||
if (!this.props.tileShape || this.props.tileShape === 'reply' || this.props.tileShape === 'reply_preview') {
|
if (!this.props.tileShape || this.props.tileShape === 'reply' || this.props.tileShape === 'reply_preview') {
|
||||||
sender = <SenderProfile onClick={this.onSenderProfileClick}
|
sender = <SenderProfile onClick={this.onSenderProfileClick}
|
||||||
mxEvent={this.props.mxEvent}
|
mxEvent={this.props.mxEvent}
|
||||||
enableFlair={this.props.enableFlair} />;
|
enableFlair={this.props.enableFlair}
|
||||||
|
/>;
|
||||||
} else {
|
} else {
|
||||||
sender = <SenderProfile mxEvent={this.props.mxEvent} enableFlair={this.props.enableFlair} />;
|
sender = <SenderProfile mxEvent={this.props.mxEvent} enableFlair={this.props.enableFlair} />;
|
||||||
}
|
}
|
||||||
|
@ -1006,12 +1007,12 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
}
|
}
|
||||||
|
|
||||||
const linkedTimestamp = <a
|
const linkedTimestamp = <a
|
||||||
href={permalink}
|
href={permalink}
|
||||||
onClick={this.onPermalinkClicked}
|
onClick={this.onPermalinkClicked}
|
||||||
aria-label={formatTime(new Date(this.props.mxEvent.getTs()), this.props.isTwelveHour)}
|
aria-label={formatTime(new Date(this.props.mxEvent.getTs()), this.props.isTwelveHour)}
|
||||||
>
|
>
|
||||||
{ timestamp }
|
{ timestamp }
|
||||||
</a>;
|
</a>;
|
||||||
|
|
||||||
const useIRCLayout = this.props.layout == Layout.IRC;
|
const useIRCLayout = this.props.layout == Layout.IRC;
|
||||||
const groupTimestamp = !useIRCLayout ? linkedTimestamp : null;
|
const groupTimestamp = !useIRCLayout ? linkedTimestamp : null;
|
||||||
|
@ -1049,11 +1050,12 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
</div>
|
</div>
|
||||||
<div className="mx_EventTile_line">
|
<div className="mx_EventTile_line">
|
||||||
<EventTileType ref={this._tile}
|
<EventTileType ref={this._tile}
|
||||||
mxEvent={this.props.mxEvent}
|
mxEvent={this.props.mxEvent}
|
||||||
highlights={this.props.highlights}
|
highlights={this.props.highlights}
|
||||||
highlightLink={this.props.highlightLink}
|
highlightLink={this.props.highlightLink}
|
||||||
showUrlPreview={this.props.showUrlPreview}
|
showUrlPreview={this.props.showUrlPreview}
|
||||||
onHeightChanged={this.props.onHeightChanged} />
|
onHeightChanged={this.props.onHeightChanged}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -1063,12 +1065,13 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
<div className={classes} aria-live={ariaLive} aria-atomic="true">
|
<div className={classes} aria-live={ariaLive} aria-atomic="true">
|
||||||
<div className="mx_EventTile_line">
|
<div className="mx_EventTile_line">
|
||||||
<EventTileType ref={this._tile}
|
<EventTileType ref={this._tile}
|
||||||
mxEvent={this.props.mxEvent}
|
mxEvent={this.props.mxEvent}
|
||||||
highlights={this.props.highlights}
|
highlights={this.props.highlights}
|
||||||
highlightLink={this.props.highlightLink}
|
highlightLink={this.props.highlightLink}
|
||||||
showUrlPreview={this.props.showUrlPreview}
|
showUrlPreview={this.props.showUrlPreview}
|
||||||
tileShape={this.props.tileShape}
|
tileShape={this.props.tileShape}
|
||||||
onHeightChanged={this.props.onHeightChanged} />
|
onHeightChanged={this.props.onHeightChanged}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
className="mx_EventTile_senderDetailsLink"
|
className="mx_EventTile_senderDetailsLink"
|
||||||
|
@ -1106,12 +1109,13 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
{ groupPadlock }
|
{ groupPadlock }
|
||||||
{ thread }
|
{ thread }
|
||||||
<EventTileType ref={this._tile}
|
<EventTileType ref={this._tile}
|
||||||
mxEvent={this.props.mxEvent}
|
mxEvent={this.props.mxEvent}
|
||||||
highlights={this.props.highlights}
|
highlights={this.props.highlights}
|
||||||
highlightLink={this.props.highlightLink}
|
highlightLink={this.props.highlightLink}
|
||||||
onHeightChanged={this.props.onHeightChanged}
|
onHeightChanged={this.props.onHeightChanged}
|
||||||
replacingEventId={this.props.replacingEventId}
|
replacingEventId={this.props.replacingEventId}
|
||||||
showUrlPreview={false} />
|
showUrlPreview={false}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -1136,14 +1140,15 @@ export default class EventTile extends React.Component<IProps, IState> {
|
||||||
{ groupPadlock }
|
{ groupPadlock }
|
||||||
{ thread }
|
{ thread }
|
||||||
<EventTileType ref={this._tile}
|
<EventTileType ref={this._tile}
|
||||||
mxEvent={this.props.mxEvent}
|
mxEvent={this.props.mxEvent}
|
||||||
replacingEventId={this.props.replacingEventId}
|
replacingEventId={this.props.replacingEventId}
|
||||||
editState={this.props.editState}
|
editState={this.props.editState}
|
||||||
highlights={this.props.highlights}
|
highlights={this.props.highlights}
|
||||||
highlightLink={this.props.highlightLink}
|
highlightLink={this.props.highlightLink}
|
||||||
showUrlPreview={this.props.showUrlPreview}
|
showUrlPreview={this.props.showUrlPreview}
|
||||||
permalinkCreator={this.props.permalinkCreator}
|
permalinkCreator={this.props.permalinkCreator}
|
||||||
onHeightChanged={this.props.onHeightChanged} />
|
onHeightChanged={this.props.onHeightChanged}
|
||||||
|
/>
|
||||||
{ keyRequestInfo }
|
{ keyRequestInfo }
|
||||||
{ reactionsRow }
|
{ reactionsRow }
|
||||||
{ actionBar }
|
{ actionBar }
|
||||||
|
|
|
@ -153,18 +153,17 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
|
||||||
if (EventIndexPeg.get() !== null) {
|
if (EventIndexPeg.get() !== null) {
|
||||||
eventIndexingSettings = (
|
eventIndexingSettings = (
|
||||||
<div>
|
<div>
|
||||||
<div className='mx_SettingsTab_subsectionText'>
|
<div className='mx_SettingsTab_subsectionText'>{_t(
|
||||||
{_t("Securely cache encrypted messages locally for them " +
|
"Securely cache encrypted messages locally for them " +
|
||||||
"to appear in search results, using %(size)s to store messages from %(rooms)s rooms.",
|
"to appear in search results, using %(size)s to store messages from %(rooms)s rooms.",
|
||||||
{
|
{
|
||||||
size: formatBytes(this.state.eventIndexSize, 0),
|
size: formatBytes(this.state.eventIndexSize, 0),
|
||||||
// This drives the singular / plural string
|
// This drives the singular / plural string
|
||||||
// selection for "room" / "rooms" only.
|
// selection for "room" / "rooms" only.
|
||||||
count: this.state.roomCount,
|
count: this.state.roomCount,
|
||||||
rooms: formatCountLong(this.state.roomCount),
|
rooms: formatCountLong(this.state.roomCount),
|
||||||
},
|
},
|
||||||
)}
|
)}</div>
|
||||||
</div>
|
|
||||||
<div>
|
<div>
|
||||||
<AccessibleButton kind="primary" onClick={this._onManage}>
|
<AccessibleButton kind="primary" onClick={this._onManage}>
|
||||||
{_t("Manage")}
|
{_t("Manage")}
|
||||||
|
@ -175,10 +174,10 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
|
||||||
} else if (!this.state.eventIndexingEnabled && EventIndexPeg.supportIsInstalled()) {
|
} else if (!this.state.eventIndexingEnabled && EventIndexPeg.supportIsInstalled()) {
|
||||||
eventIndexingSettings = (
|
eventIndexingSettings = (
|
||||||
<div>
|
<div>
|
||||||
<div className='mx_SettingsTab_subsectionText'>
|
<div className='mx_SettingsTab_subsectionText'>{_t(
|
||||||
{_t( "Securely cache encrypted messages locally for them to " +
|
"Securely cache encrypted messages locally for them to " +
|
||||||
"appear in search results.")}
|
"appear in search results.",
|
||||||
</div>
|
)}</div>
|
||||||
<div>
|
<div>
|
||||||
<AccessibleButton kind="primary" disabled={this.state.enabling}
|
<AccessibleButton kind="primary" disabled={this.state.enabling}
|
||||||
onClick={this._onEnable}>
|
onClick={this._onEnable}>
|
||||||
|
@ -196,40 +195,36 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
|
||||||
);
|
);
|
||||||
|
|
||||||
eventIndexingSettings = (
|
eventIndexingSettings = (
|
||||||
<div className='mx_SettingsTab_subsectionText'>
|
<div className='mx_SettingsTab_subsectionText'>{_t(
|
||||||
|
"%(brand)s is missing some components required for securely " +
|
||||||
|
"caching encrypted messages locally. If you'd like to " +
|
||||||
|
"experiment with this feature, build a custom %(brand)s Desktop " +
|
||||||
|
"with <nativeLink>search components added</nativeLink>.",
|
||||||
{
|
{
|
||||||
_t( "%(brand)s is missing some components required for securely " +
|
brand,
|
||||||
"caching encrypted messages locally. If you'd like to " +
|
},
|
||||||
"experiment with this feature, build a custom %(brand)s Desktop " +
|
{
|
||||||
"with <nativeLink>search components added</nativeLink>.",
|
nativeLink: sub => <a href={nativeLink}
|
||||||
{
|
target="_blank" rel="noreferrer noopener"
|
||||||
brand,
|
>{sub}</a>,
|
||||||
},
|
},
|
||||||
{
|
)}</div>
|
||||||
'nativeLink': (sub) => <a href={nativeLink} target="_blank"
|
|
||||||
rel="noreferrer noopener">{sub}</a>,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
} else if (!EventIndexPeg.platformHasSupport()) {
|
} else if (!EventIndexPeg.platformHasSupport()) {
|
||||||
eventIndexingSettings = (
|
eventIndexingSettings = (
|
||||||
<div className='mx_SettingsTab_subsectionText'>
|
<div className='mx_SettingsTab_subsectionText'>{_t(
|
||||||
|
"%(brand)s can't securely cache encrypted messages locally " +
|
||||||
|
"while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> " +
|
||||||
|
"for encrypted messages to appear in search results.",
|
||||||
{
|
{
|
||||||
_t( "%(brand)s can't securely cache encrypted messages locally " +
|
brand,
|
||||||
"while running in a web browser. Use <desktopLink>%(brand)s Desktop</desktopLink> " +
|
},
|
||||||
"for encrypted messages to appear in search results.",
|
{
|
||||||
{
|
desktopLink: sub => <a href="https://element.io/get-started"
|
||||||
brand,
|
target="_blank" rel="noreferrer noopener"
|
||||||
},
|
>{sub}</a>,
|
||||||
{
|
},
|
||||||
'desktopLink': (sub) => <a href="https://element.io/get-started"
|
)}</div>
|
||||||
target="_blank" rel="noreferrer noopener">{sub}</a>,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
eventIndexingSettings = (
|
eventIndexingSettings = (
|
||||||
|
@ -241,19 +236,18 @@ export default class EventIndexPanel extends React.Component<{}, IState> {
|
||||||
}
|
}
|
||||||
</p>
|
</p>
|
||||||
{EventIndexPeg.error && (
|
{EventIndexPeg.error && (
|
||||||
<details>
|
<details>
|
||||||
<summary>{_t("Advanced")}</summary>
|
<summary>{_t("Advanced")}</summary>
|
||||||
<code>
|
<code>
|
||||||
{EventIndexPeg.error.message}
|
{EventIndexPeg.error.message}
|
||||||
</code>
|
</code>
|
||||||
<p>
|
<p>
|
||||||
<AccessibleButton key="delete" kind="danger" onClick={this._confirmEventStoreReset}>
|
<AccessibleButton key="delete" kind="danger" onClick={this._confirmEventStoreReset}>
|
||||||
{_t("Reset")}
|
{_t("Reset")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
</p>
|
</p>
|
||||||
</details>
|
</details>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,8 +87,10 @@ export class BannedUser extends React.Component<IBannedUserProps> {
|
||||||
|
|
||||||
if (this.props.canUnban) {
|
if (this.props.canUnban) {
|
||||||
unbanButton = (
|
unbanButton = (
|
||||||
<AccessibleButton kind='danger_sm' onClick={this._onUnbanClick}
|
<AccessibleButton className='mx_RolesRoomSettingsTab_unbanBtn'
|
||||||
className='mx_RolesRoomSettingsTab_unbanBtn'>
|
kind='danger_sm'
|
||||||
|
onClick={this._onUnbanClick}
|
||||||
|
>
|
||||||
{ _t('Unban') }
|
{ _t('Unban') }
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
);
|
);
|
||||||
|
@ -345,8 +347,9 @@ export default class RolesRoomSettingsTab extends React.Component<IProps> {
|
||||||
if (sender) bannedBy = sender.name;
|
if (sender) bannedBy = sender.name;
|
||||||
return (
|
return (
|
||||||
<BannedUser key={member.userId} canUnban={canBanUsers}
|
<BannedUser key={member.userId} canUnban={canBanUsers}
|
||||||
member={member} reason={banEvent.reason}
|
member={member} reason={banEvent.reason}
|
||||||
by={bannedBy} />
|
by={bannedBy}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -113,10 +113,9 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
|
||||||
"may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>",
|
"may prevent many bots and bridges from working correctly. <a>Learn more about encryption.</a>",
|
||||||
{},
|
{},
|
||||||
{
|
{
|
||||||
'a': (sub) => {
|
a: sub => <a href="https://element.io/help#encryption"
|
||||||
return <a rel='noreferrer noopener' target='_blank'
|
rel="noreferrer noopener" target="_blank"
|
||||||
href='https://element.io/help#encryption'>{sub}</a>;
|
>{sub}</a>,
|
||||||
},
|
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
onFinished: (confirm) => {
|
onFinished: (confirm) => {
|
||||||
|
@ -385,7 +384,8 @@ export default class SecurityRoomSettingsTab extends React.Component<IProps, ISt
|
||||||
<span>{_t("Once enabled, encryption cannot be disabled.")}</span>
|
<span>{_t("Once enabled, encryption cannot be disabled.")}</span>
|
||||||
</div>
|
</div>
|
||||||
<LabelledToggleSwitch value={isEncrypted} onChange={this._onEncryptionChange}
|
<LabelledToggleSwitch value={isEncrypted} onChange={this._onEncryptionChange}
|
||||||
label={_t("Encrypted")} disabled={!canEnableEncryption} />
|
label={_t("Encrypted")} disabled={!canEnableEncryption}
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
{encryptionSettings}
|
{encryptionSettings}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -215,28 +215,27 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
||||||
<div className="mx_SettingsTab_section">
|
<div className="mx_SettingsTab_section">
|
||||||
<span className='mx_SettingsTab_subheading'>{_t('Bug reporting')}</span>
|
<span className='mx_SettingsTab_subheading'>{_t('Bug reporting')}</span>
|
||||||
<div className='mx_SettingsTab_subsectionText'>
|
<div className='mx_SettingsTab_subsectionText'>
|
||||||
{
|
{_t(
|
||||||
_t( "If you've submitted a bug via GitHub, debug logs can help " +
|
"If you've submitted a bug via GitHub, debug logs can help " +
|
||||||
"us track down the problem. Debug logs contain application " +
|
"us track down the problem. Debug logs contain application " +
|
||||||
"usage data including your username, the IDs or aliases of " +
|
"usage data including your username, the IDs or aliases of " +
|
||||||
"the rooms or groups you have visited and the usernames of " +
|
"the rooms or groups you have visited and the usernames of " +
|
||||||
"other users. They do not contain messages.",
|
"other users. They do not contain messages.",
|
||||||
)
|
)}
|
||||||
}
|
|
||||||
<div className='mx_HelpUserSettingsTab_debugButton'>
|
<div className='mx_HelpUserSettingsTab_debugButton'>
|
||||||
<AccessibleButton onClick={this._onBugReport} kind='primary'>
|
<AccessibleButton onClick={this._onBugReport} kind='primary'>
|
||||||
{_t("Submit debug logs")}
|
{_t("Submit debug logs")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
</div>
|
</div>
|
||||||
{
|
{_t(
|
||||||
_t( "To report a Matrix-related security issue, please read the Matrix.org " +
|
"To report a Matrix-related security issue, please read the Matrix.org " +
|
||||||
"<a>Security Disclosure Policy</a>.", {},
|
"<a>Security Disclosure Policy</a>.", {},
|
||||||
{
|
{
|
||||||
'a': (sub) =>
|
a: sub => <a href="https://matrix.org/security-disclosure-policy/"
|
||||||
<a href="https://matrix.org/security-disclosure-policy/"
|
rel="noreferrer noopener" target="_blank"
|
||||||
rel="noreferrer noopener" target="_blank">{sub}</a>,
|
>{sub}</a>,
|
||||||
})
|
},
|
||||||
}
|
)}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@ -272,7 +271,8 @@ export default class HelpUserSettingsTab extends React.Component<IProps, IState>
|
||||||
{_t("Identity Server is")} <code>{MatrixClientPeg.get().getIdentityServerUrl()}</code><br />
|
{_t("Identity Server is")} <code>{MatrixClientPeg.get().getIdentityServerUrl()}</code><br />
|
||||||
{_t("Access Token:") + ' '}
|
{_t("Access Token:") + ' '}
|
||||||
<AccessibleButton element="span" onClick={this._showSpoiler}
|
<AccessibleButton element="span" onClick={this._showSpoiler}
|
||||||
data-spoiler={MatrixClientPeg.get().getAccessToken()}>
|
data-spoiler={MatrixClientPeg.get().getAccessToken()}
|
||||||
|
>
|
||||||
<{ _t("click to reveal") }>
|
<{ _t("click to reveal") }>
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
<div className='mx_HelpUserSettingsTab_debugButton'>
|
<div className='mx_HelpUserSettingsTab_debugButton'>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue