Admin UX: light/dark theme, gallery pagination, content modal + delete, openai type
- Light/dark theme toggle persisted in localStorage - Gallery pagination: page size 50/100/150/200 with prev/next - Fullscreen modal viewer (image/video/audio) with metadata and delete - Delete content: DELETE /api/generations/:id removes file (media-dir guarded) and journal record; added Journal.deleteById - Provider types now include openai - HTML output escaping in UI
This commit is contained in:
@@ -106,6 +106,11 @@ export class Journal {
|
||||
return rows as GenerationRecord[];
|
||||
}
|
||||
|
||||
deleteById(id: string): boolean {
|
||||
const r = this.db.prepare('DELETE FROM generations WHERE id = ?').run(id);
|
||||
return r.changes > 0;
|
||||
}
|
||||
|
||||
stats(sinceDays?: number): UsageStats {
|
||||
const filter = sinceDays
|
||||
? `WHERE created_at >= datetime('now', '-${Math.max(1, Math.floor(sinceDays))} days')`
|
||||
|
||||
Reference in New Issue
Block a user