sprint: fixes batch — saveNote history, DeepSeek retry, channel rotation, test fixes, docker env, blocking transcript, sync errors
This commit is contained in:
@@ -88,8 +88,14 @@
|
||||
syncMessage = 'Syncing...';
|
||||
try {
|
||||
const res = await fetch('/api/videos/fetch', { method: 'POST' });
|
||||
if (res.ok) setTimeout(() => { loadVideos(); isSyncing = false; syncMessage = ''; }, 6000);
|
||||
} catch (err) { isSyncing = false; syncMessage = ''; }
|
||||
if (res.ok) {
|
||||
syncMessage = 'Sync started...';
|
||||
setTimeout(() => { loadVideos(); isSyncing = false; syncMessage = ''; }, 6000);
|
||||
} else {
|
||||
isSyncing = false;
|
||||
syncMessage = 'Sync failed';
|
||||
}
|
||||
} catch (err) { isSyncing = false; syncMessage = 'Network error'; }
|
||||
}
|
||||
|
||||
async function updateStatus(videoId, newStatus, silent = false) {
|
||||
@@ -217,8 +223,12 @@
|
||||
function saveNote() {
|
||||
const vid = selectedVideo?.video_id;
|
||||
if (!vid) return;
|
||||
const text = notes[vid] || '';
|
||||
const stamped = text && !text.startsWith('[') ? `[${new Date().toLocaleString()}] ${text}` : text;
|
||||
const prev = notes[vid] || '';
|
||||
const textarea = document.querySelector('#note-textarea');
|
||||
const current = textarea ? textarea.value : prev;
|
||||
if (!current.trim()) return;
|
||||
const ts = new Date().toLocaleString();
|
||||
const stamped = `[${ts}] ${current.trim()}\n${prev}`;
|
||||
notes = {...notes, [vid]: stamped};
|
||||
localStorage.setItem('t-yt-notes', JSON.stringify(notes));
|
||||
activeNote = null;
|
||||
@@ -377,7 +387,7 @@
|
||||
<!-- Note editor/viewer -->
|
||||
{#if activeNote === selectedVideo.video_id}
|
||||
<div class="space-y-1.5">
|
||||
<textarea rows="2" class="w-full text-xs p-2 rounded border resize-none"
|
||||
<textarea id="note-textarea" rows="2" class="w-full text-xs p-2 rounded border resize-none"
|
||||
style="background:var(--bg-tertiary);color:var(--text-primary);border-color:var(--border)"
|
||||
placeholder="Quick note..."
|
||||
value={notes[selectedVideo.video_id] || ''}
|
||||
|
||||
Reference in New Issue
Block a user