anchor-based zoom levels, week separators in chart, UI polish

This commit is contained in:
Meleki committed 2026-02-22 18:21:30 +01:00
1 parent c5ce7c24f7
commit 75b324e388
3 files changed
+112 -17

No files matched your search

+8
View File
@@ -15,6 +15,14 @@ var app = builder.Build();
app.UseDefaultFiles();
app.UseStaticFiles();
// GET /api/settings
app.MapGet("/api/settings", (IConfiguration config) =>
{
var anchorDay = int.TryParse(config["AnchorDay"], out var d) ? d : 4; // 0=Sun, 4=Thu
var anchorHour = int.TryParse(config["AnchorHour"], out var h) ? h : 23;
return Results.Ok(new { anchorDay, anchorHour });
});
// GET /api/cost-buckets?from=&to=&bucketMinutes=
// Returns N buckets of aggregated cost
app.MapGet("/api/cost-buckets", (Func<SqliteConnection> factory, string from, string to, int bucketMinutes) =>