Add shortcut can't download tip #76

This commit is contained in:
Aicirou 2020-06-30 17:37:19 +08:00
parent 6cc467699f
commit f73ea87cb0
4 changed files with 22 additions and 4 deletions

View File

@ -36,9 +36,9 @@
},
"page": {
"video": {
"play": "Play",
"download": "Download",
"link": "Download link"
"play": "Play",
"download": "Download",
"link": "Download link"
},
"text": {
"loading": "Loading..."
@ -52,5 +52,8 @@
},
"checkVersion": {
"tips": "New version detected, <a href='${url}'>Go to GitHub</a>"
},
"error": {
"shortcut_not_down": "Shortcut can't open/download"
}
}
}

View File

@ -52,5 +52,8 @@
},
"checkVersion": {
"tips": "检测到有新版本,<a href='${url}'>前往GitHub</a>"
},
"error": {
"shortcut_not_down": "快捷方式无法打开/下载"
}
}

View File

@ -52,5 +52,8 @@
},
"checkVersion": {
"tips": "檢測到有新版本,<a href='${url}'>前往GitHub</a>"
},
"error": {
"shortcut_not_down": "快捷方式無法打開/下載"
}
}

View File

@ -262,6 +262,15 @@ export default {
this.$viewer = viewer;
},
action (file, target) {
// If it is a shortcut, the prompt cannot be downloaded
if (file.mimeType === "application/vnd.google-apps.shortcut") {
this.$notify({
title: this.$t("notify.title"),
message: this.$t("error.shortcut_not_down"),
type: "warning",
});
return;
}
if (file.mimeType.startsWith("image/")) {
this.viewer = true;
this.$nextTick(() => {