mirror of
https://github.com/kmc7468/arkvault.git
synced 2026-02-04 08:06:56 +00:00
갤러리 페이지 구현
This commit is contained in:
25
src/routes/(fullscreen)/gallery/+page.svelte
Normal file
25
src/routes/(fullscreen)/gallery/+page.svelte
Normal file
@@ -0,0 +1,25 @@
|
||||
<script lang="ts">
|
||||
import type { Writable } from "svelte/store";
|
||||
import { goto } from "$app/navigation";
|
||||
import { FullscreenDiv } from "$lib/components/atoms";
|
||||
import { Gallery, TopBar } from "$lib/components/molecules";
|
||||
import { getFileInfo, type FileInfo } from "$lib/modules/filesystem";
|
||||
import { masterKeyStore } from "$lib/stores";
|
||||
|
||||
let { data } = $props();
|
||||
|
||||
let files: Writable<FileInfo | null>[] = $state([]);
|
||||
|
||||
$effect(() => {
|
||||
files = data.files.map((file) => getFileInfo(file, $masterKeyStore?.get(1)?.key!));
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>사진 및 동영상</title>
|
||||
</svelte:head>
|
||||
|
||||
<TopBar title="사진 및 동영상" />
|
||||
<FullscreenDiv>
|
||||
<Gallery {files} onFileClick={({ id }) => goto(`/file/${id}`)} />
|
||||
</FullscreenDiv>
|
||||
Reference in New Issue
Block a user