fix: 修复一些前端的小问题 (#641)

This commit is contained in:
ᴀᴍᴛᴏᴀᴇʀ
2026-02-06 14:12:18 +08:00
committed by GitHub
parent 580a66eb17
commit c49ec81d51
3 changed files with 36 additions and 35 deletions

View File

@@ -1,4 +1,5 @@
import { toast } from 'svelte-sonner';
import api from './api';
import type { SysInfo, TaskStatus } from './types';
// 支持的事件类型
@@ -61,7 +62,7 @@ export class WebSocketManager {
this.connectionPromise = new Promise((resolve, reject) => {
this.connecting = true;
const token = localStorage.getItem('authToken') || '';
const token = api.getAuthToken() || '';
try {
const protocol = window.location.protocol === 'https:' ? 'wss://' : 'ws://';