feat: 添加同步进度显示和中文界面支持
refactor: 重构同步引擎以支持进度跟踪 style: 更新前端界面为中文 docs: 更新README为中文文档
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user