修改清屏指令发送逻辑,修复文件管理点击面包屑导航刷新文件失败的BUG,添加移动文件功能
This commit is contained in:
parent
027e31f192
commit
792ff15885
|
@ -234,6 +234,13 @@
|
|||
</q-tooltip>
|
||||
</a>
|
||||
|
||||
<a href="#" @click="(evt) => cutFile(props.row)">
|
||||
{{ $t("_cut2") }}
|
||||
<q-tooltip>
|
||||
{{ $t("click") }}{{ $t("_cut2") }}
|
||||
</q-tooltip>
|
||||
</a>
|
||||
|
||||
<a href="#" @click="(evt) => deleteFile(props.row)">
|
||||
{{ $t("delete") }}
|
||||
<q-tooltip>
|
||||
|
@ -294,14 +301,9 @@
|
|||
<q-item-section avatar><q-icon name="file_copy" /></q-item-section>
|
||||
<q-item-section>{{ $t("_copy2") }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="false"
|
||||
clickable
|
||||
v-close-popup
|
||||
@click="(evt) => cutFile(current_file)"
|
||||
>
|
||||
<q-item clickable v-close-popup @click="(evt) => cutFile(current_file)">
|
||||
<q-item-section avatar><q-icon name="content_cut" /></q-item-section>
|
||||
<q-item-section>{{ $t("cut") }}</q-item-section>
|
||||
<q-item-section>{{ $t("_cut2") }}</q-item-section>
|
||||
</q-item>
|
||||
<q-item
|
||||
v-if="false"
|
||||
|
@ -617,21 +619,21 @@ export default defineComponent({
|
|||
}
|
||||
paths.value = [];
|
||||
let parent_item = null;
|
||||
const root_flag =
|
||||
path.value.startsWith("/") || path.value.startsWith("\\");
|
||||
for (let item of newValue.split("/")) {
|
||||
if (item.trim() == "") {
|
||||
parent_item = null;
|
||||
continue;
|
||||
}
|
||||
|
||||
let temp: _BreadcrumbItem = new _BreadcrumbItem(
|
||||
item,
|
||||
(parent_item
|
||||
? parent_item.path + "/"
|
||||
: newValue.length > 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") +
|
||||
"!" +
|
||||
"<br />" +
|
||||
$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")) +
|
||||
"!",
|
||||
|
|
|
@ -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": "成功剪切到剪切板",
|
||||
};
|
||||
|
|
|
@ -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");
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue