mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-10 15:02:05 +02:00
Merge pull request #4982 from matrix-org/dbkr/ts_lint_post_rebrand
Fix TS lint errors
This commit is contained in:
commit
21d5700501
@ -102,7 +102,7 @@ export default class RebrandListener {
|
|||||||
// to, well, remind them later.
|
// to, well, remind them later.
|
||||||
this.nagAgainAt = Date.now() + NAG_INTERVAL;
|
this.nagAgainAt = Date.now() + NAG_INTERVAL;
|
||||||
this.recheck();
|
this.recheck();
|
||||||
}
|
};
|
||||||
|
|
||||||
onOneTimeToastLearnMore = async () => {
|
onOneTimeToastLearnMore = async () => {
|
||||||
const [doneClicked] = await Modal.createDialog(RebrandDialog, {
|
const [doneClicked] = await Modal.createDialog(RebrandDialog, {
|
||||||
@ -112,13 +112,13 @@ export default class RebrandListener {
|
|||||||
localStorage.setItem('mx_rename_dialog_dismissed', 'true');
|
localStorage.setItem('mx_rename_dialog_dismissed', 'true');
|
||||||
this.recheck();
|
this.recheck();
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
onNagTimerFired = () => {
|
onNagTimerFired = () => {
|
||||||
this._reshowTimer = null;
|
this._reshowTimer = null;
|
||||||
this.nagAgainAt = null;
|
this.nagAgainAt = null;
|
||||||
this.recheck();
|
this.recheck();
|
||||||
}
|
};
|
||||||
|
|
||||||
private async recheck() {
|
private async recheck() {
|
||||||
// There are two types of toast/dialog we show: a 'one time' informing the user that
|
// There are two types of toast/dialog we show: a 'one time' informing the user that
|
||||||
|
@ -23,26 +23,26 @@ import DialogButtons from '../elements/DialogButtons';
|
|||||||
export enum RebrandDialogKind {
|
export enum RebrandDialogKind {
|
||||||
NAG,
|
NAG,
|
||||||
ONE_TIME,
|
ONE_TIME,
|
||||||
};
|
}
|
||||||
|
|
||||||
interface IProps {
|
interface IProps {
|
||||||
onFinished: (bool) => void;
|
onFinished: (bool) => void;
|
||||||
kind: RebrandDialogKind,
|
kind: RebrandDialogKind;
|
||||||
targetUrl?: string,
|
targetUrl?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class RebrandDialog extends React.PureComponent<IProps> {
|
export default class RebrandDialog extends React.PureComponent<IProps> {
|
||||||
private onDoneClick = () => {
|
private onDoneClick = () => {
|
||||||
this.props.onFinished(true);
|
this.props.onFinished(true);
|
||||||
}
|
};
|
||||||
|
|
||||||
private onGoToElementClick = () => {
|
private onGoToElementClick = () => {
|
||||||
this.props.onFinished(true);
|
this.props.onFinished(true);
|
||||||
}
|
};
|
||||||
|
|
||||||
private onRemindMeLaterClick = () => {
|
private onRemindMeLaterClick = () => {
|
||||||
this.props.onFinished(false);
|
this.props.onFinished(false);
|
||||||
}
|
};
|
||||||
|
|
||||||
private getPrettyTargetUrl() {
|
private getPrettyTargetUrl() {
|
||||||
const u = new URL(this.props.targetUrl);
|
const u = new URL(this.props.targetUrl);
|
||||||
@ -79,14 +79,14 @@ export default class RebrandDialog extends React.PureComponent<IProps> {
|
|||||||
cancelButton={"Remind me later"}
|
cancelButton={"Remind me later"}
|
||||||
onCancel={this.onRemindMeLaterClick}
|
onCancel={this.onRemindMeLaterClick}
|
||||||
focus={true}
|
focus={true}
|
||||||
/>
|
/>;
|
||||||
} else {
|
} else {
|
||||||
return <DialogButtons primaryButton={_t("Done")}
|
return <DialogButtons primaryButton={_t("Done")}
|
||||||
primaryButtonClass='primary'
|
primaryButtonClass='primary'
|
||||||
hasCancel={false}
|
hasCancel={false}
|
||||||
onPrimaryButtonClick={this.onDoneClick}
|
onPrimaryButtonClick={this.onDoneClick}
|
||||||
focus={true}
|
focus={true}
|
||||||
/>
|
/>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user