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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user