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) {
|
||||
return confirm({
|
||||
title: `Delete ${length} items?`,
|
||||
message:
|
||||
"These items will be **kept in your Trash for 7 days** after which they will be permanently deleted.",
|
||||
message: `These items will be **kept in your Trash for ${
|
||||
db.settings?.getTrashCleanupInterval() || 7
|
||||
} days** after which they will be permanently deleted.`,
|
||||
positiveButtonText: "Yes",
|
||||
negativeButtonText: "No"
|
||||
});
|
||||
|
||||
@@ -133,6 +133,9 @@ class Settings {
|
||||
await this._saveSettings();
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {7 | 30 | 365 | -1}
|
||||
*/
|
||||
getTrashCleanupInterval() {
|
||||
return this._settings.trashCleanupInterval || 7;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user