auto-save 2026-05-26 00:19 (~5)
This commit is contained in:
@@ -170,8 +170,7 @@ export const loadRemoteProjects = async () => {
|
||||
const response = await requestJson('/canvas-projects')
|
||||
remoteAvailable = true
|
||||
const remoteItems = (response.items || []).map(projectFromApi)
|
||||
const missingLocal = localItems.filter(local => !remoteItems.some(remote => remote.id === local.id))
|
||||
const importedItems = await importLocalProjectsToServer(missingLocal)
|
||||
const importedItems = await importLocalProjectsToServer(localItems)
|
||||
const merged = mergeProjectLists(localItems, [...remoteItems, ...importedItems])
|
||||
projects.value = merged
|
||||
saveProjects({ remote: false })
|
||||
|
||||
@@ -833,12 +833,12 @@ watch(
|
||||
)
|
||||
|
||||
// Initialize | 初始化
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
checkMobile()
|
||||
window.addEventListener('resize', checkMobile)
|
||||
|
||||
// Initialize projects store | 初始化项目存储
|
||||
initProjectsStore()
|
||||
await initProjectsStore()
|
||||
|
||||
// Load project data | 加载项目数据
|
||||
loadProjectById(route.params.id)
|
||||
|
||||
Reference in New Issue
Block a user