Files
dragonsstash/src/app/(app)/telegram/_components/channel-modal.tsx
xCyanGrizzly b427193d17 feat: add Telegram integration with forum topic support and creator tracking
Adds full Telegram ZIP ingestion pipeline: TDLib worker service scans source
channels for archive files, deduplicates by content hash, extracts metadata,
uploads to archive channel, and indexes in Postgres. Forum supergroups are
scanned per-topic with topic names used as creator. Filename-based creator
extraction (e.g. "Mammoth Factory - 2026-01.zip") serves as fallback.

Includes admin UI for managing accounts/channels, simplified account setup
(API credentials via env vars), auth code/password submission dialog,
package browser with creator column, and live ingestion activity tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 16:02:06 +01:00

45 lines
1.1 KiB
TypeScript

"use client";
import {
Dialog,
DialogContent,
DialogDescription,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import { ChannelForm } from "./channel-form";
import type { ChannelRow } from "@/lib/telegram/admin-queries";
interface ChannelModalProps {
open: boolean;
onOpenChange: (open: boolean) => void;
channel?: ChannelRow;
}
export function ChannelModal({
open,
onOpenChange,
channel,
}: ChannelModalProps) {
return (
<Dialog open={open} onOpenChange={onOpenChange}>
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle>
{channel ? "Edit Channel" : "Add Channel"}
</DialogTitle>
<DialogDescription>
{channel
? "Update the channel details below."
: "Add a Telegram channel. Source channels are scanned for archives, destination channels receive indexed files."}
</DialogDescription>
</DialogHeader>
<ChannelForm
channel={channel}
onSuccess={() => onOpenChange(false)}
/>
</DialogContent>
</Dialog>
);
}