feat: add unified Tauri desktop client and secure web access

This commit is contained in:
lbl
2026-08-22 04:09:44 +08:00
parent 0ccd045e78
commit cd5b4431dc
62 changed files with 5018 additions and 500 deletions
+14
View File
@@ -0,0 +1,14 @@
import { invoke } from "@tauri-apps/api/core";
globalThis.__VNT_DESKTOP__ = true;
globalThis.__VNT_IPC_REQUEST__ = ({ method, path, body }) =>
invoke("api_request", { method, path, body });
globalThis.__VNT_WEB_ACCESS__ = {
status: () => invoke("web_access_status"),
update: (config) => invoke("update_web_access", { config }),
generateToken: () => invoke("generate_web_token"),
openUrl: (url) => invoke("open_web_url", { url }),
};
// Tauri 与 Web 端共用同一个 Vue 应用,这里只负责平台初始化。
await import("@shared/main.js");