fix(canvas): 画布 - 防止旧内容覆盖并支持版本历史恢复
This commit is contained in:
@@ -4,8 +4,9 @@ export type SyncProjectProgress = {
|
||||
projectId: string;
|
||||
total: number;
|
||||
completed: number;
|
||||
phase: "uploading" | "saving" | "done" | "error";
|
||||
phase: "pending" | "uploading" | "saving" | "done" | "error" | "conflict";
|
||||
message?: string;
|
||||
draftCount?: number;
|
||||
};
|
||||
|
||||
type SyncProgressStore = {
|
||||
@@ -55,7 +56,7 @@ export const useSyncProgressStore = create<SyncProgressStore>((set, get) => ({
|
||||
clearAll: () => set({ syncingProjects: {} }),
|
||||
isAnySyncing: () => {
|
||||
const list = Object.values(get().syncingProjects);
|
||||
return list.some((item) => item.phase === "uploading" || item.phase === "saving");
|
||||
return list.some((item) => item.phase !== "done");
|
||||
},
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user