feat(files): the Files page — the library in one aligned list, its folders in a rail
Files is the one library: every done file, the ones shared with me, or one folder's, picked in a side rail (sources, own folders, the storage meter) and mirrored to ?folder=. One table with every kind of value in its own column; Copy link, Share and Save in sight, every action on a right click: play, cut, rename in the row, move to an own folder or back home, keep, details, re-download, delete. The Downloads page keeps only the queue until the tray replaces it. The old /api/downloads library routes are gone: list shared, upload, the details PATCH, delete, the file and the usage now live under /api/files, and a listed file says which source it came from. The job's "expired" flag is gone with the state it described.
This commit is contained in:
@@ -5,12 +5,15 @@ import { copyText } from "./clipboard";
|
||||
import { notify } from "./notifications";
|
||||
import { notifyActionError } from "./actionErrors";
|
||||
|
||||
// The download queue, the per-card download index, and the storage-usage meter all move together
|
||||
// whenever a job is enqueued, deleted, or its state changes — invalidate them as one unit.
|
||||
// The download queue, the per-card download index, the library (its listings and folder counts) and
|
||||
// the storage meter all move together whenever a job is enqueued, deleted, finishes, or a file is
|
||||
// renamed or moved — invalidate them as one unit.
|
||||
export function invalidateDownloads(qc: QueryClient) {
|
||||
qc.invalidateQueries({ queryKey: qk.downloads() });
|
||||
qc.invalidateQueries({ queryKey: qk.downloadIndex() });
|
||||
qc.invalidateQueries({ queryKey: qk.downloadUsage() });
|
||||
qc.invalidateQueries({ queryKey: qk.files() });
|
||||
qc.invalidateQueries({ queryKey: qk.fileFolders() });
|
||||
qc.invalidateQueries({ queryKey: qk.storageUsage() });
|
||||
}
|
||||
|
||||
// One-click share: the row's Share button turns "share this" into a single action.
|
||||
|
||||
Reference in New Issue
Block a user