mirror of
https://github.com/suitenumerique/docs.git
synced 2026-10-01 05:55:16 +02:00
fix(ui): missing local keys error was dismissed by another attempt
This commit is contained in:
@@ -296,10 +296,6 @@ const DocPage = ({ id }: DocProps) => {
|
||||
return <Loading />;
|
||||
}
|
||||
|
||||
if (doc.is_encrypted && decryptionFailure) {
|
||||
return <DecryptionFailurePanel failure={decryptionFailure} />;
|
||||
}
|
||||
|
||||
if (doc.is_encrypted && vaultClientError) {
|
||||
return (
|
||||
<EncryptionEmptyState
|
||||
@@ -375,6 +371,12 @@ const DocPage = ({ id }: DocProps) => {
|
||||
);
|
||||
}
|
||||
|
||||
// After the access checks: with no keys on this device, the editor's attempt fails
|
||||
// too (MISSING_KEYS), and setting encryption up is the answer, not a retry.
|
||||
if (doc.is_encrypted && decryptionFailure) {
|
||||
return <DecryptionFailurePanel failure={decryptionFailure} />;
|
||||
}
|
||||
|
||||
if (encryptionTransition) {
|
||||
return (
|
||||
<EncryptionEmptyState
|
||||
|
||||
Reference in New Issue
Block a user