mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-14 22:08:45 +00:00
사소한 리팩토링
This commit is contained in:
@@ -17,7 +17,7 @@ const getFileHandle = async (path: string, create = true) => {
|
||||
}
|
||||
|
||||
try {
|
||||
let directoryHandle: FileSystemDirectoryHandle = rootHandle;
|
||||
let directoryHandle = rootHandle;
|
||||
for (const part of parts.slice(0, -1)) {
|
||||
if (!part) continue;
|
||||
directoryHandle = await directoryHandle.getDirectoryHandle(part, { create });
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { get, type Writable } from "svelte/store";
|
||||
import { TopBar } from "$lib/components";
|
||||
import { getFileInfo, type FileInfo } from "$lib/modules/filesystem";
|
||||
import { fileDownloadStatusStore, masterKeyStore } from "$lib/stores";
|
||||
import { fileDownloadStatusStore, isFileDownloading, masterKeyStore } from "$lib/stores";
|
||||
import DownloadStatus from "./DownloadStatus.svelte";
|
||||
import { requestFileDownload } from "./service";
|
||||
|
||||
@@ -14,14 +14,8 @@
|
||||
|
||||
const downloadStatus = $derived(
|
||||
$fileDownloadStatusStore.find((statusStore) => {
|
||||
const status = get(statusStore);
|
||||
return (
|
||||
status.id === data.id &&
|
||||
(status.status === "download-pending" ||
|
||||
status.status === "downloading" ||
|
||||
status.status === "decryption-pending" ||
|
||||
status.status === "decrypting")
|
||||
);
|
||||
const { id, status } = get(statusStore);
|
||||
return id === data.id && isFileDownloading(status);
|
||||
}),
|
||||
);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { callGetApi, callPostApi } from "$lib/hooks";
|
||||
import { storeHmacSecrets } from "$lib/indexedDB";
|
||||
import { deleteFileCache, uploadFile } from "$lib/modules/file";
|
||||
import { generateDataKey, wrapDataKey, unwrapHmacSecret, encryptString } from "$lib/modules/crypto";
|
||||
import { deleteFileCache, uploadFile } from "$lib/modules/file";
|
||||
import type {
|
||||
DirectoryRenameRequest,
|
||||
DirectoryCreateRequest,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import { goto } from "$app/navigation";
|
||||
import MenuEntryButton from "./MenuEntryButton.svelte";
|
||||
import { requestLogout } from "./service.js";
|
||||
import { requestLogout } from "./service";
|
||||
|
||||
import IconStorage from "~icons/material-symbols/storage";
|
||||
import IconPassword from "~icons/material-symbols/password";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<script lang="ts">
|
||||
import type { Component, Snippet } from "svelte";
|
||||
import { EntryButton } from "$lib/components/buttons";
|
||||
import type { SvelteHTMLElements } from "svelte/elements";
|
||||
import { EntryButton } from "$lib/components/buttons";
|
||||
|
||||
interface Props {
|
||||
children: Snippet;
|
||||
|
||||
Reference in New Issue
Block a user