From b55f6e25439e1dd7c7ee2906936d75d7c76183b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Leon=20Gr=C3=BCnewald?= <10533763+dhalucario@users.noreply.github.com> Date: Sat, 9 Nov 2024 00:56:04 +0100 Subject: [PATCH] WIP UI --- src/lib/components/AppSettings.svelte | 1 - src/lib/components/BackButton.svelte | 4 ++-- src/lib/components/GlobalSearch.svelte | 4 ++-- src/lib/components/Header.svelte | 21 +++++++++++++------- src/lib/components/PostMedia.svelte | 11 +++++++++-- src/lib/components/index.js | 4 ++-- src/routes/posts/[post_id]/+page.svelte | 26 ++++++++++++------------- src/routes/settings/+page.svelte | 14 +++++++++++-- 8 files changed, 53 insertions(+), 32 deletions(-) diff --git a/src/lib/components/AppSettings.svelte b/src/lib/components/AppSettings.svelte index b81b056..7ce1332 100644 --- a/src/lib/components/AppSettings.svelte +++ b/src/lib/components/AppSettings.svelte @@ -1,5 +1,4 @@ - - + + diff --git a/src/lib/components/GlobalSearch.svelte b/src/lib/components/GlobalSearch.svelte index cca0f9c..b567125 100644 --- a/src/lib/components/GlobalSearch.svelte +++ b/src/lib/components/GlobalSearch.svelte @@ -17,6 +17,6 @@ loading.set(true); onsubmit?.(searchString, true); }}> - - + + \ No newline at end of file diff --git a/src/lib/components/Header.svelte b/src/lib/components/Header.svelte index 9d93230..5c9c4ad 100644 --- a/src/lib/components/Header.svelte +++ b/src/lib/components/Header.svelte @@ -1,13 +1,20 @@ -
+
{#if back} - + {/if} - { - onsubmit?.(val, explicitRefresh); - }} /> + {#if showSearch} + { + onsubmit?.(val, explicitRefresh); + }} /> + {/if} + + +
diff --git a/src/lib/components/PostMedia.svelte b/src/lib/components/PostMedia.svelte index 2c47e1f..9aa14a6 100644 --- a/src/lib/components/PostMedia.svelte +++ b/src/lib/components/PostMedia.svelte @@ -9,16 +9,23 @@ /** @type {Props} */ let { post = null, class: className} = $props(); + let elemRef; {#if post?.preview?.has} {`Post {:else} {#if ['webm', 'mp4'].includes(post.file.ext)} -