typescript-typenfehler behoben.. npm run lint läuft nun fehlerfrei durch.

This commit is contained in:
Codex Agent
2025-11-22 11:49:47 +01:00
parent 6c78d7e281
commit eb41cb6194
74 changed files with 469 additions and 396 deletions

View File

@@ -30,7 +30,9 @@ export async function enqueue(item: Omit<QueueItem, 'id' | 'status' | 'retries'
try {
const reg = await navigator.serviceWorker.ready;
(reg as ServiceWorkerRegistration & { sync?: SyncManager }).sync?.register('upload-queue');
} catch {}
} catch (error) {
console.warn('Background sync registration failed', error);
}
}
}
@@ -83,7 +85,9 @@ async function attemptUpload(it: QueueItem): Promise<boolean> {
(pct) => {
try {
window.dispatchEvent(new CustomEvent('queue-progress', { detail: { id: it.id, progress: pct } }));
} catch {}
} catch (error) {
console.warn('Queue progress dispatch failed', error);
}
}
);
// mark my-photo-ids for "Meine"
@@ -91,7 +95,9 @@ async function attemptUpload(it: QueueItem): Promise<boolean> {
const raw = localStorage.getItem('my-photo-ids');
const arr: number[] = raw ? JSON.parse(raw) : [];
if (json.id && !arr.includes(json.id)) localStorage.setItem('my-photo-ids', JSON.stringify([json.id, ...arr]));
} catch {}
} catch (error) {
console.warn('Failed to persist my-photo-ids', error);
}
notify('Upload erfolgreich', 'success');
return true;
} catch {