From c7e5dfb4c47691d77a8804a0d6055a65d26c21f5 Mon Sep 17 00:00:00 2001 From: Emmm Monster <58943012+emmmx@users.noreply.github.com> Date: Mon, 24 May 2021 22:19:37 +0800 Subject: [PATCH] refactor: component/*.vue --- package-lock.json | 94 ++++++-- package.json | 9 +- src/App.vue | 224 +++++++++--------- src/component/FileSelector.vue | 77 ++++++ .../{preview.vue => PreviewTable.vue} | 52 ++-- src/component/upload.vue | 120 ---------- src/component/{util.js => utils.ts} | 25 +- src/component/worker.ts | 4 + src/decrypt/common.ts | 21 +- src/decrypt/entity.ts | 9 + src/decrypt/qmc.ts | 4 +- src/decrypt/qmcMask.ts | 1 - src/decrypt/xm.ts | 2 +- src/main.ts | 4 +- tsconfig.json | 2 +- vue.config.js | 4 + 16 files changed, 343 insertions(+), 309 deletions(-) create mode 100644 src/component/FileSelector.vue rename src/component/{preview.vue => PreviewTable.vue} (52%) delete mode 100644 src/component/upload.vue rename src/component/{util.js => utils.ts} (52%) create mode 100644 src/component/worker.ts diff --git a/package-lock.json b/package-lock.json index 7f54c3b..2b864ce 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5820,6 +5820,12 @@ "estraverse": "^4.1.1" } }, + "esm": { + "version": "3.2.25", + "resolved": "http://mirrors.cloud.tencent.com/npm/esm/-/esm-3.2.25.tgz", + "integrity": "sha512-U1suiZ2oDVWv4zPO56S0NcR5QriEahGtdN2OR6FiOG4WJvcjBVFB0qI4+eKoWFH483PKGuLuu6V8Z4T5g63UVA==", + "optional": true + }, "esprima": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", @@ -7822,6 +7828,11 @@ "integrity": "sha1-PkcprB9f3gJc19g6iW2rn09n2w8=", "dev": true }, + "is-observable": { + "version": "2.1.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/is-observable/-/is-observable-2.1.0.tgz", + "integrity": "sha512-DailKdLb0WU+xX8K5w7VsJhapwHLZ9jjmazqCJq4X12CTgqq73TKnbRcnSLuXYPOoLQgV5IrD7ePiX/h1vnkBw==" + }, "is-path-cwd": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", @@ -9305,6 +9316,11 @@ "has": "^1.0.3" } }, + "observable-fns": { + "version": "0.5.1", + "resolved": "http://mirrors.cloud.tencent.com/npm/observable-fns/-/observable-fns-0.5.1.tgz", + "integrity": "sha512-wf7g4Jpo1Wt2KIqZKLGeiuLOEMqpaOZ5gJn7DmSdqXgTdxRwSdBhWegQQpPteQ2gZvzCKqNNpwb853wcpA0j7A==" + }, "obuf": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", @@ -12243,6 +12259,56 @@ } } }, + "threads": { + "version": "1.6.4", + "resolved": "http://mirrors.cloud.tencent.com/npm/threads/-/threads-1.6.4.tgz", + "integrity": "sha512-A+9MQFAUha9W8MjIPmrvETy98qVmZFr5Unox9D95y7kvz3fBpGiFS7JOZs07B2KvTHoRNI5MrGudRVeCmv4Alw==", + "requires": { + "callsites": "^3.1.0", + "debug": "^4.2.0", + "is-observable": "^2.1.0", + "observable-fns": "^0.5.1", + "tiny-worker": ">= 2" + }, + "dependencies": { + "callsites": { + "version": "3.1.0", + "resolved": "https://mirrors.tencent.com/npm/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==" + } + } + }, + "threads-plugin": { + "version": "1.4.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/threads-plugin/-/threads-plugin-1.4.0.tgz", + "integrity": "sha512-lQENPueZLsD+6Cvxvj/QaQyUskwnFZO+2ZGDMnPIvtytSeywWvYzete8paZ9L+5IR4v8jnSYNZPlIQrEhSK1EA==", + "dev": true, + "requires": { + "loader-utils": "^1.1.0" + }, + "dependencies": { + "json5": { + "version": "1.0.1", + "resolved": "http://mirrors.cloud.tencent.com/npm/json5/-/json5-1.0.1.tgz", + "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", + "dev": true, + "requires": { + "minimist": "^1.2.0" + } + }, + "loader-utils": { + "version": "1.4.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/loader-utils/-/loader-utils-1.4.0.tgz", + "integrity": "sha512-qH0WSMBtn/oHuwjy/NucEgbx5dbxxnxup9s4PVXJUDHZBQY+s0NWA9rJf53RBnQZxfch7euUui7hpoAPvALZdA==", + "dev": true, + "requires": { + "big.js": "^5.2.2", + "emojis-list": "^3.0.0", + "json5": "^1.0.1" + } + } + } + }, "throttle-debounce": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/throttle-debounce/-/throttle-debounce-1.1.0.tgz", @@ -12284,6 +12350,15 @@ "integrity": "sha1-QFQRqOfmM5/mTbmiNN4R3DHgK9Q=", "dev": true }, + "tiny-worker": { + "version": "2.3.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/tiny-worker/-/tiny-worker-2.3.0.tgz", + "integrity": "sha512-pJ70wq5EAqTAEl9IkGzA+fN0836rycEuz2Cn6yeZ6FRzlVS5IDOkFHpIoEsksPRQV34GDqXm65+OlnZqUSyK2g==", + "optional": true, + "requires": { + "esm": "^3.2.25" + } + }, "tinycolor2": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.2.tgz", @@ -13009,11 +13084,6 @@ "resolved": "https://registry.npmjs.org/vue/-/vue-2.6.12.tgz", "integrity": "sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg==" }, - "vue-class-component": { - "version": "7.2.6", - "resolved": "http://mirrors.cloud.tencent.com/npm/vue-class-component/-/vue-class-component-7.2.6.tgz", - "integrity": "sha512-+eaQXVrAm/LldalI272PpDe3+i4mPis0ORiMYxF6Ae4hyuCh15W8Idet7wPUEs4N4YptgFHGys4UrgNQOMyO6w==" - }, "vue-cli-plugin-element": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/vue-cli-plugin-element/-/vue-cli-plugin-element-1.0.1.tgz", @@ -13136,11 +13206,6 @@ } } }, - "vue-property-decorator": { - "version": "9.1.2", - "resolved": "http://mirrors.cloud.tencent.com/npm/vue-property-decorator/-/vue-property-decorator-9.1.2.tgz", - "integrity": "sha512-xYA8MkZynPBGd/w5QFJ2d/NM0z/YeegMqYTphy7NJQXbZcuU6FC6AOdUAcy4SXP+YnkerC6AfH+ldg7PDk9ESQ==" - }, "vue-style-loader": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/vue-style-loader/-/vue-style-loader-4.1.3.tgz", @@ -13957,15 +14022,6 @@ "microevent.ts": "~0.1.1" } }, - "workerize-loader": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/workerize-loader/-/workerize-loader-1.3.0.tgz", - "integrity": "sha512-utWDc8K6embcICmRBUUkzanPgKBb8yM1OHfh6siZfiMsswE8wLCa9CWS+L7AARz0+Th4KH4ZySrqer/OJ9WuWw==", - "dev": true, - "requires": { - "loader-utils": "^2.0.0" - } - }, "wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", diff --git a/package.json b/package.json index f4e520e..8666813 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,8 @@ "metaflac-js": "^1.0.5", "music-metadata-browser": "^2.2.6", "register-service-worker": "^1.7.2", - "vue": "^2.6.12", - "vue-class-component": "^7.2.3", - "vue-property-decorator": "^9.1.2" + "threads": "^1.6.4", + "vue": "^2.6.12" }, "devDependencies": { "@types/crypto-js": "^4.0.1", @@ -40,9 +39,9 @@ "node-sass": "^5.0.0", "sass-loader": "^10.2.0", "semver": "^7.3.5", + "threads-plugin": "^1.4.0", "typescript": "~4.1.5", "vue-cli-plugin-element": "^1.0.1", - "vue-template-compiler": "^2.6.12", - "workerize-loader": "^1.3.0" + "vue-template-compiler": "^2.6.12" } } diff --git a/src/App.vue b/src/App.vue index b2652f2..5100d62 100644 --- a/src/App.vue +++ b/src/App.vue @@ -2,7 +2,7 @@ - +
@@ -28,14 +28,14 @@