@@ -286,22 +286,26 @@ export function ReportPanelContent({
286286 } , [ activeReportId , currentMarkdown ] ) ;
287287
288288 const activeVersionIndex = versions . findIndex ( ( v ) => v . id === activeReportId ) ;
289+ const isPublic = ! ! shareToken ;
290+ const btnBg = isPublic ? "bg-main-panel" : "bg-sidebar" ;
289291
290292 return (
291293 < >
292294 { /* Action bar — always visible; buttons are disabled while loading */ }
293295 < div className = "flex items-center justify-between px-4 py-2 shrink-0" >
294296 < div className = "flex items-center gap-2" >
295- { /* Copy button */ }
296- < Button
297- variant = "outline"
298- size = "sm"
299- onClick = { handleCopy }
300- disabled = { isLoading || ! reportContent ?. content }
301- className = "h-8 min-w-[80px] px-3.5 py-4 text-[15px] bg-sidebar select-none"
302- >
303- { copied ? "Copied" : "Copy" }
304- </ Button >
297+ { /* Copy button — hidden for Typst (resume) */ }
298+ { reportContent ?. content_type !== "typst" && (
299+ < Button
300+ variant = "outline"
301+ size = "sm"
302+ onClick = { handleCopy }
303+ disabled = { isLoading || ! reportContent ?. content }
304+ className = { `h-8 min-w-[80px] px-3.5 py-4 text-[15px] ${ btnBg } select-none` }
305+ >
306+ { copied ? "Copied" : "Copy" }
307+ </ Button >
308+ ) }
305309
306310 { /* Export dropdown */ }
307311 < DropdownMenu modal = { insideDrawer ? false : undefined } >
@@ -310,7 +314,7 @@ export function ReportPanelContent({
310314 variant = "outline"
311315 size = "sm"
312316 disabled = { isLoading || ! reportContent ?. content }
313- className = " h-8 px-3.5 py-4 text-[15px] gap-1.5 bg-sidebar select-none"
317+ className = { ` h-8 px-3.5 py-4 text-[15px] gap-1.5 ${ btnBg } select-none` }
314318 >
315319 Export
316320 < ChevronDownIcon className = "size-3" />
@@ -336,7 +340,7 @@ export function ReportPanelContent({
336340 < Button
337341 variant = "outline"
338342 size = "sm"
339- className = " h-8 px-3.5 py-4 text-[15px] gap-1.5 bg-sidebar select-none"
343+ className = { ` h-8 px-3.5 py-4 text-[15px] gap-1.5 ${ btnBg } select-none` }
340344 >
341345 v{ activeVersionIndex + 1 }
342346 < ChevronDownIcon className = "size-3" />
@@ -381,6 +385,7 @@ export function ReportPanelContent({
381385 ) : reportContent . content_type === "typst" ? (
382386 < PdfViewer
383387 pdfUrl = { `${ process . env . NEXT_PUBLIC_FASTAPI_BACKEND_URL } ${ shareToken ? `/api/v1/public/${ shareToken } /reports/${ activeReportId } /preview` : `/api/v1/reports/${ activeReportId } /preview` } ` }
388+ isPublic = { isPublic }
384389 />
385390 ) : reportContent . content ? (
386391 isReadOnly ? (
@@ -432,10 +437,12 @@ function DesktopReportPanel() {
432437
433438 if ( ! panelState . isOpen || ! panelState . reportId ) return null ;
434439
440+ const isPublic = ! ! panelState . shareToken ;
441+
435442 return (
436443 < div
437444 ref = { panelRef }
438- className = " flex w-[50%] max-w-[700px] min-w-[380px] flex-col border-l bg-sidebar text-sidebar-foreground animate-in slide-in-from-right-4 duration-300 ease-out"
445+ className = { ` flex w-[50%] max-w-[700px] min-w-[380px] flex-col border-l animate-in slide-in-from-right-4 duration-300 ease-out ${ isPublic ? "bg-main-panel text-foreground" : "bg-sidebar text-sidebar-foreground" } ` }
439446 >
440447 < ReportPanelContent
441448 reportId = { panelState . reportId }
@@ -456,6 +463,8 @@ function MobileReportDrawer() {
456463
457464 if ( ! panelState . reportId ) return null ;
458465
466+ const isPublic = ! ! panelState . shareToken ;
467+
459468 return (
460469 < Drawer
461470 open = { panelState . isOpen }
@@ -465,7 +474,7 @@ function MobileReportDrawer() {
465474 shouldScaleBackground = { false }
466475 >
467476 < DrawerContent
468- className = " h-[90vh] max-h-[90vh] z-80 bg-sidebar overflow-hidden"
477+ className = { ` h-[90vh] max-h-[90vh] z-80 overflow-hidden ${ isPublic ? " bg-main-panel" : "bg-sidebar" } ` }
469478 overlayClassName = "z-80"
470479 >
471480 < DrawerHandle />
0 commit comments