diff --git a/src/i18n/locales/en-US.ts b/src/i18n/locales/en-US.ts index 38cca97..429bf29 100644 --- a/src/i18n/locales/en-US.ts +++ b/src/i18n/locales/en-US.ts @@ -210,6 +210,8 @@ export default { count: 'Download Count' }, maxSaveTime: 'Max Retention Period', + trashRetentionDays: 'Recycle Bin Default Retention', + trashRetentionDaysNote: 'Changing this recalculates cleanup time for dated items currently in the recycle bin. Permanent and already purged items are not affected.', timeUnits: { second: 'sec', minute: 'min', @@ -757,6 +759,8 @@ export default { count: 'Download Count' }, maxSaveTime: 'Max Retention Period', + trashRetentionDays: 'Recycle Bin Default Retention', + trashRetentionDaysNote: 'Changing this recalculates cleanup time for dated items currently in the recycle bin. Permanent and already purged items are not affected.', timeUnits: { second: 'sec', minute: 'min', @@ -839,6 +843,8 @@ export default { count: 'Download Count' }, maxSaveTime: 'Max Retention Period', + trashRetentionDays: 'Recycle Bin Default Retention', + trashRetentionDaysNote: 'Changing this recalculates cleanup time for dated items currently in the recycle bin. Permanent and already purged items are not affected.', timeUnits: { second: 'sec', minute: 'min', diff --git a/src/i18n/locales/zh-CN.ts b/src/i18n/locales/zh-CN.ts index a2b135b..5c5b320 100644 --- a/src/i18n/locales/zh-CN.ts +++ b/src/i18n/locales/zh-CN.ts @@ -210,6 +210,8 @@ export default { count: '按下载次数' }, maxSaveTime: '文件最长保存时间', + trashRetentionDays: '回收站默认保留期', + trashRetentionDaysNote: '修改后会重新计算当前回收站中有期限文件的清理时间;已设为永久或已清理的文件不受影响。', timeUnits: { second: '秒', minute: '分钟', @@ -926,6 +928,8 @@ export default { count: '按下载次数' }, maxSaveTime: '文件最长保存时间', + trashRetentionDays: '回收站默认保留期', + trashRetentionDaysNote: '修改后会重新计算当前回收站中有期限文件的清理时间;已设为永久或已清理的文件不受影响。', timeUnits: { second: '秒', minute: '分钟', diff --git a/src/types/config.ts b/src/types/config.ts index cedc534..755edac 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -43,6 +43,7 @@ export interface ConfigState { storage_path: string uploadMinute: number max_save_seconds: number + trashRetentionDays: number opacity: number enableChunk: number s3_access_key_id: string diff --git a/src/utils/config-storage.ts b/src/utils/config-storage.ts index 2c03801..3bcc512 100644 --- a/src/utils/config-storage.ts +++ b/src/utils/config-storage.ts @@ -41,6 +41,7 @@ export const DEFAULT_CONFIG_STATE: ConfigState = { storage_path: '', uploadMinute: 1, max_save_seconds: DEFAULT_PUBLIC_CONFIG.max_save_seconds, + trashRetentionDays: 30, opacity: 0.9, enableChunk: DEFAULT_PUBLIC_CONFIG.enableChunk, s3_access_key_id: '', diff --git a/src/views/manage/SystemSettingsView.vue b/src/views/manage/SystemSettingsView.vue index aaeea2a..5147330 100644 --- a/src/views/manage/SystemSettingsView.vue +++ b/src/views/manage/SystemSettingsView.vue @@ -748,6 +748,16 @@ onMounted(() => { + + +
+ {{ t('manage.settings.trashRetentionDaysNote') }} +
+