Web优化 2

This commit is contained in:
2026-06-12 14:36:41 +08:00
parent 7e9df04bf8
commit 61a1a4d368
31 changed files with 551 additions and 918 deletions
+5 -2
View File
@@ -13,6 +13,9 @@ import type {
CommitBody,
} from '@/api/types'
const DEFAULT_POLL_INTERVAL_MS = 1500
const DEFAULT_POLL_MAX_MS = 5 * 60 * 1000
export const useWorkspacesStore = defineStore('workspaces', () => {
const list = ref<Workspace[]>([])
const current = ref<Workspace | null>(null)
@@ -75,8 +78,8 @@ export const useWorkspacesStore = defineStore('workspaces', () => {
*/
async function pollUntilSettled(
wsID: string,
intervalMs = 1500,
maxMs = 5 * 60 * 1000,
intervalMs = DEFAULT_POLL_INTERVAL_MS,
maxMs = DEFAULT_POLL_MAX_MS,
): Promise<Workspace> {
const start = Date.now()
let lastStatus: Workspace['sync_status'] | 'unknown' = 'unknown'