mirror of
https://github.com/element-hq/element-web
synced 2024-11-28 20:38:55 +03:00
Add some buttons
This commit is contained in:
parent
b45a1c129f
commit
aad17a0be5
1 changed files with 8 additions and 3 deletions
|
@ -67,9 +67,15 @@ export async function startAnyRegistrationFlow(options) {
|
||||||
//} else {
|
//} else {
|
||||||
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog");
|
||||||
Modal.createTrackedDialog('Registration required', '', QuestionDialog, {
|
Modal.createTrackedDialog('Registration required', '', QuestionDialog, {
|
||||||
title: _t("Registration Required"),
|
title: _t("Login or Registration Required"),
|
||||||
description: _t("You need to register to do this. Would you like to register now?"),
|
description: _t("You need to login or register to do this."),
|
||||||
button: _t("Register"),
|
button: _t("Register"),
|
||||||
|
extraButtons: [
|
||||||
|
<button className="mx_Dialog_primary"
|
||||||
|
onClick={() => {dis.dispatch({action: 'start_login'});}}>
|
||||||
|
{ _t('Login') }
|
||||||
|
</button>,
|
||||||
|
],
|
||||||
onFinished: (proceed) => {
|
onFinished: (proceed) => {
|
||||||
if (proceed) {
|
if (proceed) {
|
||||||
dis.dispatch({action: 'start_registration'});
|
dis.dispatch({action: 'start_registration'});
|
||||||
|
@ -101,4 +107,3 @@ export async function startAnyRegistrationFlow(options) {
|
||||||
// }
|
// }
|
||||||
// throw new Error("Register request succeeded when it should have returned 401!");
|
// throw new Error("Register request succeeded when it should have returned 401!");
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue