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 @@