进度模拟面板写入 puzzleStore 后,App 启动时易班同步会将其覆盖; 现在在同步完成后按 sessionStorage 中保存的模式重放模拟进度, 确保测试包的"到达某故居/全流程完成"调试入口生效。 同时纳入近期未提交的页面、组件、资源与环境变量改动。 Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
19 lines
530 B
TypeScript
19 lines
530 B
TypeScript
export interface SyncLoadingOptions {
|
|
text?: string
|
|
}
|
|
|
|
export const SYNC_LOADING_EVENT = 'sync-loading'
|
|
export const SYNC_LOADING_HIDE_EVENT = 'sync-loading-hide'
|
|
|
|
const dispatchSyncLoading = (detail: SyncLoadingOptions) => {
|
|
window.dispatchEvent(new CustomEvent<SyncLoadingOptions>(SYNC_LOADING_EVENT, { detail }))
|
|
}
|
|
|
|
export const showSyncLoading = (options?: SyncLoadingOptions) => {
|
|
dispatchSyncLoading(options ?? {})
|
|
}
|
|
|
|
export const hideSyncLoading = () => {
|
|
window.dispatchEvent(new Event(SYNC_LOADING_HIDE_EVENT))
|
|
}
|