From c96dd9715a90bce8aaef3899680d43352cbbb8b0 Mon Sep 17 00:00:00 2001 From: Stuart Mumford Date: Wed, 26 Feb 2020 21:54:45 +0000 Subject: [PATCH] Fix no cancel button just for Registration --- src/Registration.js | 1 + src/components/views/dialogs/QuestionDialog.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Registration.js b/src/Registration.js index 8d7354e7ff..5f6ac4b68e 100644 --- a/src/Registration.js +++ b/src/Registration.js @@ -70,6 +70,7 @@ export async function startAnyRegistrationFlow(options) { const QuestionDialog = sdk.getComponent("dialogs.QuestionDialog"); const modal = Modal.createTrackedDialog('Registration required', '', QuestionDialog, { hasCancelButton: true, + quitOnly: true, title: _t("Sign In or Create Account"), description: _t("Use your account or create a new one to continue."), button: _t("Create Account"), diff --git a/src/components/views/dialogs/QuestionDialog.js b/src/components/views/dialogs/QuestionDialog.js index 3eec497b44..8cb16dd88f 100644 --- a/src/components/views/dialogs/QuestionDialog.js +++ b/src/components/views/dialogs/QuestionDialog.js @@ -32,6 +32,7 @@ export default createReactClass({ focus: PropTypes.bool, onFinished: PropTypes.func.isRequired, headerImage: PropTypes.string, + quitOnly: PropTypes.bool, // quitOnly doesn't show the cancel button just the quit [x]. }, getDefaultProps: function() { @@ -42,6 +43,7 @@ export default createReactClass({ focus: true, hasCancelButton: true, danger: false, + quitOnly: false, }; }, @@ -73,7 +75,7 @@ export default createReactClass({