AccessSecretStorageDialog: various fixes (#30093)
* AccessSecretStorageDialog: clear notice when input is empty * AccessSecretStorageDialog: Simplify logic for calculating feedback No functional changes, just simplification * AccessSecretStorageDialog: use the right icon Should be a ! in a circle, not an X. Also requires use of `Flex` to fix the vertical alignment. * AccessSecretStorageDialog: fix resizing when key is correct * AccessSecretStorageDialog: remove confirmation on dialog close Per discussion on https://github.com/element-hq/element-web/issues/30024, we don't want this any more.
This commit is contained in:
committed by
GitHub
parent
073606207e
commit
3e8599bba0
@@ -19,7 +19,6 @@ import AccessSecretStorageDialog, {
|
||||
type KeyParams,
|
||||
} from "./components/views/dialogs/security/AccessSecretStorageDialog";
|
||||
import { ModuleRunner } from "./modules/ModuleRunner";
|
||||
import QuestionDialog from "./components/views/dialogs/QuestionDialog";
|
||||
import InteractiveAuthDialog from "./components/views/dialogs/InteractiveAuthDialog";
|
||||
|
||||
// This stores the secret storage private keys in memory for the JS SDK. This is
|
||||
@@ -50,17 +49,6 @@ export class AccessCancelledError extends Error {
|
||||
}
|
||||
}
|
||||
|
||||
async function confirmToDismiss(): Promise<boolean> {
|
||||
const [sure] = await Modal.createDialog(QuestionDialog, {
|
||||
title: _t("encryption|cancel_entering_passphrase_title"),
|
||||
description: _t("encryption|cancel_entering_passphrase_description"),
|
||||
danger: false,
|
||||
button: _t("action|go_back"),
|
||||
cancelButton: _t("action|cancel"),
|
||||
}).finished;
|
||||
return !sure;
|
||||
}
|
||||
|
||||
function makeInputToKey(
|
||||
keyInfo: SecretStorage.SecretStorageKeyDescription,
|
||||
): (keyParams: KeyParams) => Promise<Uint8Array> {
|
||||
@@ -134,17 +122,6 @@ async function getSecretStorageKey(
|
||||
return MatrixClientPeg.safeGet().secretStorage.checkKey(key, keyInfo);
|
||||
},
|
||||
},
|
||||
/* className= */ undefined,
|
||||
/* isPriorityModal= */ false,
|
||||
/* isStaticModal= */ false,
|
||||
/* options= */ {
|
||||
onBeforeClose: async (reason): Promise<boolean> => {
|
||||
if (reason === "backgroundClick") {
|
||||
return confirmToDismiss();
|
||||
}
|
||||
return true;
|
||||
},
|
||||
},
|
||||
);
|
||||
const [keyParams] = await finished;
|
||||
if (!keyParams) {
|
||||
|
||||
Reference in New Issue
Block a user