feat: Avatar Position-Offset (translate X/Y)
Backend: - AgentRecord + SessionRecord: AvatarOffsetX, AvatarOffsetY Properties - DB-Migration: avatar_offset_x/y REAL DEFAULT 0 auf agents + sessions - Agent/Session Endpoints: Create + Update lesen/schreiben Offset-Felder - GetSessionsWithStats: Offset-Felder ans Frontend Frontend: - Avatar-Editor: X/Y Offset-Slider (-50% bis +50%) im Modal - buildTransformStyle() Helper für transform: scale() translate() - getOffsetX()/getOffsetY() Public API - Reset bei Clear/AI-Generate/Upload - ui.js: buildAgentCard + buildSessionCard rendern transform mit Offset - Agent-Page + Session-Page: initialOffsetX/Y + Save - CSS: .av-offset-row Styles (gruppiert mit .av-scale-row)
This commit is contained in:
1 parent
95b3683910
commit
4775b8ded7
10 files changed
+143
-30
No files matched your search
@@ -77,10 +77,12 @@ public static class SessionEndpoint
|
||||
var context = body.TryGetProperty("context", out var ctxEl) ? ctxEl.GetString() : null;
|
||||
var customCommands = body.TryGetProperty("customCommands", out var cc) && cc.ValueKind != JsonValueKind.Null ? cc.GetRawText() : null;
|
||||
var avatarScale = body.TryGetProperty("avatarScale", out var asc) ? asc.GetDouble() : 1.0;
|
||||
var avatarOffsetX = body.TryGetProperty("avatarOffsetX", out var aox) ? aox.GetDouble() : 0;
|
||||
var avatarOffsetY = body.TryGetProperty("avatarOffsetY", out var aoy) ? aoy.GetDouble() : 0;
|
||||
var reviewAgentId = body.TryGetProperty("reviewAgentId", out var ra) ? ra.GetString() : null;
|
||||
var maxReviewIterations = body.TryGetProperty("maxReviewIterations", out var mri) ? mri.GetInt32() : 3;
|
||||
|
||||
var session = await db.CreateSession(userId, name, description, image, agentId, workspace, context, customCommands, avatarScale, reviewAgentId, maxReviewIterations);
|
||||
var session = await db.CreateSession(userId, name, description, image, agentId, workspace, context, customCommands, avatarScale, avatarOffsetX, avatarOffsetY, reviewAgentId, maxReviewIterations);
|
||||
await ctx.Response.WriteAsJsonAsync(session);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user