From f73ea87cb0719272f005b40360d1e182f04f85cc Mon Sep 17 00:00:00 2001 From: Aicirou <2643053021@qq.com> Date: Tue, 30 Jun 2020 17:37:19 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8Add=20shortcut=20can't=20download=20ti?= =?UTF-8?q?p=20#76?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/locales/en.json | 11 +++++++---- src/locales/zh-chs.json | 3 +++ src/locales/zh-cht.json | 3 +++ src/views/page/GoList.vue | 9 +++++++++ 4 files changed, 22 insertions(+), 4 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 66a8bff..d610770 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -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, Go to GitHub" + }, + "error": { + "shortcut_not_down": "Shortcut can't open/download" } -} +} \ No newline at end of file diff --git a/src/locales/zh-chs.json b/src/locales/zh-chs.json index d1eb3e4..241acb5 100644 --- a/src/locales/zh-chs.json +++ b/src/locales/zh-chs.json @@ -52,5 +52,8 @@ }, "checkVersion": { "tips": "检测到有新版本,前往GitHub" + }, + "error": { + "shortcut_not_down": "快捷方式无法打开/下载" } } diff --git a/src/locales/zh-cht.json b/src/locales/zh-cht.json index 6603aed..a95a35a 100644 --- a/src/locales/zh-cht.json +++ b/src/locales/zh-cht.json @@ -52,5 +52,8 @@ }, "checkVersion": { "tips": "檢測到有新版本,前往GitHub" + }, + "error": { + "shortcut_not_down": "快捷方式無法打開/下載" } } diff --git a/src/views/page/GoList.vue b/src/views/page/GoList.vue index e50d8eb..493cf3a 100644 --- a/src/views/page/GoList.vue +++ b/src/views/page/GoList.vue @@ -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(() => {