mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-17 14:05:04 +08:00
close modal
This commit is contained in:
parent
aad17a0be5
commit
2c6045fe9f
@ -66,13 +66,13 @@ export async function startAnyRegistrationFlow(options) {
|
|||||||
// });
|
// });
|
||||||
//} else {
|
//} else {
|
||||||
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
||||||
Modal.createTrackedDialog('Registration required', '', QuestionDialog, {
|
const modal = Modal.createTrackedDialog('Registration required', '', QuestionDialog, {
|
||||||
title: _t("Login or Registration Required"),
|
title: _t("Login or Registration Required"),
|
||||||
description: _t("You need to login or register to do this."),
|
description: _t("You need to login or register to do this."),
|
||||||
button: _t("Register"),
|
button: _t("Register"),
|
||||||
extraButtons: [
|
extraButtons: [
|
||||||
<button className="mx_Dialog_primary"
|
<button className="mx_Dialog_primary"
|
||||||
onClick={() => {dis.dispatch({action: 'start_login'});}}>
|
onClick={() => {modal.close(); dis.dispatch({action: 'start_login'});}}>
|
||||||
{ _t('Login') }
|
{ _t('Login') }
|
||||||
</button>,
|
</button>,
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user