feat(scheduler): live admin Scheduler dashboard + reusable poll hook (HU/EN/DE)
New admin Scheduler page (left-nav entry) with a live, self-refreshing view of job activity, queued work and quota. Polling is factored into a reusable useLiveQuery hook (pauses when the tab is unfocused) that the notification bell and future yt-dlp job queue will reuse instead of re-implementing.
This commit is contained in:
parent
a339a73bd6
commit
73b06b1fb6
13 changed files with 491 additions and 5 deletions
|
|
@ -3,6 +3,7 @@ import { createPortal } from "react-dom";
|
|||
import { useTranslation } from "react-i18next";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import {
|
||||
Activity,
|
||||
BarChart3,
|
||||
ChevronLeft,
|
||||
ChevronRight,
|
||||
|
|
@ -109,8 +110,10 @@ export default function NavSidebar({
|
|||
{ page: "channels", icon: Tv, label: t("header.account.channels") },
|
||||
{ page: "playlists", icon: ListVideo, label: t("header.account.playlists") },
|
||||
];
|
||||
if (me.role === "admin")
|
||||
if (me.role === "admin") {
|
||||
items.push({ page: "stats", icon: BarChart3, label: t("header.account.stats") });
|
||||
items.push({ page: "scheduler", icon: Activity, label: t("header.account.scheduler") });
|
||||
}
|
||||
|
||||
const rowBase =
|
||||
"w-full flex items-center gap-3 rounded-lg px-2.5 py-2 text-sm transition";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue