From 21d5ae305cddede239c2c2b763930f7266e9821e Mon Sep 17 00:00:00 2001 From: Emmm Monster <58943012+emmmx@users.noreply.github.com> Date: Tue, 25 May 2021 03:06:28 +0800 Subject: [PATCH] feature: directly write to fs --- src/component/FileSelector.vue | 26 ++++++++++++-- src/component/PreviewTable.vue | 4 +-- src/decrypt/entity.ts | 1 + src/decrypt/kgm.ts | 1 + src/decrypt/kwm.ts | 1 + src/decrypt/ncm.ts | 1 + src/decrypt/qmc.ts | 1 + src/decrypt/raw.ts | 1 + src/decrypt/xm.ts | 1 + src/main.ts | 4 ++- src/shims-fs.d.ts | 51 +++++++++++++++++++++++++++ src/utils/utils.ts | 45 ++++++++++++++++-------- src/view/Home.vue | 63 ++++++++++++++++++++++++++++------ 13 files changed, 170 insertions(+), 30 deletions(-) create mode 100644 src/shims-fs.d.ts diff --git a/src/component/FileSelector.vue b/src/component/FileSelector.vue index b5bd236..623b52f 100644 --- a/src/component/FileSelector.vue +++ b/src/component/FileSelector.vue @@ -8,7 +8,27 @@ multiple>
将文件拖到此处,或点击选择
-
本工具仅在浏览器内对文件进行解锁,无需消耗流量
+
+
+ 仅在浏览器内对文件进行解锁,无需消耗流量 + +
+ 算法在源代码中已经提供,所有运算都发生在本地 +
+ +
+
+
+ 工作模式: {{ parallel ? "多线程 Worker" : "单线程 Queue" }} + +
+ 将此工具部署在HTTPS环境下,可以启用Web Worker特性,
+ 从而更快的利用并行处理完成解锁 +
+ +
+
+
spawn(new Worker('@/utils/worker.ts')), navigator.hardwareConcurrency || 1 ) + this.parallel = true } else { console.log("Using Queue in Main Thread") } diff --git a/src/component/PreviewTable.vue b/src/component/PreviewTable.vue index 1f70d12..2385f5c 100644 --- a/src/component/PreviewTable.vue +++ b/src/component/PreviewTable.vue @@ -42,7 +42,7 @@