From 44a260b5b64add3adce2ef6715daf230864ea7d0 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Tue, 15 Apr 2025 01:05:02 +0200 Subject: [PATCH 1/3] Show Note preview on Card Often, you end up having short notes or even just a simple link and it is somewhat tedious to go into the details to retrieve the additional information. This patch displays a preview of the note content and a maximum of three links on the notes card directly. This makes accessing information much faster. This fixes #562. --- frontend/src/lib/components/NoteCard.svelte | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/frontend/src/lib/components/NoteCard.svelte b/frontend/src/lib/components/NoteCard.svelte index 9b6ba62..c973084 100644 --- a/frontend/src/lib/components/NoteCard.svelte +++ b/frontend/src/lib/components/NoteCard.svelte @@ -71,11 +71,28 @@ {#if unlinked}
{$t('adventures.out_of_range')}
{/if} + {#if note.content && note.content.length > 0} +

+ {note.content} +

+ {/if} {#if note.links && note.links.length > 0}

{note.links.length} {note.links.length > 1 ? $t('adventures.links') : $t('adventures.link')}

+ {/if} {#if note.date && note.date !== ''}
From e40ea028d0d1abf121c91ebd26b34c248204f166 Mon Sep 17 00:00:00 2001 From: Lars Kiesow Date: Sat, 26 Apr 2025 22:53:45 +0200 Subject: [PATCH 2/3] Collection view selection on mobile devices The tab-based selection of views in a collection doesn't really work on mobile devices since it needs too much horizontal space. This leads to text overflowing buttons as well as half of the tab bar disappearing behind the right edge of the phone screen. This patch modifies the navigation by keeping the current tabs in desktop mode, but switching to a very compact dropdown on mobile devices. The functionality of both elements is identical. --- .../src/routes/collections/[id]/+page.svelte | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/frontend/src/routes/collections/[id]/+page.svelte b/frontend/src/routes/collections/[id]/+page.svelte index ab12175..b57af12 100644 --- a/frontend/src/routes/collections/[id]/+page.svelte +++ b/frontend/src/routes/collections/[id]/+page.svelte @@ -308,6 +308,10 @@ } } + function changeHash(event) { + window.location.hash = '#' + event.target.value; + } + onMount(() => { if (data.props.adventure) { collection = data.props.adventure; @@ -772,7 +776,17 @@ {/if} {#if collection.id} -
+ +