From 5c3305d8fa6adb9f617e0086f4555a6fb49af692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Thu, 23 May 2024 18:10:18 +0800 Subject: [PATCH] Revert "feat: try support LiteLoader" This reverts commit 8101d17482e7af5a9d19dcd43506ff2576758634. --- .env.development | 3 +-- .env.liteloader | 2 -- .env.production | 1 - src/core | 2 +- src/liteloader/main.ts | 17 ----------------- src/liteloader/preload.ts | 1 - src/liteloader/renderer.ts | 18 ------------------ src/vite-env.d.ts | 10 ---------- vite.config.ts | 1 + 9 files changed, 3 insertions(+), 52 deletions(-) delete mode 100644 .env.liteloader delete mode 100644 src/liteloader/main.ts delete mode 100644 src/liteloader/preload.ts delete mode 100644 src/liteloader/renderer.ts delete mode 100644 src/vite-env.d.ts diff --git a/.env.development b/.env.development index f7103f58..4642c3e8 100644 --- a/.env.development +++ b/.env.development @@ -1,2 +1 @@ -VITE_BUILD_TYPE = Development -VITE_BUILD_TARGE = Normal \ No newline at end of file +VITE_BUILD_TYPE = Development \ No newline at end of file diff --git a/.env.liteloader b/.env.liteloader deleted file mode 100644 index e4915151..00000000 --- a/.env.liteloader +++ /dev/null @@ -1,2 +0,0 @@ -VITE_BUILD_TYPE = Production -VITE_BUILD_TARGE = Liteloader \ No newline at end of file diff --git a/.env.production b/.env.production index d21d5a1d..2f6aa849 100644 --- a/.env.production +++ b/.env.production @@ -1,2 +1 @@ VITE_BUILD_TYPE = Production -VITE_BUILD_TARGE = Normal \ No newline at end of file diff --git a/src/core b/src/core index 8fe46277..48c585b7 160000 --- a/src/core +++ b/src/core @@ -1 +1 @@ -Subproject commit 8fe462777a9fa4fca1d67a8973be93b051960753 +Subproject commit 48c585b7e0d05f591b9ae45b84e805ca611fe313 diff --git a/src/liteloader/main.ts b/src/liteloader/main.ts deleted file mode 100644 index 101bfcf4..00000000 --- a/src/liteloader/main.ts +++ /dev/null @@ -1,17 +0,0 @@ -type BrowserWindow = any; -function onBrowserWindowCreated(window: BrowserWindow) { - -} -async function loadNapCat() { - -} - -try { - loadNapCat(); -} catch { - console.log("loadNapCat error"); -} -export { - onBrowserWindowCreated -}; - diff --git a/src/liteloader/preload.ts b/src/liteloader/preload.ts deleted file mode 100644 index 41c47c11..00000000 --- a/src/liteloader/preload.ts +++ /dev/null @@ -1 +0,0 @@ -//暂且留空 \ No newline at end of file diff --git a/src/liteloader/renderer.ts b/src/liteloader/renderer.ts deleted file mode 100644 index c4a90b55..00000000 --- a/src/liteloader/renderer.ts +++ /dev/null @@ -1,18 +0,0 @@ -async function onSettingWindowCreated(view: Element) { - const iframe = document.createElement('iframe'); - iframe.src = 'http://127.0.0.1:6099/webui/'; //应该从 preload->main 那里获取 - iframe.style.cssText = 'position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none;'; - view.appendChild(iframe); -} -async function isRendererInit() { - -} - -if (location.hash === '#/blank') { - (window as any).navigation.addEventListener('navigatesuccess', isRendererInit, { once: true }); -} else { - isRendererInit(); -} -export { - onSettingWindowCreated -}; diff --git a/src/vite-env.d.ts b/src/vite-env.d.ts deleted file mode 100644 index f10468ac..00000000 --- a/src/vite-env.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -/// - -interface ImportMetaEnv { - readonly VITE_BUILD_TYPE: string - readonly VITE_BUILD_TARGE: string - } - - interface ImportMeta { - readonly env: ImportMetaEnv - } \ No newline at end of file diff --git a/vite.config.ts b/vite.config.ts index 97d24e78..a00d9322 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,3 +1,4 @@ +// import PreprocessorDirectives from 'unplugin-preprocessor-directives/vite'; import obfuscator from 'rollup-plugin-obfuscator'; import cp from 'vite-plugin-cp'; import { UserConfig, defineConfig } from 'vite';