;
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index d5e536d..11a910e 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -1,47 +1,15 @@
-{#if loading}
+{#if $sessionQuery.isFetching || $setupQuery.isFetching}
Loading
-{:else if $sessionStore}
+{:else if $sessionQuery.data}
Session
-{:else if $passwordExistStore}
+{:else if $setupQuery.data}
{:else}
diff --git a/src/routes/setup/done/+page.svelte b/src/routes/done/+page.svelte
similarity index 100%
rename from src/routes/setup/done/+page.svelte
rename to src/routes/done/+page.svelte
diff --git a/src/routes/setup/+layout.svelte b/src/routes/setup/+layout.svelte
index 071f72a..955747f 100644
--- a/src/routes/setup/+layout.svelte
+++ b/src/routes/setup/+layout.svelte
@@ -1,27 +1,18 @@
{
if ($keysStore.keys.device === null) {
@@ -16,16 +16,18 @@
const setPassword = async (password: string): Promise => {
if ($keysStore.keys.device !== null) {
- const hash = await hashPassword(password);
- storageService.set({
- key: PASSWORD_WITH_DEVICE_KEY,
- value: {
- password: hash,
- secureData: await encryptData($keysStore.keys.device, hash)
+ $passwordWithDeviceKeyMutation.mutate(
+ {
+ password,
+ secretData: $keysStore.keys.device
},
- area: LOCAL
- });
- goto('/setup/done');
+ {
+ onSuccess: () => {
+ keysStore.resetAll();
+ goto('/done');
+ }
+ }
+ );
}
};
diff --git a/static/manifest.json b/static/manifest.json
index df7c25d..27b41b2 100644
--- a/static/manifest.json
+++ b/static/manifest.json
@@ -1,7 +1,7 @@
{
"name": "Holo key manager",
"description": "A browser extension to manage holo keys",
- "version": "0.0.20",
+ "version": "0.0.21",
"manifest_version": 3,
"browser_specific_settings": {
"gecko": {