diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index 7542980a7..910e22100 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1171,6 +1171,8 @@ const message = { recycleBin: 'Recycle bin', sourcePath: 'Original path', deleteTime: 'Delete time', + confirmReduce: 'Are you sure you want to restore the following files?', + reduceSuccess: 'Restore successful', reduce: 'Reduction', reduceHelper: 'If a file or directory with the same name exists in the original path, it will be overwritten. Do you want to continue?', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index c67659277..158ea3886 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -1111,6 +1111,8 @@ const message = { recycleBin: '回收站', sourcePath: '原路徑', deleteTime: '刪除時間', + confirmReduce: '確定還原以下文件?', + reduceSuccess: '還原成功', reduce: '還原', reduceHelper: '如果原路徑存在同名檔案或目錄,將會被覆蓋,是否繼續?', clearRecycleBin: '清空回收站', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index 2e32adacf..af6939a93 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1114,6 +1114,8 @@ const message = { sourcePath: '原路径', deleteTime: '删除时间', reduce: '还原', + confirmReduce: '确定还原以下文件?', + reduceSuccess: '还原成功', reduceHelper: '如果原路径存在同名文件或目录,将会被覆盖,是否继续?', clearRecycleBin: '清空回收站', clearRecycleBinHelper: '是否清空回收站?', diff --git a/frontend/src/views/host/file-management/recycle-bin/index.vue b/frontend/src/views/host/file-management/recycle-bin/index.vue index b1f91ce77..868db749a 100644 --- a/frontend/src/views/host/file-management/recycle-bin/index.vue +++ b/frontend/src/views/host/file-management/recycle-bin/index.vue @@ -16,6 +16,9 @@ {{ $t('commons.button.delete') }} + + {{ $t('file.reduce') }} + @@ -53,6 +56,7 @@ + @@ -62,6 +66,7 @@ import { reactive, ref } from 'vue'; import { dateFormat, computeSize } from '@/utils/util'; import i18n from '@/lang'; import Delete from './delete/index.vue'; +import Reduce from './reduce/index.vue'; import { updateSetting } from '@/api/modules/setting'; import { MsgSuccess } from '@/utils/message'; @@ -85,6 +90,7 @@ const paginationConfig = reactive({ }); const deleteRef = ref(); +const reduceRef = ref(); const handleClose = () => { open.value = false; @@ -138,6 +144,11 @@ const patchDelete = () => { deleteRef.value.acceptParams(files.value); }; +const patchReduce = () => { + files.value = selects.value; + reduceRef.value.acceptParams(files.value); +}; + const rdFile = async (row: any) => { ElMessageBox.confirm(i18n.global.t('file.reduceHelper'), i18n.global.t('file.reduce'), { confirmButtonText: i18n.global.t('commons.button.confirm'), diff --git a/frontend/src/views/host/file-management/recycle-bin/reduce/index.vue b/frontend/src/views/host/file-management/recycle-bin/reduce/index.vue new file mode 100644 index 000000000..28710b3cf --- /dev/null +++ b/frontend/src/views/host/file-management/recycle-bin/reduce/index.vue @@ -0,0 +1,73 @@ + +