diff --git a/apps/frontend/app/channels/[id]/page.tsx b/apps/frontend/app/channels/[id]/page.tsx index 8fb90ee..bca0aba 100644 --- a/apps/frontend/app/channels/[id]/page.tsx +++ b/apps/frontend/app/channels/[id]/page.tsx @@ -11,14 +11,18 @@ import { retryRender, cancelRender, } from "../../actions"; -import { DeleteButton } from "../../components/DeleteButton"; import { ConfirmButton } from "../../components/ConfirmButton"; import { LiveLogViewer } from "../../components/LiveLogViewer"; import { SessionTimer } from "../../components/SessionTimer"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Badge, type badgeVariants } from "@/components/ui/badge"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import type { VariantProps } from "class-variance-authority"; export const dynamic = "force-dynamic"; -const STATUS_BADGE: Record = { +const STATUS_BADGE: Record["variant"]> = { PENDING: "muted", PROCESSED: "ok", DISCARDED: "err", @@ -62,22 +66,33 @@ export default async function ChannelDetailPage({ params }: { params: Promise<{ const activeSession = channel.sessions.find((s) => s.endedAt === null); return ( - <> -

← Kanal Durumu

+
+
+ + ← Kanal Durumu + +
-
-

{channel.name}

+
+
+

{channel.name}

+

+ {channel.youtubeHandle} · {channel.channelId} +

+
- +
-

{channel.youtubeHandle} · {channel.channelId}

-
-
- Canlı Durum - - + + + Canlı Durum +
+ {status?.recording ? "🔴 Kayıtta" : "Kayıtta değil"} {status?.recording && activeSession && ( <> @@ -85,157 +100,176 @@ export default async function ChannelDetailPage({ params }: { params: Promise<{ )} - + {status?.recording && activeSession && (
)} - -
-
- Aktif: {channel.isActive ? "evet" : "hayır"} ·{" "} - Son kontrol: {channel.lastCheckedAt ? new Date(channel.lastCheckedAt).toLocaleString("tr-TR") : "—"} -
- {status === undefined && ( -

- api-daemon'dan canlı durum alınamadı (servis erişilemez olabilir). +

+ + +

+ Aktif: {channel.isActive ? "evet" : "hayır"} · Son kontrol:{" "} + {channel.lastCheckedAt ? new Date(channel.lastCheckedAt).toLocaleString("tr-TR") : "—"}

- )} - {status?.lastPollError && ( -
- son poll hatası -
-              {status.lastPollError}
-            
-
- )} - {status?.recording && activeSession?.liveVideoId && activeSession.liveVideoId !== "forced" && ( -