get local files

This commit is contained in:
m
2026-08-25 17:48:47 +02:00
parent a791df26bf
commit 4602f1da79
2 changed files with 22 additions and 5 deletions
+9
View File
@@ -562,6 +562,15 @@ export const fileStore = {
return rows.map((r) => rowToRecord(r, getTagsForFile(r.id)));
},
getLocalDeviceFiles(): FileRecord[] {
const d = getDb();
const rows = d.select().from(files)
.where(and(eq(files.source, 'local'), isNull(files.backendId)))
.orderBy(desc(files.createdAt))
.all() as FileRow[];
return rows.map((r) => rowToRecord(r, getTagsForFile(r.id)));
},
getAllSynced(): FileRecord[] {
const d = getDb();
const rows = d.select().from(files)