mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-26 17:26:23 +02:00
feat: implement PDF viewer for resume previews and integrate with report panel
This commit is contained in:
parent
07bd076317
commit
06c344d66e
5 changed files with 174 additions and 2 deletions
|
|
@ -24,18 +24,30 @@ interface ExportMenuItemsProps {
|
|||
exporting: string | null;
|
||||
/** Hide server-side formats (PDF, DOCX, etc.) — only show md */
|
||||
showAllFormats?: boolean;
|
||||
/** When true, only show PDF export (used for Typst-based resumes) */
|
||||
pdfOnly?: boolean;
|
||||
}
|
||||
|
||||
export function ExportDropdownItems({
|
||||
onExport,
|
||||
exporting,
|
||||
showAllFormats = true,
|
||||
pdfOnly = false,
|
||||
}: ExportMenuItemsProps) {
|
||||
const handle = (format: string) => (e: React.MouseEvent) => {
|
||||
e.stopPropagation();
|
||||
onExport(format);
|
||||
};
|
||||
|
||||
if (pdfOnly) {
|
||||
return (
|
||||
<DropdownMenuItem onClick={handle("pdf")} disabled={exporting !== null}>
|
||||
{exporting === "pdf" && <Loader2 className="mr-2 h-3.5 w-3.5 animate-spin" />}
|
||||
PDF (.pdf)
|
||||
</DropdownMenuItem>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
{showAllFormats && (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue