From abd343f894edba617e7b5296a9b265ee9e2fae97 Mon Sep 17 00:00:00 2001 From: tinyAdapter Date: Wed, 19 Feb 2020 14:25:38 +0800 Subject: [PATCH 1/8] bugfix: gibberish for non-English process names --- src/main/Processes.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/Processes.ts b/src/main/Processes.ts index 99e3a4e..224e491 100644 --- a/src/main/Processes.ts +++ b/src/main/Processes.ts @@ -4,7 +4,7 @@ const debug = require('debug')('yuki:processes') export default class Processes { public static async get () { return new Promise((resolve, reject) => { - exec(Processes.TASK_LIST_COMMAND, + exec(`${Processes.CHCP_COMMAND} & ${Processes.TASK_LIST_COMMAND}`, (err, stdout, stderr) => { if (err) { debug('exec failed !> %s', err) @@ -24,10 +24,11 @@ export default class Processes { ) }) } + private static CHCP_COMMAND = 'chcp 65001' private static TASK_LIST_COMMAND = 'tasklist /nh /fo csv /fi "sessionname eq Console"' private static findsProcessIn (value: string) { - return value.startsWith('"') + return value.indexOf('"') !== -1 } private static parseProcessesFrom (value: string) { From f4feb2b8cc6e79a7893d24dfe6687ce995f1f969 Mon Sep 17 00:00:00 2001 From: tinyAdapter Date: Wed, 19 Feb 2020 15:10:05 +0800 Subject: [PATCH 2/8] feature: add "Copy To Clipboard" button in debug messages page --- src/renderer/App.vue | 12 ++-- src/renderer/components/DebugMessagesPage.vue | 66 +++++++++++-------- 2 files changed, 43 insertions(+), 35 deletions(-) diff --git a/src/renderer/App.vue b/src/renderer/App.vue index b5ac44d..a9c953f 100644 --- a/src/renderer/App.vue +++ b/src/renderer/App.vue @@ -7,15 +7,11 @@ From f0fbb443cc5a4de0dbfba0cacdf04c2cb8255bcd Mon Sep 17 00:00:00 2001 From: tinyAdapter Date: Wed, 19 Feb 2020 15:50:27 +0800 Subject: [PATCH 3/8] bugfix: prevent multiple download progress --- config/config.json | 26 ++--- src/renderer/components/LibrarySettings.vue | 122 +++++++++++++------- 2 files changed, 91 insertions(+), 57 deletions(-) diff --git a/config/config.json b/config/config.json index 6067d57..8cbe682 100644 --- a/config/config.json +++ b/config/config.json @@ -1,4 +1,12 @@ { + "dictionaries": { + "lingoes": { + "enable": true, + "path": "C:\\YUKI\\libraries\\dict\\lingoes\\njcd.db" + } + }, + "language": "zh", + "librariesRepoUrl": "https://github.com/project-yuki/libraries/raw/master/_pack/", "localeChangers": { "alphaROMdiE": { "enable": false, @@ -21,6 +29,10 @@ "name": "Ntleas" } }, + "mecab": { + "enable": true, + "path": "C:\\YUKI\\libraries\\pos\\mecab-ipadic" + }, "onlineApis": [ { "enable": true, @@ -64,17 +76,5 @@ "enable": true, "path": "C:\\JBeijing7" } - }, - "dictionaries": { - "lingoes": { - "enable": true, - "path": "C:\\YUKI\\libraries\\dict\\lingoes\\njcd.db" - } - }, - "mecab": { - "enable": true, - "path": "C:\\YUKI\\libraries\\pos\\mecab-ipadic" - }, - "librariesRepoUrl": "https://github.com/project-yuki/libraries/raw/master/_pack/", - "language": "zh" + } } diff --git a/src/renderer/components/LibrarySettings.vue b/src/renderer/components/LibrarySettings.vue index 96fcf44..5532612 100644 --- a/src/renderer/components/LibrarySettings.vue +++ b/src/renderer/components/LibrarySettings.vue @@ -10,7 +10,8 @@ "pleaseSelect2": "", "nowDownloading": "正在下载", "installed": "安装完成,重启生效", - "lingoes": "灵格斯词典" + "lingoes": "灵格斯词典", + "failed": "下载失败" }, "en": { "appLibrariesSettings": "App Libraries Settings", @@ -21,7 +22,8 @@ "pleaseSelect2": "in the directory", "nowDownloading": "Now downloading", "installed": "installed. Restart to take effect", - "lingoes": "Lingoes Dictionary (ja to zh-CN)" + "lingoes": "Lingoes Dictionary (ja to zh-CN)", + "failed": "Download failed" } } @@ -48,7 +50,13 @@ /> - + @@ -66,7 +74,13 @@ /> - + @@ -82,7 +96,13 @@ /> - + {{$t('download')}}  mdi-cloud-download @@ -93,21 +113,11 @@