feat: restyle admin UI and add per-user sync run history

Adds a self-hosted stylesheet (no CDN dependencies) with a card-based
dashboard and color-coded status badges, and shows the last 10 sync
runs per user on the detail page.
This commit is contained in:
Bastian Wagner
2026-08-15 20:19:31 +02:00
parent 990a55af14
commit 85b0d861b4
13 changed files with 597 additions and 126 deletions

View File

@@ -204,6 +204,16 @@ class SyncRunRepository:
def get(self, sync_run_id: int) -> SyncRun | None:
return self.session.get(SyncRun, sync_run_id)
def list_recent_for_user(self, user_id: int, limit: int = 10) -> list[SyncRun]:
return list(
self.session.scalars(
select(SyncRun)
.where(SyncRun.user_id == user_id)
.order_by(SyncRun.started_at.desc())
.limit(limit)
)
)
def finish(
self,
sync_run_id: int,