From 7d504d19388397a5bc73f670e94245c6265dcaa6 Mon Sep 17 00:00:00 2001 From: ayrisdev Date: Wed, 2 Sep 2026 14:33:24 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20panel=20UI'=C4=B1n=C4=B1=20Tailwind=20v?= =?UTF-8?q?4=20+=20shadcn/ui=20ile=20yeniden=20tasarla=20(Faz=204)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Elle yazılmış tek-dosya CSS (sabit koyu tema, ham table/button, window.confirm ile silme onayı) yerine tutarlı bir bileşen sistemi: Card/Table/Badge/Button/ Input/Switch/AlertDialog primitifleri, Hanken Grotesk + JetBrains Mono tipografi çifti, "broadcast/monitör" temalı özel bir renk paleti (camgöbeği accent, ok/warn/err/live durum rengi sözlüğü). Tüm sayfalar (dashboard, kanal detay, segmentler, ayarlar, istatistik, kullanıcılar, login) aynı oturumda taşındı — silme onayları artık gerçek AlertDialog, native confirm() değil. Veri akışı/server action'lar değişmedi, tamamen görsel katman. Co-Authored-By: Claude Sonnet 5 --- apps/frontend/app/channels/[id]/page.tsx | 330 +-- .../frontend/app/components/ConfirmButton.tsx | 57 +- apps/frontend/app/components/DeleteButton.tsx | 16 - .../frontend/app/components/LiveLogViewer.tsx | 13 +- apps/frontend/app/components/NavLink.tsx | 24 + apps/frontend/app/components/SessionTimer.tsx | 2 +- apps/frontend/app/globals.css | 226 +- apps/frontend/app/layout.tsx | 46 +- apps/frontend/app/login/page.tsx | 79 +- apps/frontend/app/page.tsx | 173 +- apps/frontend/app/segments/page.tsx | 202 +- apps/frontend/app/settings/page.tsx | 216 +- apps/frontend/app/stats/page.tsx | 65 +- apps/frontend/app/users/page.tsx | 116 +- apps/frontend/components.json | 21 + apps/frontend/components/ui/alert-dialog.tsx | 142 ++ apps/frontend/components/ui/alert.tsx | 41 + apps/frontend/components/ui/badge.tsx | 45 + apps/frontend/components/ui/button.tsx | 62 + apps/frontend/components/ui/card.tsx | 57 + apps/frontend/components/ui/input.tsx | 21 + apps/frontend/components/ui/label.tsx | 21 + apps/frontend/components/ui/separator.tsx | 28 + apps/frontend/components/ui/switch.tsx | 35 + apps/frontend/components/ui/table.tsx | 76 + apps/frontend/components/ui/textarea.tsx | 18 + apps/frontend/lib/utils.ts | 6 + apps/frontend/package.json | 10 +- apps/frontend/postcss.config.mjs | 7 + pnpm-lock.yaml | 2082 ++++++++++++++++- 30 files changed, 3436 insertions(+), 801 deletions(-) delete mode 100644 apps/frontend/app/components/DeleteButton.tsx create mode 100644 apps/frontend/app/components/NavLink.tsx create mode 100644 apps/frontend/components.json create mode 100644 apps/frontend/components/ui/alert-dialog.tsx create mode 100644 apps/frontend/components/ui/alert.tsx create mode 100644 apps/frontend/components/ui/badge.tsx create mode 100644 apps/frontend/components/ui/button.tsx create mode 100644 apps/frontend/components/ui/card.tsx create mode 100644 apps/frontend/components/ui/input.tsx create mode 100644 apps/frontend/components/ui/label.tsx create mode 100644 apps/frontend/components/ui/separator.tsx create mode 100644 apps/frontend/components/ui/switch.tsx create mode 100644 apps/frontend/components/ui/table.tsx create mode 100644 apps/frontend/components/ui/textarea.tsx create mode 100644 apps/frontend/lib/utils.ts create mode 100644 apps/frontend/postcss.config.mjs 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" && ( -