From 5c641903c90be51668a81a278e65a9a3d41130ae Mon Sep 17 00:00:00 2001 From: "Gan, Jimmy" Date: Sat, 27 Jun 2026 01:40:06 +0800 Subject: [PATCH] fix: clickable channel badge filters by channel; fix cat dropdown value; clean up saveNote --- frontend/src/routes/YoutubeDashboard.svelte | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/frontend/src/routes/YoutubeDashboard.svelte b/frontend/src/routes/YoutubeDashboard.svelte index 59c8a66..fc1cacc 100644 --- a/frontend/src/routes/YoutubeDashboard.svelte +++ b/frontend/src/routes/YoutubeDashboard.svelte @@ -217,10 +217,9 @@ function saveNote() { const vid = selectedVideo?.video_id; if (!vid) return; - const existing = notes[vid] || ''; - if (existing && !existing.startsWith('[')) { - notes[vid] = `[${new Date().toLocaleString()}] ${existing}`; - } + const text = notes[vid] || ''; + const stamped = text && !text.startsWith('[') ? `[${new Date().toLocaleString()}] ${text}` : text; + notes = {...notes, [vid]: stamped}; localStorage.setItem('t-yt-notes', JSON.stringify(notes)); activeNote = null; } @@ -283,7 +282,7 @@ {#if catList.length} {#each catList as cat} - + {/each} {/if} @@ -359,7 +358,10 @@
- {selectedVideo.channel_name} + { channelFilter = selectedVideo.channel_name; }} + title="Filter by this channel">{selectedVideo.channel_name}

{selectedVideo.title}