frontend: kanal ekleme formu

Dashboard'a name/youtubeHandle/channelId alanlarıyla bir server action
formu eklendi. Polling ve /status için channel_id gerçek bir YouTube
UC... kimliği olmalı.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-30 15:17:26 +03:00
co-authored by Claude Sonnet 5
parent 0374846cc1
commit deefa75926
4 changed files with 68 additions and 3 deletions
+10 -3
View File
@@ -1,4 +1,5 @@
import { prisma } from "@streamclipper/db";
import { addChannel } from "./actions";
export const dynamic = "force-dynamic";
@@ -17,10 +18,16 @@ export default async function DashboardPage() {
return (
<>
<h1>Kanal Durumu</h1>
<form action={addChannel} className="card add-channel-form">
<input name="name" placeholder="Kanal adı" required />
<input name="youtubeHandle" placeholder="@handle" required />
<input name="channelId" placeholder="channel_id (UC...)" required />
<button type="submit">Kanal Ekle</button>
</form>
{channels.length === 0 ? (
<p className="empty">
Henüz kanal eklenmedi. `channels` tablosuna bir kayıt ekleyin (Prisma Studio veya seed script).
</p>
<p className="empty">Henüz kanal eklenmedi.</p>
) : (
<table>
<thead>