mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-16 21:24:59 +08: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.
|
||||
this.nagAgainAt = Date.now() + NAG_INTERVAL;
|
||||
this.recheck();
|
||||
}
|
||||
};
|
||||
|
||||
onOneTimeToastLearnMore = async () => {
|
||||
const [doneClicked] = await Modal.createDialog(RebrandDialog, {
|
||||
@ -112,13 +112,13 @@ export default class RebrandListener {
|
||||
localStorage.setItem('mx_rename_dialog_dismissed', 'true');
|
||||
this.recheck();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
onNagTimerFired = () => {
|
||||
this._reshowTimer = null;
|
||||
this.nagAgainAt = null;
|
||||
this.recheck();
|
||||
}
|
||||
};
|
||||
|
||||
private async recheck() {
|
||||
// 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 {
|
||||
NAG,
|
||||
ONE_TIME,
|
||||
};
|
||||
}
|
||||
|
||||
interface IProps {
|
||||
onFinished: (bool) => void;
|
||||
kind: RebrandDialogKind,
|
||||
targetUrl?: string,
|
||||
kind: RebrandDialogKind;
|
||||
targetUrl?: string;
|
||||
}
|
||||
|
||||
export default class RebrandDialog extends React.PureComponent<IProps> {
|
||||
private onDoneClick = () => {
|
||||
this.props.onFinished(true);
|
||||
}
|
||||
};
|
||||
|
||||
private onGoToElementClick = () => {
|
||||
this.props.onFinished(true);
|
||||
}
|
||||
};
|
||||
|
||||
private onRemindMeLaterClick = () => {
|
||||
this.props.onFinished(false);
|
||||
}
|
||||
};
|
||||
|
||||
private getPrettyTargetUrl() {
|
||||
const u = new URL(this.props.targetUrl);
|
||||
@ -79,14 +79,14 @@ export default class RebrandDialog extends React.PureComponent<IProps> {
|
||||
cancelButton={"Remind me later"}
|
||||
onCancel={this.onRemindMeLaterClick}
|
||||
focus={true}
|
||||
/>
|
||||
/>;
|
||||
} else {
|
||||
return <DialogButtons primaryButton={_t("Done")}
|
||||
primaryButtonClass='primary'
|
||||
hasCancel={false}
|
||||
onPrimaryButtonClick={this.onDoneClick}
|
||||
focus={true}
|
||||
/>
|
||||
/>;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user