mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
누락된 썸네일 생성 기능 구현
This commit is contained in:
33
src/routes/(fullscreen)/settings/thumbnails/File.svelte
Normal file
33
src/routes/(fullscreen)/settings/thumbnails/File.svelte
Normal file
@@ -0,0 +1,33 @@
|
||||
<script lang="ts">
|
||||
import type { Writable } from "svelte/store";
|
||||
import { ActionEntryButton } from "$lib/components/atoms";
|
||||
import { DirectoryEntryLabel } from "$lib/components/molecules";
|
||||
import type { FileInfo } from "$lib/modules/filesystem";
|
||||
import { formatDateTime } from "$lib/modules/util";
|
||||
|
||||
import IconCamera from "~icons/material-symbols/camera";
|
||||
|
||||
interface Props {
|
||||
info: Writable<FileInfo | null>;
|
||||
onclick: (selectedFile: FileInfo) => void;
|
||||
onGenerateThumbnailClick: (selectedFile: FileInfo) => void;
|
||||
}
|
||||
|
||||
let { info, onclick, onGenerateThumbnailClick }: Props = $props();
|
||||
</script>
|
||||
|
||||
{#if $info}
|
||||
<ActionEntryButton
|
||||
class="h-14"
|
||||
onclick={() => onclick($info)}
|
||||
actionButtonIcon={IconCamera}
|
||||
onActionButtonClick={() => onGenerateThumbnailClick($info)}
|
||||
actionButtonClass="text-gray-800"
|
||||
>
|
||||
<DirectoryEntryLabel
|
||||
type="file"
|
||||
name={$info.name}
|
||||
subtext={formatDateTime($info.createdAt ?? $info.lastModifiedAt)}
|
||||
/>
|
||||
</ActionEntryButton>
|
||||
{/if}
|
||||
Reference in New Issue
Block a user