mirror of
https://github.com/zadam/trilium.git
synced 2025-11-03 11:56:01 +01:00
cleanup of soft deleted items
vacuuming database consolidation of "advanced" operations in settings
This commit is contained in:
@@ -155,6 +155,9 @@ settings.addModule((async function () {
|
||||
settings.addModule((async function () {
|
||||
const forceFullSyncButton = $("#force-full-sync-button");
|
||||
const fillSyncRowsButton = $("#fill-sync-rows-button");
|
||||
const anonymizeButton = $("#anonymize-button");
|
||||
const cleanupSoftDeletedButton = $("#cleanup-soft-deleted-items-button");
|
||||
const vacuumDatabaseButton = $("#vacuum-database-button");
|
||||
|
||||
forceFullSyncButton.click(async () => {
|
||||
await server.post('sync/force-full-sync');
|
||||
@@ -168,11 +171,6 @@ settings.addModule((async function () {
|
||||
showMessage("Sync rows filled successfully");
|
||||
});
|
||||
|
||||
return {};
|
||||
})());
|
||||
|
||||
settings.addModule((async function () {
|
||||
const anonymizeButton = $("#anonymize-button");
|
||||
|
||||
anonymizeButton.click(async () => {
|
||||
await server.post('anonymization/anonymize');
|
||||
@@ -180,5 +178,19 @@ settings.addModule((async function () {
|
||||
showMessage("Created anonymized database");
|
||||
});
|
||||
|
||||
cleanupSoftDeletedButton.click(async () => {
|
||||
if (confirm("Do you really want to clean up soft-deleted items?")) {
|
||||
await server.post('cleanup/cleanup-soft-deleted-items');
|
||||
|
||||
showMessage("Soft deleted items have been cleaned up");
|
||||
}
|
||||
});
|
||||
|
||||
vacuumDatabaseButton.click(async () => {
|
||||
await server.post('cleanup/vacuum-database');
|
||||
|
||||
showMessage("Database has been vacuumed");
|
||||
});
|
||||
|
||||
return {};
|
||||
})());
|
||||
Reference in New Issue
Block a user