From 46d7ff6479ec2e347c9d1bd40cc15bde6f932c17 Mon Sep 17 00:00:00 2001 From: TankNee Date: Thu, 8 Jul 2021 15:18:34 +0800 Subject: [PATCH] [fix]: change delete icon, fix save error as well as optimize update dialog --- package-lock.json | 14 ++++++++ package.json | 3 +- src/components/ui/dialog/SettingsDialog.vue | 12 +++++-- src/components/ui/dialog/UpdateDialog.vue | 32 ++++++++++++++---- src/components/ui/editor/Monaco.vue | 1 + src/css/style.css | 7 ++-- src/i18n/en-us/components/ui/UpdateDialog.js | 5 ++- src/i18n/zh-cn/components/ui/UpdateDialog.js | 5 ++- src/libs/muya/lib/assets/pngicon/delete/1.png | Bin 465 -> 338 bytes src/libs/muya/lib/assets/pngicon/delete/2.png | Bin 869 -> 591 bytes src/libs/muya/lib/assets/pngicon/delete/3.png | Bin 1680 -> 893 bytes src/utils/themeColor.js | 2 +- 12 files changed, 65 insertions(+), 16 deletions(-) diff --git a/package-lock.json b/package-lock.json index 185d941..a835641 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,6 +40,7 @@ "node-schedule": "^1.3.2", "os-locale": "^5.0.0", "popper.js": "^1.16.1", + "pretty-bytes": "^5.6.0", "quasar": "^1.0.0", "remark": "^13.0.0", "remark-pangu": "^2.2.0", @@ -16407,6 +16408,14 @@ "node": ">=4" } }, + "node_modules/pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.nlark.com/pretty-bytes/download/pretty-bytes-5.6.0.tgz", + "integrity": "sha1-NWJW9kOAR3PIL2RyP+eMksYr6us=", + "engines": { + "node": ">=6" + } + }, "node_modules/pretty-error": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz", @@ -38020,6 +38029,11 @@ "dev": true, "optional": true }, + "pretty-bytes": { + "version": "5.6.0", + "resolved": "https://registry.nlark.com/pretty-bytes/download/pretty-bytes-5.6.0.tgz", + "integrity": "sha1-NWJW9kOAR3PIL2RyP+eMksYr6us=" + }, "pretty-error": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/pretty-error/-/pretty-error-2.1.2.tgz", diff --git a/package.json b/package.json index d14f6bb..3bf8e91 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cn.memocast.app", - "version": "2.1.2", + "version": "2.1.3", "description": "An Awesome WizNote Desktop Application", "productName": "Memocast", "author": "tanknee ", @@ -52,6 +52,7 @@ "node-schedule": "^1.3.2", "os-locale": "^5.0.0", "popper.js": "^1.16.1", + "pretty-bytes": "^5.6.0", "quasar": "^1.0.0", "remark": "^13.0.0", "remark-pangu": "^2.2.0", diff --git a/src/components/ui/dialog/SettingsDialog.vue b/src/components/ui/dialog/SettingsDialog.vue index 47292a7..ba2612c 100644 --- a/src/components/ui/dialog/SettingsDialog.vue +++ b/src/components/ui/dialog/SettingsDialog.vue @@ -261,14 +261,22 @@ export default { message: this.$t('checking'), timeout: 0, spinner: true, - color: 'primary' + color: 'primary', + actions: [{ + icon: 'clear', + color: 'white', + handler: () => {} + }] }) }) // this.$refs.updateDialog.toggle() }, updateAvailableHandler: function (info) { console.log(info) - // this.$refs.updateDialog.toggle() + if (this.checkingNotify && this.checkingNotify instanceof Function) { + this.checkingNotify() + this.checkingNotify = null + } this.$q.notify({ caption: this.$t('getNewerVersion', { version: info.version }), message: info.releaseNotes, diff --git a/src/components/ui/dialog/UpdateDialog.vue b/src/components/ui/dialog/UpdateDialog.vue index ade98be..09c5c4f 100644 --- a/src/components/ui/dialog/UpdateDialog.vue +++ b/src/components/ui/dialog/UpdateDialog.vue @@ -14,7 +14,12 @@
-
{{ `${transferred}/${total} ${speed} Kbs` }}
+

+ {{ `${$t('downloadSize')} ${transferred}/${total}` }} +

+

+ {{ `${$t('downloadSpeed')} ${speed}` }} +

@@ -35,6 +40,7 @@