feat: 添加同步进度显示和中文界面支持

refactor: 重构同步引擎以支持进度跟踪
style: 更新前端界面为中文
docs: 更新README为中文文档
This commit is contained in:
panw
2026-04-01 10:43:51 +08:00
parent 34944518f0
commit 5eff309a9f
13 changed files with 469 additions and 154 deletions

View File

@@ -229,10 +229,7 @@ func HandleGetSyncStatus(engine *sync.Engine) gin.HandlerFunc {
c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid server ID"})
return
}
status := "idle"
if engine.IsSyncing(id) {
status = "syncing"
}
c.JSON(http.StatusOK, gin.H{"server_id": id, "status": status})
progress := engine.GetProgress(id)
c.JSON(http.StatusOK, progress)
}
}