optional cleanup of unused images

This commit is contained in:
azivner
2018-01-07 14:07:59 -05:00
parent bde9e825c8
commit 31b4186e17
6 changed files with 63 additions and 5 deletions

View File

@@ -157,6 +157,7 @@ settings.addModule((async function () {
const fillSyncRowsButton = $("#fill-sync-rows-button");
const anonymizeButton = $("#anonymize-button");
const cleanupSoftDeletedButton = $("#cleanup-soft-deleted-items-button");
const cleanupUnusedImagesButton = $("#cleanup-unused-images-button");
const vacuumDatabaseButton = $("#vacuum-database-button");
forceFullSyncButton.click(async () => {
@@ -186,6 +187,14 @@ settings.addModule((async function () {
}
});
cleanupUnusedImagesButton.click(async () => {
if (confirm("Do you really want to clean up unused images?")) {
await server.post('cleanup/cleanup-unused-images');
showMessage("Unused images have been cleaned up");
}
});
vacuumDatabaseButton.click(async () => {
await server.post('cleanup/vacuum-database');