From 6fa7711a43962084dc362d6f49733f0b8c2bed31 Mon Sep 17 00:00:00 2001 From: averrin Date: Sat, 19 Nov 2022 12:31:09 +0100 Subject: [PATCH] 0.4.13 --- src/view/components/ActiveEffectThumb.svelte | 60 ++++++++ src/view/components/FileThumb.svelte | 137 +++++++++++++++++++ 2 files changed, 197 insertions(+) create mode 100644 src/view/components/ActiveEffectThumb.svelte create mode 100644 src/view/components/FileThumb.svelte diff --git a/src/view/components/ActiveEffectThumb.svelte b/src/view/components/ActiveEffectThumb.svelte new file mode 100644 index 0000000..9f00fc0 --- /dev/null +++ b/src/view/components/ActiveEffectThumb.svelte @@ -0,0 +1,60 @@ + + +
+

+
+ + {title} +

+ {#if item?.data?.data?.description?.value} + {@html formatDescription(item?.data?.data?.description?.value)} + {/if} +
+ +{#if tooltip} +
null} + on:click + on:dragstart={drag} + style:cursor="grab" + use:tippy={props} + /> +{/if} diff --git a/src/view/components/FileThumb.svelte b/src/view/components/FileThumb.svelte new file mode 100644 index 0000000..382f659 --- /dev/null +++ b/src/view/components/FileThumb.svelte @@ -0,0 +1,137 @@ + + +
onFileClick(e, file)} + draggable="true" + on:dragstart={(e) => onDragStart(e, file)} + class:ui-w-full={mode == "list"} + style:background-position={mode == "list" ? "left" : "center"} + class:file-video={mode != "list" && (isVideo(file.name) || isSound(file.name))} + class:selected-file={selected} + use:tippy={{ + content: () => { + let content = `
${file.name}
`; + return content; + }, + placement: "bottom", + allowHTML: true, + }} +> + {#if isVideo(file.name) || isSound(file.name)} + + + {#if isSequencer && Sequencer.Database.inverseFlattenedEntries?.get(file.id)} + + {/if} + {/if} + + {#if (!isImage(file.name) && !isVideo(file.name) && !isSound(file.name)) || mode == "list"} +
+ {file.name} +
+ {/if} +
+ +