mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-17 23:48:45 +00:00
암호 키 생성 페이지에서 검증키와 서명키를 함께 생성하도록 변경
This commit is contained in:
@@ -1,21 +1,19 @@
|
||||
<script lang="ts">
|
||||
import { onMount } from "svelte";
|
||||
import { goto } from "$app/navigation";
|
||||
import { getKeyPairFromIndexedDB } from "$lib/indexedDB";
|
||||
import { keyPairStore } from "$lib/stores";
|
||||
import "../app.css";
|
||||
import { prepareKeyPairStores } from "./services";
|
||||
|
||||
let { children } = $props();
|
||||
|
||||
onMount(async () => {
|
||||
const { pubKey, privKey } = await getKeyPairFromIndexedDB();
|
||||
if (pubKey && privKey) {
|
||||
keyPairStore.set({ publicKey: pubKey, privateKey: privKey });
|
||||
} else if (!["/auth", "/key/generate"].some((path) => location.pathname.startsWith(path))) {
|
||||
await goto(
|
||||
"/key/generate?redirect=" + encodeURIComponent(location.pathname + location.search),
|
||||
);
|
||||
}
|
||||
onMount(() => {
|
||||
prepareKeyPairStores().then(async (ok) => {
|
||||
if (!ok && !["/auth", "/key"].some((path) => location.pathname.startsWith(path))) {
|
||||
await goto(
|
||||
"/key/generate?redirect=" + encodeURIComponent(location.pathname + location.search),
|
||||
);
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user