frontend: kanal silme özelliği
Kanal detay sayfasına "Kanalı Sil" eklendi — kanal + tüm session/ segment/candidate geçmişini (dosyalar dahil) siler, ana sayfaya yönlendirir. Yanlışlıkla/test amaçlı eklenen kanalları temizlemek için. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import { notFound } from "next/navigation";
|
||||
import Link from "next/link";
|
||||
import { prisma } from "@streamclipper/db";
|
||||
import { fetchChannelStatuses } from "../../../lib/apiDaemon";
|
||||
import { deleteRawSegment, deleteCandidateSegment } from "../../actions";
|
||||
import { deleteRawSegment, deleteCandidateSegment, deleteChannel } from "../../actions";
|
||||
import { DeleteButton } from "../../components/DeleteButton";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
@@ -51,7 +51,12 @@ export default async function ChannelDetailPage({ params }: { params: Promise<{
|
||||
<>
|
||||
<p><Link href="/">← Kanal Durumu</Link></p>
|
||||
|
||||
<h1>{channel.name}</h1>
|
||||
<div className="card-head">
|
||||
<h1>{channel.name}</h1>
|
||||
<form action={deleteChannel.bind(null, channel.id)}>
|
||||
<DeleteButton confirmText="Bu kanalı ve tüm kayıt geçmişini silmek istediğine emin misin? Geri alınamaz." label="Kanalı Sil" />
|
||||
</form>
|
||||
</div>
|
||||
<p className="mono">{channel.youtubeHandle} · {channel.channelId}</p>
|
||||
|
||||
<div className="card">
|
||||
|
||||
Reference in New Issue
Block a user