diff --git a/src/components/FileManageDialog.vue b/src/components/FileManageDialog.vue index 7897ebf..eec2530 100644 --- a/src/components/FileManageDialog.vue +++ b/src/components/FileManageDialog.vue @@ -234,6 +234,13 @@      + + {{ $t("_cut2") }} + + {{ $t("click") }}{{ $t("_cut2") }} + + +      {{ $t("delete") }} @@ -294,14 +301,9 @@ {{ $t("_copy2") }} - + - {{ $t("cut") }} + {{ $t("_cut2") }} 0 - ? newValue[0] == "/" || "\\" - ? "/" - : "" - : "") + item + (parent_item ? parent_item.path + "/" : "") + item ); + if (!parent_item && root_flag) { + temp.path = "/" + temp.path; + } paths.value.push(temp); parent_item = temp; @@ -999,6 +1001,21 @@ export default defineComponent({ clipboard.path = path.value; clipboard.type = _ClipboardType.kTypeCut; clipboard.is_directory = file.is_directory; + $q.notify({ + color: "positive", + icon: "done", + html: true, + message: + $t.t("cut to colipboard success") + + "!" + + "
" + + $t.t( + "please use the paste command to paste to another directory" + ) + + "!", + position: "top", + timeout: 1500, + }); } }, pasteFile() { @@ -1016,7 +1033,7 @@ export default defineComponent({ message: (clipboard.type == _ClipboardType.kTypeCopy ? $t.t("_copy2") - : $t.t("cut")) + + : $t.t("_cut2")) + (clipboard.is_directory ? $t.t("directory") : $t.t("file")) + $t.t("from") + ' "' + @@ -1057,7 +1074,9 @@ export default defineComponent({ color: success ? "positive" : "negative", icon: success ? "done" : "warning", message: - $t.t("copy") + + (clipboard.type == _ClipboardType.kTypeCopy + ? $t.t("_copy2") + : $t.t("_cut2")) + (clipboard.is_directory ? $t.t("directory") : $t.t("file")) + (success ? $t.t("success") : $t.t("fail")) + "!", diff --git a/src/i18n/zh-CN/index.ts b/src/i18n/zh-CN/index.ts index 5f7c232..c825529 100644 --- a/src/i18n/zh-CN/index.ts +++ b/src/i18n/zh-CN/index.ts @@ -432,4 +432,6 @@ export default { "copy to colipboard success": "成功拷贝到剪切板", "please use the paste command to paste to another directory": "请使用粘贴命令粘贴到其它目录", + _cut2: "移动", + "cut to colipboard success": "成功剪切到剪切板", }; diff --git a/src/pages/TopToolBar.vue b/src/pages/TopToolBar.vue index 456dc06..9709794 100644 --- a/src/pages/TopToolBar.vue +++ b/src/pages/TopToolBar.vue @@ -498,13 +498,14 @@ export default defineComponent({ } }, closeAllWindows() { - for (const window of $store.state.windows) { - if (window) { - GlobalData.getInstance() - .getCurrentClient() - ?.closeWindow(window.window_id); - } - } + // for (const window of $store.state.windows) { + // if (window) { + // GlobalData.getInstance() + // .getCurrentClient() + // ?.closeWindow(window.window_id); + // } + // } + GlobalData.getInstance().getCurrentClient()?.closeWindow(-1); }, switchLanguage() { let language = Cookies.get("language"); diff --git a/src/pages/WallPage.vue b/src/pages/WallPage.vue index e7ab14c..cc81c8f 100644 --- a/src/pages/WallPage.vue +++ b/src/pages/WallPage.vue @@ -834,13 +834,14 @@ export default defineComponent({ moveWindow, resizeWindow, closeAllWindows() { - for (const window of $store.state.windows) { - if (window) { - GlobalData.getInstance() - .getCurrentClient() - ?.closeWindow(window.window_id); - } - } + // for (const window of $store.state.windows) { + // if (window) { + // GlobalData.getInstance() + // .getCurrentClient() + // ?.closeWindow(window.window_id); + // } + // } + GlobalData.getInstance().getCurrentClient()?.closeWindow(-1); }, topWindow(window_id: number) { GlobalData.getInstance().getCurrentClient()?.focusIn(window_id);