Skip to content

Commit 8ab44b0

Browse files
committed
AccessSecretStorageDialog: remove confirmation on dialog close
Per discussion on #30024, we don't want this any more.
1 parent 84a634f commit 8ab44b0

2 files changed

Lines changed: 0 additions & 25 deletions

File tree

src/SecurityManager.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import AccessSecretStorageDialog, {
1919
type KeyParams,
2020
} from "./components/views/dialogs/security/AccessSecretStorageDialog";
2121
import { ModuleRunner } from "./modules/ModuleRunner";
22-
import QuestionDialog from "./components/views/dialogs/QuestionDialog";
2322
import InteractiveAuthDialog from "./components/views/dialogs/InteractiveAuthDialog";
2423

2524
// This stores the secret storage private keys in memory for the JS SDK. This is
@@ -50,17 +49,6 @@ export class AccessCancelledError extends Error {
5049
}
5150
}
5251

53-
async function confirmToDismiss(): Promise<boolean> {
54-
const [sure] = await Modal.createDialog(QuestionDialog, {
55-
title: _t("encryption|cancel_entering_passphrase_title"),
56-
description: _t("encryption|cancel_entering_passphrase_description"),
57-
danger: false,
58-
button: _t("action|go_back"),
59-
cancelButton: _t("action|cancel"),
60-
}).finished;
61-
return !sure;
62-
}
63-
6452
function makeInputToKey(
6553
keyInfo: SecretStorage.SecretStorageKeyDescription,
6654
): (keyParams: KeyParams) => Promise<Uint8Array> {
@@ -134,17 +122,6 @@ async function getSecretStorageKey(
134122
return MatrixClientPeg.safeGet().secretStorage.checkKey(key, keyInfo);
135123
},
136124
},
137-
/* className= */ undefined,
138-
/* isPriorityModal= */ false,
139-
/* isStaticModal= */ false,
140-
/* options= */ {
141-
onBeforeClose: async (reason): Promise<boolean> => {
142-
if (reason === "backgroundClick") {
143-
return confirmToDismiss();
144-
}
145-
return true;
146-
},
147-
},
148125
);
149126
const [keyParams] = await finished;
150127
if (!keyParams) {

src/i18n/strings/en_EN.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -920,8 +920,6 @@
920920
"security_key_title": "Recovery key"
921921
},
922922
"bootstrap_title": "Setting up keys",
923-
"cancel_entering_passphrase_description": "Are you sure you want to cancel entering passphrase?",
924-
"cancel_entering_passphrase_title": "Cancel entering passphrase?",
925923
"confirm_encryption_setup_body": "Click the button below to confirm setting up encryption.",
926924
"confirm_encryption_setup_title": "Confirm encryption setup",
927925
"cross_signing_room_normal": "This room is end-to-end encrypted",

0 commit comments

Comments
 (0)