mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 16:16:55 +00:00
삭제된 파일의 캐시가 존재하는 경우 캐시 페이지의 로딩이 끝나지 않는 버그 수정
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
import { goto } from "$app/navigation";
|
||||
import { TopBar } from "$lib/components/molecules";
|
||||
import { Category, CategoryCreateModal } from "$lib/components/organisms";
|
||||
import { getCategoryInfo, type CategoryInfo } from "$lib/modules/filesystem";
|
||||
import { getCategoryInfo, type MaybeCategoryInfo } from "$lib/modules/filesystem";
|
||||
import { masterKeyStore } from "$lib/stores";
|
||||
import CategoryDeleteModal from "./CategoryDeleteModal.svelte";
|
||||
import CategoryMenuBottomSheet from "./CategoryMenuBottomSheet.svelte";
|
||||
@@ -18,7 +18,7 @@
|
||||
let { data } = $props();
|
||||
let context = createContext();
|
||||
|
||||
let infoPromise: Promise<CategoryInfo> | undefined = $state();
|
||||
let infoPromise: Promise<MaybeCategoryInfo> | undefined = $state();
|
||||
|
||||
let isCategoryCreateModalOpen = $state(false);
|
||||
let isCategoryMenuBottomSheetOpen = $state(false);
|
||||
@@ -35,7 +35,7 @@
|
||||
</svelte:head>
|
||||
|
||||
{#await infoPromise then info}
|
||||
{#if info}
|
||||
{#if info?.exists}
|
||||
{#if info.id !== "root"}
|
||||
<TopBar title={info.name} />
|
||||
{/if}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import { page } from "$app/state";
|
||||
import { FloatingButton } from "$lib/components/atoms";
|
||||
import { TopBar } from "$lib/components/molecules";
|
||||
import { getDirectoryInfo, type DirectoryInfo } from "$lib/modules/filesystem";
|
||||
import { getDirectoryInfo, type MaybeDirectoryInfo } from "$lib/modules/filesystem";
|
||||
import { masterKeyStore, hmacSecretStore } from "$lib/stores";
|
||||
import DirectoryCreateModal from "./DirectoryCreateModal.svelte";
|
||||
import DirectoryEntries from "./DirectoryEntries";
|
||||
@@ -29,7 +29,7 @@
|
||||
let { data } = $props();
|
||||
let context = createContext();
|
||||
|
||||
let infoPromise: Promise<DirectoryInfo> | undefined = $state();
|
||||
let infoPromise: Promise<MaybeDirectoryInfo> | undefined = $state();
|
||||
let fileInput: HTMLInputElement | undefined = $state();
|
||||
let duplicatedFile: File | undefined = $state();
|
||||
let resolveForDuplicateFileModal: ((res: boolean) => void) | undefined = $state();
|
||||
@@ -89,7 +89,7 @@
|
||||
<input bind:this={fileInput} onchange={uploadFile} type="file" multiple class="hidden" />
|
||||
|
||||
{#await infoPromise then info}
|
||||
{#if info}
|
||||
{#if info?.exists}
|
||||
<div class="flex h-full flex-col">
|
||||
{#if showTopBar}
|
||||
<TopBar title={info.name} class="flex-shrink-0" />
|
||||
|
||||
@@ -2,11 +2,11 @@
|
||||
import { onMount } from "svelte";
|
||||
import { goto } from "$app/navigation";
|
||||
import { EntryButton, FileThumbnailButton } from "$lib/components/atoms";
|
||||
import { getFileInfo, type FileInfo } from "$lib/modules/filesystem";
|
||||
import { getFileInfo, type MaybeFileInfo } from "$lib/modules/filesystem";
|
||||
import { masterKeyStore } from "$lib/stores";
|
||||
import { requestFreshMediaFilesRetrieval } from "./service";
|
||||
|
||||
let mediaFiles: (FileInfo | null)[] = $state([]);
|
||||
let mediaFiles: MaybeFileInfo[] = $state([]);
|
||||
|
||||
onMount(async () => {
|
||||
const files = await requestFreshMediaFilesRetrieval();
|
||||
@@ -29,7 +29,7 @@
|
||||
{#if mediaFiles.length > 0}
|
||||
<div class="grid grid-cols-4 gap-2 p-2">
|
||||
{#each mediaFiles as file}
|
||||
{#if file}
|
||||
{#if file.exists}
|
||||
<FileThumbnailButton info={file} onclick={({ id }) => goto(`/file/${id}`)} />
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
Reference in New Issue
Block a user