Add per-user detail pages with activity chart and request history
Each user in the leaderboard links to a profile page showing stat cards, a line chart (requests / storage / watch hours, 1W–1Y timeframes, raw or normalized, plus a Storage Load mode), and a full request history sorted newest-first. Includes Overseerr media status codes (1–5), Tautulli watch history aggregation, and a server-side raw cache so the user API route can enrich requests without re-fetching everything. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+8
-1
@@ -65,6 +65,13 @@ export default function Page() {
|
||||
load();
|
||||
}, [load]);
|
||||
|
||||
// Poll every 2 minutes to keep the UI fresh against the server cache.
|
||||
// The server itself refreshes every 5 min via the background poller.
|
||||
useEffect(() => {
|
||||
const id = setInterval(() => load(), 2 * 60 * 1000);
|
||||
return () => clearInterval(id);
|
||||
}, [load]);
|
||||
|
||||
const hasTautulli = data?.summary.totalWatchHours !== null;
|
||||
const openAlertCount = data?.summary.openAlertCount ?? 0;
|
||||
const generatedAt = data?.generatedAt ?? null;
|
||||
@@ -152,7 +159,7 @@ export default function Page() {
|
||||
<button
|
||||
key={t}
|
||||
onClick={() => setTab(t)}
|
||||
className={`px-4 py-2.5 text-sm font-medium border-b-2 transition-colors ${
|
||||
className={`px-4 py-2.5 text-sm font-medium border-b-2 transition-colors cursor-pointer ${
|
||||
tab === t
|
||||
? "border-yellow-400 text-white"
|
||||
: "border-transparent text-slate-500 hover:text-slate-300"
|
||||
|
||||
Reference in New Issue
Block a user