diff --git a/frontend/src/lang/modules/en.ts b/frontend/src/lang/modules/en.ts index ae9416b6a..2bdfe9179 100644 --- a/frontend/src/lang/modules/en.ts +++ b/frontend/src/lang/modules/en.ts @@ -1374,6 +1374,7 @@ const message = { existFileTitle: 'Same name file prompt', existFileHelper: 'The uploaded file contains a file with the same name, do you want to overwrite it?', existFileSize: 'File size (new -> old)', + existFileDirHelper: 'The selected file/folder has a duplicate name. Please proceed with caution!', }, ssh: { setting: 'Setting', diff --git a/frontend/src/lang/modules/ja.ts b/frontend/src/lang/modules/ja.ts index eb36f0f0d..357b73aba 100644 --- a/frontend/src/lang/modules/ja.ts +++ b/frontend/src/lang/modules/ja.ts @@ -1352,6 +1352,7 @@ const message = { existFileTitle: '同名ファイルの警告', existFileHelper: 'アップロードしたファイルに同じ名前のファイルが含まれています。上書きしますか?', existFileSize: 'ファイルサイズ(新しい -> 古い)', + existFileDirHelper: '選択したファイル/フォルダーには同じ名前のものが既に存在します。慎重に操作してください!', }, ssh: { setting: '設定', diff --git a/frontend/src/lang/modules/ko.ts b/frontend/src/lang/modules/ko.ts index ab7f185bf..d552ebb7d 100644 --- a/frontend/src/lang/modules/ko.ts +++ b/frontend/src/lang/modules/ko.ts @@ -1338,6 +1338,7 @@ const message = { existFileTitle: '동일한 이름의 파일 경고', existFileHelper: '업로드한 파일에 동일한 이름의 파일이 포함되어 있습니다. 덮어쓰시겠습니까?', existFileSize: '파일 크기 (새로운 -> 오래된)', + existFileDirHelper: '선택한 파일/폴더에 동일한 이름이 이미 존재합니다. 신중하게 작업하세요!', }, ssh: { setting: '설정', diff --git a/frontend/src/lang/modules/ms.ts b/frontend/src/lang/modules/ms.ts index 651f3accf..d4614bfc7 100644 --- a/frontend/src/lang/modules/ms.ts +++ b/frontend/src/lang/modules/ms.ts @@ -1394,6 +1394,7 @@ const message = { existFileTitle: 'Amaran fail dengan nama yang sama', existFileHelper: 'Fail yang dimuat naik mengandungi fail dengan nama yang sama. Adakah anda mahu menimpanya?', existFileSize: 'Saiz fail (baru -> lama)', + existFileDirHelper: 'Fail/folder yang dipilih mempunyai nama yang sama. Sila berhati-hati!', }, ssh: { setting: 'tetapan', diff --git a/frontend/src/lang/modules/pt-br.ts b/frontend/src/lang/modules/pt-br.ts index f4e725109..48ddfdce5 100644 --- a/frontend/src/lang/modules/pt-br.ts +++ b/frontend/src/lang/modules/pt-br.ts @@ -1381,6 +1381,7 @@ const message = { existFileTitle: 'Aviso de arquivo com o mesmo nome', existFileHelper: 'O arquivo enviado contém um arquivo com o mesmo nome. Deseja substituí-lo?', existFileSize: 'Tamanho do arquivo (novo -> antigo)', + existFileDirHelper: 'O arquivo/pasta selecionado tem um nome duplicado. Por favor, prossiga com cautela!', }, ssh: { setting: 'configuração', diff --git a/frontend/src/lang/modules/ru.ts b/frontend/src/lang/modules/ru.ts index d6db6d7b5..099e15391 100644 --- a/frontend/src/lang/modules/ru.ts +++ b/frontend/src/lang/modules/ru.ts @@ -1384,6 +1384,7 @@ const message = { existFileTitle: 'Предупреждение о файле с тем же именем', existFileHelper: 'Загруженный файл содержит файл с таким же именем. Заменить его?', existFileSize: 'Размер файла (новый -> старый)', + existFileDirHelper: 'Выбранный файл/папка имеет дублирующееся имя. Пожалуйста, действуйте осторожно!', }, ssh: { setting: 'настройка', diff --git a/frontend/src/lang/modules/tw.ts b/frontend/src/lang/modules/tw.ts index 7636cbf17..9e6323ab6 100644 --- a/frontend/src/lang/modules/tw.ts +++ b/frontend/src/lang/modules/tw.ts @@ -1309,6 +1309,7 @@ const message = { existFileTitle: '同名檔案提示', existFileHelper: '上傳的檔案存在同名檔案,是否覆蓋?', existFileSize: '文件大小(新->舊)', + existFileDirHelper: '選擇的檔案/資料夾存在同名,請謹慎操作!', }, ssh: { setting: '設定', diff --git a/frontend/src/lang/modules/zh.ts b/frontend/src/lang/modules/zh.ts index edf669d85..8c78f1d62 100644 --- a/frontend/src/lang/modules/zh.ts +++ b/frontend/src/lang/modules/zh.ts @@ -1311,6 +1311,7 @@ const message = { existFileTitle: '同名文件提示', existFileHelper: '上传的文件存在同名文件,是否覆盖?', existFileSize: '文件大小 (新 -> 旧)', + existFileDirHelper: '选择的文件/文件夹存在同名,请谨慎操作!', }, ssh: { setting: '配置', diff --git a/frontend/src/views/host/file-management/index.vue b/frontend/src/views/host/file-management/index.vue index 9594e7800..306e27df0 100644 --- a/frontend/src/views/host/file-management/index.vue +++ b/frontend/src/views/host/file-management/index.vue @@ -549,7 +549,7 @@ const codeReq = reactive({ path: '', expand: false, page: 1, pageSize: 100 }); const fileUpload = reactive({ path: '' }); const fileRename = reactive({ path: '', oldName: '' }); const fileWget = reactive({ path: '' }); -const fileMove = reactive({ oldPaths: [''], type: '', path: '', name: '', count: 0 }); +const fileMove = reactive({ oldPaths: [''], allNames: [''], type: '', path: '', name: '', count: 0, isDir: false }); const processPage = reactive({ open: false }); const createRef = ref(); @@ -961,14 +961,23 @@ const openRename = (item: File.File) => { const openMove = (type: string) => { fileMove.type = type; fileMove.name = ''; - const oldpaths = []; + fileMove.allNames = []; + fileMove.isDir = false; + const oldPaths = []; for (const s of selects.value) { - oldpaths.push(s['path']); + oldPaths.push(s['path']); } fileMove.count = selects.value.length; - fileMove.oldPaths = oldpaths; + fileMove.oldPaths = oldPaths; if (selects.value.length == 1) { fileMove.name = selects.value[0].name; + fileMove.isDir = selects.value[0].isDir; + } else { + const allNames = []; + for (const s of selects.value) { + allNames.push(s['name']); + } + fileMove.allNames = allNames; } moveOpen.value = true; }; @@ -979,6 +988,7 @@ const closeMove = () => { fileMove.oldPaths = []; fileMove.name = ''; fileMove.count = 0; + fileMove.isDir = false; moveOpen.value = false; }; diff --git a/frontend/src/views/host/file-management/move/index.vue b/frontend/src/views/host/file-management/move/index.vue index 6804a6716..a01d98e0c 100644 --- a/frontend/src/views/host/file-management/move/index.vue +++ b/frontend/src/views/host/file-management/move/index.vue @@ -4,7 +4,7 @@ :destroy-on-close="true" :close-on-click-modal="false" :close-on-press-escape="false" - size="40%" + size="675" > + +