From 37167fc19cb94a56a8fa391f5199ff35d01471be Mon Sep 17 00:00:00 2001 From: Gabriel Kaszewski Date: Wed, 11 Mar 2026 21:37:18 +0100 Subject: [PATCH] feat: add import functionality for channel configurations and export option for channels --- .../dashboard/components/channel-card.tsx | 13 +- .../components/import-channel-dialog.tsx | 269 ++++++++++++++++++ k-tv-frontend/app/(main)/dashboard/page.tsx | 74 ++++- 3 files changed, 350 insertions(+), 6 deletions(-) create mode 100644 k-tv-frontend/app/(main)/dashboard/components/import-channel-dialog.tsx diff --git a/k-tv-frontend/app/(main)/dashboard/components/channel-card.tsx b/k-tv-frontend/app/(main)/dashboard/components/channel-card.tsx index 463b4f1..7231e91 100644 --- a/k-tv-frontend/app/(main)/dashboard/components/channel-card.tsx +++ b/k-tv-frontend/app/(main)/dashboard/components/channel-card.tsx @@ -1,5 +1,5 @@ import Link from "next/link"; -import { Pencil, Trash2, RefreshCw, Tv2, CalendarDays } from "lucide-react"; +import { Pencil, Trash2, RefreshCw, Tv2, CalendarDays, Download } from "lucide-react"; import { Button } from "@/components/ui/button"; import type { ChannelResponse } from "@/lib/types"; @@ -10,6 +10,7 @@ interface ChannelCardProps { onDelete: () => void; onGenerateSchedule: () => void; onViewSchedule: () => void; + onExport: () => void; } export function ChannelCard({ @@ -19,6 +20,7 @@ export function ChannelCard({ onDelete, onGenerateSchedule, onViewSchedule, + onExport, }: ChannelCardProps) { const blockCount = channel.schedule_config.blocks.length; @@ -38,6 +40,15 @@ export function ChannelCard({
+