From 497ab0f2129b3cb20cf66f45f254f8c419e0f2fc Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 25 Jun 2020 14:52:59 +0100 Subject: [PATCH] Hopefully ake cancel dialog a bit less weird There's no design on how to fix this so I've switched the buttons and made the primary not a danger button. We could also try some different wording, eg. 'abort' rather than 'cancel' because with 'ancel' it's not clear if you're cancelling whatever you were trying to do or the dialog asking you if you want to cancel... Ideal might be to make the cancel button red but that means making it a separate button or adding support for doing so to DialogButtons, so not going to do that unless we're sure that's what we want. Fixes https://github.com/vector-im/riot-web/issues/14140 --- src/CrossSigningManager.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CrossSigningManager.js b/src/CrossSigningManager.js index a80c91a59a..105f47c832 100644 --- a/src/CrossSigningManager.js +++ b/src/CrossSigningManager.js @@ -54,11 +54,11 @@ async function confirmToDismiss(name) { const [sure] = await Modal.createDialog(QuestionDialog, { title: _t("Cancel entering passphrase?"), description, - danger: true, - cancelButton: _t("Enter passphrase"), - button: _t("Cancel"), + danger: false, + button: _t("Enter passphrase"), + cancelButton: _t("Cancel"), }).finished; - return sure; + return !sure; } async function getSecretStorageKey({ keys: keyInfos }, ssssItemName) {