mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 06:59:31 +01:00
web: replace fixed 7 days with trash cleanup interval
This commit is contained in:
@@ -209,8 +209,9 @@ export function showError(title: string, message: string) {
|
|||||||
export function showMultiDeleteConfirmation(length: number) {
|
export function showMultiDeleteConfirmation(length: number) {
|
||||||
return confirm({
|
return confirm({
|
||||||
title: `Delete ${length} items?`,
|
title: `Delete ${length} items?`,
|
||||||
message:
|
message: `These items will be **kept in your Trash for ${
|
||||||
"These items will be **kept in your Trash for 7 days** after which they will be permanently deleted.",
|
db.settings?.getTrashCleanupInterval() || 7
|
||||||
|
} days** after which they will be permanently deleted.`,
|
||||||
positiveButtonText: "Yes",
|
positiveButtonText: "Yes",
|
||||||
negativeButtonText: "No"
|
negativeButtonText: "No"
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -133,6 +133,9 @@ class Settings {
|
|||||||
await this._saveSettings();
|
await this._saveSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @returns {7 | 30 | 365 | -1}
|
||||||
|
*/
|
||||||
getTrashCleanupInterval() {
|
getTrashCleanupInterval() {
|
||||||
return this._settings.trashCleanupInterval || 7;
|
return this._settings.trashCleanupInterval || 7;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user