feat: loading toasts for all photo actions
Add loading→success/error toast transition to every bulk operation (archive, restore, delete, approve, add-to-heap, metadata patch). Also wires gridKeyNav + CauseGroupCard into the bulkAction store so keyboard-triggered actions show the same per-tile pending/done/error feedback as BulkActionBar buttons.
This commit is contained in:
@@ -714,6 +714,7 @@
|
||||
return;
|
||||
}
|
||||
emptyingArchive = true;
|
||||
const tid = toast.loading("Emptying archive…");
|
||||
let total = 0;
|
||||
try {
|
||||
while (true) {
|
||||
@@ -729,9 +730,9 @@
|
||||
await batchDelete(uids);
|
||||
total += uids.length;
|
||||
}
|
||||
toast.success(total === 0 ? "Archive already empty" : `Deleted ${total}`);
|
||||
toast.success(total === 0 ? "Archive already empty" : `Deleted ${total}`, { id: tid });
|
||||
} catch (err) {
|
||||
toast.error(err instanceof Error ? err.message : "Empty archive failed");
|
||||
toast.error(err instanceof Error ? err.message : "Empty archive failed", { id: tid });
|
||||
} finally {
|
||||
emptyingArchive = false;
|
||||
void qc.invalidateQueries({ queryKey: ["photos"] });
|
||||
|
||||
Reference in New Issue
Block a user