mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 18:04:18 +00:00
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:
@@ -17,6 +17,7 @@ import MToggle from '../../components/MToggle'
|
||||
import MStorageTestResult from '../../components/MStorageTestResult'
|
||||
import MSetPickerSheet from '../settings/MSetPickerSheet'
|
||||
import MConfirmSheet from '../settings/MConfirmSheet'
|
||||
import MStorageReclaimCard from './MStorageReclaimCard'
|
||||
import { MSetSelectRow } from '../settings/MSettingsUi'
|
||||
import { MAdminButton, MAdminCard, MAdminCardHead, MAdminField, MAdminInput, MAdminSecretInput } from './MAdminUi'
|
||||
|
||||
@@ -172,6 +173,7 @@ export default function MAdminStoragePanel(): React.ReactElement {
|
||||
const {
|
||||
admin, editing, setEditing, confirmRemove, setConfirmRemove, syncPrompt, setSyncPrompt, migratePrompt,
|
||||
handleCancelMigration, handleRefreshStats, handleStartBackfill, handleCancelBackfill, loaded,
|
||||
reclaim, reclaimChecking, handleReclaimCheck, handleReclaimDelete,
|
||||
} = useStoragePanel()
|
||||
const [categoryPicker, setCategoryPicker] = useState<StorageCategory | null>(null)
|
||||
|
||||
@@ -565,6 +567,13 @@ export default function MAdminStoragePanel(): React.ReactElement {
|
||||
</div>
|
||||
)}
|
||||
|
||||
<MStorageReclaimCard
|
||||
reclaim={reclaim}
|
||||
checking={reclaimChecking}
|
||||
onCheck={() => void handleReclaimCheck()}
|
||||
onDelete={(enabled) => void handleReclaimDelete(enabled)}
|
||||
/>
|
||||
|
||||
<MConfirmSheet
|
||||
open={confirmRemove !== null}
|
||||
onClose={() => setConfirmRemove(null)}
|
||||
|
||||
Reference in New Issue
Block a user