feat: 修改 sendSelfInfo 函数以使用 isFromClient 判断客户端类型

This commit is contained in:
2025-04-10 09:37:55 +08:00
parent 655b92081e
commit 2a022e0448

View File

@@ -297,9 +297,9 @@ export const useWebFetcher = defineStore('WebFetcher', () => {
} }
async function sendSelfInfo(client: signalR.HubConnection) { async function sendSelfInfo(client: signalR.HubConnection) {
return client.invoke('SetSelfInfo', return client.invoke('SetSelfInfo',
isTauri ? `tauri ${platform()} ${version()}` : navigator.userAgent, isFromClient ? `tauri ${platform()} ${version()}` : navigator.userAgent,
isTauri ? 'tauri' : 'web', isFromClient ? 'tauri' : 'web',
isTauri ? await getVersion() : '1.0.0', isFromClient ? await getVersion() : '1.0.0',
webfetcherType.value === 'direct'); webfetcherType.value === 'direct');
} }
type ResponseFetchRequestData = { type ResponseFetchRequestData = {