diff --git a/apps/web/src/common/vault.js b/apps/web/src/common/vault.js index 1da7839e2..d62de5c57 100644 --- a/apps/web/src/common/vault.js +++ b/apps/web/src/common/vault.js @@ -6,7 +6,7 @@ class Vault { static createVault() { return showPasswordDialog("create_vault", async ({ password }) => { await db.vault.create(password); - await showToast("success", "Vault created."); + showToast("success", "Vault created."); return true; }); } diff --git a/apps/web/src/stores/note-store.js b/apps/web/src/stores/note-store.js index cac682574..896de624b 100644 --- a/apps/web/src/stores/note-store.js +++ b/apps/web/src/stores/note-store.js @@ -93,10 +93,11 @@ class NoteStore extends BaseStore { }; unlock = async (id) => { - await Vault.unlockNote(id).then(async () => { + return await Vault.unlockNote(id).then(async (res) => { if (editorStore.get().session.id === id) await editorStore.openSession(id); this.refresh(); + return res; }); }; diff --git a/apps/web/src/views/settings.js b/apps/web/src/views/settings.js index 5761ce2b6..14ae17070 100644 --- a/apps/web/src/views/settings.js +++ b/apps/web/src/views/settings.js @@ -297,21 +297,24 @@ function Settings(props) { Vault - {!isVaultCreated && ( - - )} - - {isVaultCreated && ( + {isVaultCreated ? ( <> + ) : ( + )}