From 792ff15885fad1d294c11b2964746a96d908847f Mon Sep 17 00:00:00 2001 From: fangxiang Date: Mon, 21 Mar 2022 17:33:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=B8=85=E5=B1=8F=E6=8C=87?= =?UTF-8?q?=E4=BB=A4=E5=8F=91=E9=80=81=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E6=96=87=E4=BB=B6=E7=AE=A1=E7=90=86=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E9=9D=A2=E5=8C=85=E5=B1=91=E5=AF=BC=E8=88=AA=E5=88=B7=E6=96=B0?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=A4=B1=E8=B4=A5=E7=9A=84BUG=EF=BC=8C?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=A7=BB=E5=8A=A8=E6=96=87=E4=BB=B6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FileManageDialog.vue | 51 ++++++++++++++++++++--------- src/i18n/zh-CN/index.ts | 2 ++ src/pages/TopToolBar.vue | 15 +++++---- src/pages/WallPage.vue | 15 +++++---- 4 files changed, 53 insertions(+), 30 deletions(-) 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);