mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 16:16:55 +00:00
사소한 리팩토링 3
This commit is contained in:
@@ -61,19 +61,6 @@
|
||||
});
|
||||
};
|
||||
|
||||
const importKeys = async () => {
|
||||
const file = fileInput?.files?.[0];
|
||||
if (!file) return;
|
||||
|
||||
if (await importClientKeys(await file.text())) {
|
||||
await upgradeSession(false);
|
||||
} else {
|
||||
// TODO: Error Handling
|
||||
}
|
||||
|
||||
fileInput!.value = "";
|
||||
};
|
||||
|
||||
const upgradeSession = async (force: boolean) => {
|
||||
const [upgradeRes, upgradeError] = await requestClientRegistrationAndSessionUpgrade(
|
||||
$clientKeyStore!,
|
||||
@@ -109,6 +96,19 @@
|
||||
await goto("/client/pending?redirect=" + encodeURIComponent(data.redirectPath));
|
||||
};
|
||||
|
||||
const importKeys = async () => {
|
||||
const file = fileInput?.files?.[0];
|
||||
if (!file) return;
|
||||
|
||||
if (await importClientKeys(await file.text())) {
|
||||
await upgradeSession(false);
|
||||
} else {
|
||||
// TODO: Error Handling
|
||||
}
|
||||
|
||||
fileInput!.value = "";
|
||||
};
|
||||
|
||||
onMount(async () => {
|
||||
if ($clientKeyStore) {
|
||||
await goto(data.redirectPath, { replaceState: true });
|
||||
|
||||
Reference in New Issue
Block a user