Add shorts_yt_quota module, Shorts UI quota banner, overview tweaks (hide upcoming opens, align events panel height), Electron desktop client scaffold, and deploy scripts; update README. Co-authored-by: Cursor <cursoragent@cursor.com>
42 lines
1.4 KiB
TypeScript
42 lines
1.4 KiB
TypeScript
import { Modal } from "@/components/Modal";
|
|
|
|
type Props = {
|
|
src: string;
|
|
title?: string;
|
|
subtitle?: string;
|
|
onClose: () => void;
|
|
};
|
|
|
|
export function ImageLightbox({ src, title, subtitle, onClose }: Props) {
|
|
return (
|
|
<Modal
|
|
open
|
|
onClose={onClose}
|
|
zIndex={90}
|
|
panelClassName="relative flex max-h-[96vh] w-full max-w-[min(96vw,72rem)] flex-col overflow-hidden rounded-2xl border border-white/10 bg-[#0b1220] shadow-2xl"
|
|
>
|
|
<div className="flex shrink-0 items-center justify-between border-b border-white/5 px-4 py-3">
|
|
<div className="min-w-0">
|
|
<div className="truncate text-sm font-medium text-white">{title || "封面预览"}</div>
|
|
{subtitle ? <div className="truncate text-xs text-slate-400">{subtitle}</div> : null}
|
|
</div>
|
|
<button
|
|
type="button"
|
|
onClick={onClose}
|
|
className="rounded-lg border border-white/10 bg-white/5 px-3 py-1.5 text-xs text-slate-200 hover:bg-white/10"
|
|
>
|
|
关闭 Esc
|
|
</button>
|
|
</div>
|
|
<div className="flex min-h-0 flex-1 items-center justify-center bg-black/50 p-2 sm:p-4">
|
|
{/* eslint-disable-next-line @next/next/no-img-element */}
|
|
<img
|
|
src={src}
|
|
alt={title || "cover"}
|
|
className="max-h-[min(88vh,900px)] w-auto max-w-full rounded-lg object-contain"
|
|
/>
|
|
</div>
|
|
</Modal>
|
|
);
|
|
}
|