mirror of
https://github.com/xCyanGrizzly/DragonsStash.git
synced 2026-05-11 06:11:15 +00:00
Bug fixes: - Fix channels not being scanned by paginating TDLib getChats (was only loading first batch, additional channels were unknown to TDLib) - Add per-channel getChat pre-load as safety net before scanning - Fix preview pictures not loading by checking previewData instead of previewMsgId for hasPreview flag - Prevent previewMsgId from being set when preview download fails Package Tags: - Add tags Text[] column to Package with migration backfilling from channel categories - Worker auto-inherits source channel category as initial tag - Tag filter dropdown and Tags column in STL Files table - Server actions for individual and bulk tag editing Kickstarters Tab: - New KickstarterHost, Kickstarter, and KickstarterPackage models - Full CRUD with delivery status, payment status, host management - Package linking (many-to-many with existing packages) - Sidebar entry with Gift icon - Table with search, filters, modal forms Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
55 lines
1.4 KiB
TypeScript
55 lines
1.4 KiB
TypeScript
"use client";
|
|
|
|
import {
|
|
Dialog,
|
|
DialogContent,
|
|
DialogDescription,
|
|
DialogHeader,
|
|
DialogTitle,
|
|
} from "@/components/ui/dialog";
|
|
import { KickstarterForm } from "./kickstarter-form";
|
|
|
|
interface HostOption {
|
|
id: string;
|
|
name: string;
|
|
_count: { kickstarters: number };
|
|
}
|
|
|
|
interface KickstarterModalProps {
|
|
open: boolean;
|
|
onOpenChange: (open: boolean) => void;
|
|
hosts: HostOption[];
|
|
kickstarter?: {
|
|
id: string;
|
|
name: string;
|
|
link: string | null;
|
|
filesUrl: string | null;
|
|
deliveryStatus: "NOT_DELIVERED" | "PARTIAL" | "DELIVERED";
|
|
paymentStatus: "PAID" | "UNPAID";
|
|
hostId: string | null;
|
|
notes: string | null;
|
|
};
|
|
}
|
|
|
|
export function KickstarterModal({ open, onOpenChange, hosts, kickstarter }: KickstarterModalProps) {
|
|
return (
|
|
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
<DialogContent className="sm:max-w-lg">
|
|
<DialogHeader>
|
|
<DialogTitle>{kickstarter ? "Edit Kickstarter" : "Add Kickstarter"}</DialogTitle>
|
|
<DialogDescription>
|
|
{kickstarter
|
|
? "Update the kickstarter details below."
|
|
: "Track a new Kickstarter or crowdfunding campaign."}
|
|
</DialogDescription>
|
|
</DialogHeader>
|
|
<KickstarterForm
|
|
kickstarter={kickstarter}
|
|
hosts={hosts}
|
|
onSuccess={() => onOpenChange(false)}
|
|
/>
|
|
</DialogContent>
|
|
</Dialog>
|
|
);
|
|
}
|