feat(storage): show unreferenced files in Admin > Storage, with the switch and a check

Desktop and phone show what the last check found (can be freed, unused for
less than a week, freed), why a category was skipped, the switch that lets
the nightly run delete and a report-only check on demand, through the
shared storage panel hook. All 28 languages, and the Admin-Storage wiki
page explains the check, the week's wait and when to leave it off.
This commit is contained in:
Maurice
2026-11-01 14:30:01 +01:00
parent b31666d1c9
commit a1d9cdc8f2
42 changed files with 1179 additions and 3 deletions
+8
View File
@@ -56,6 +56,8 @@ import {
type BookingImportMode,
type ReceiptScanResult,
type StorageAdminState,
type StorageReclaimReport,
type StorageReclaimState,
type StorageBackend,
type StorageConfigPut,
type StorageTestResponse,
@@ -734,6 +736,12 @@ export const adminApi = {
// A full scan of a large install can exceed the 8s instance timeout.
refreshStorageStats: (): Promise<StorageUsage> =>
apiClient.post('/admin/storage/stats/refresh', undefined, { timeout: 120_000 }).then(r => r.data),
setStorageReclaimDelete: (deleteEnabled: boolean): Promise<StorageReclaimState> =>
apiClient.put('/admin/storage/reclaim', { deleteEnabled }).then(r => r.data),
// A check lists every reclaimable category and asks each domain about it; a
// large bucket outlasts the 8s instance timeout. It only reports, whatever the switch says.
runStorageReclaimCheck: (): Promise<StorageReclaimReport> =>
apiClient.post('/admin/storage/reclaim/run', { reportOnly: true }, { timeout: 300_000 }).then(r => r.data),
}
export const addonsApi = {