feat: 添加更新日志功能;优化组件和状态管理;修复部分逻辑错误

This commit is contained in:
2025-04-08 16:11:00 +08:00
parent 0195e7b01a
commit 364d38ddc0
19 changed files with 536 additions and 312 deletions

View File

@@ -16,6 +16,7 @@ import { ZstdCodec, ZstdInit } from '@oneidentity/zstd-js/wasm';
import { encode } from "@msgpack/msgpack";
import { getVersion } from '@tauri-apps/api/app';
import { onReceivedNotification } from '@/client/data/notification';
export const useWebFetcher = defineStore('WebFetcher', () => {
const route = useRoute();
@@ -275,7 +276,7 @@ export const useWebFetcher = defineStore('WebFetcher', () => {
Stop(); // 服务器要求断开,调用 Stop 清理所有资源
});
connection.on('Request', async (url: string, method: string, body: string, useCookie: boolean) => onRequest(url, method, body, useCookie));
connection.on('Notification', (type: string, data: any) => { onReceivedNotification(type, data); });
// --- 尝试启动连接 ---
try {
await connection.start();