Skip to content

Commit aef4c90

Browse files
committed
refactor: update UI components for improved layout in assistant message, public chat footer, and report panel
1 parent abf7589 commit aef4c90

4 files changed

Lines changed: 18 additions & 6 deletions

File tree

surfsense_web/components/assistant-ui/assistant-message.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ const AssistantMessageInner: FC = () => {
545545
</div>
546546
)}
547547

548-
<div className="aui-assistant-message-footer mt-1 mb-5 ml-2 flex items-center gap-2">
548+
<div className="aui-assistant-message-footer mt-3 mb-5 ml-2 flex items-center gap-2">
549549
<AssistantActionBar />
550550
</div>
551551
</CitationMetadataProvider>

surfsense_web/components/public-chat/public-chat-footer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function PublicChatFooter({ shareToken }: PublicChatFooterProps) {
6868
size="lg"
6969
onClick={handleCopyAndContinue}
7070
disabled={isCloning}
71-
className="gap-2 rounded-full px-6 shadow-lg transition-all duration-200 hover:scale-[1.02] hover:shadow-xl hover:brightness-110 hover:bg-primary"
71+
className="gap-2 rounded-full px-6 shadow-lg transition-al select-none duration-200 hover:scale-[1.02] hover:shadow-xl hover:brightness-110 hover:bg-primary"
7272
>
7373
{isCloning ? <Spinner size="sm" /> : <Copy className="size-4" />}
7474
Copy and continue this chat

surfsense_web/components/report-panel/pdf-viewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export function PdfViewer({ pdfUrl, isPublic = false }: PdfViewerProps) {
285285
return (
286286
<div className="flex flex-col h-full">
287287
{numPages > 0 && (
288-
<div className={`flex items-center justify-center gap-2 px-4 py-2 border-b shrink-0 ${isPublic ? "bg-main-panel" : "bg-sidebar"}`}>
288+
<div className={`flex items-center justify-center gap-2 px-4 py-2 border-b shrink-0 select-none ${isPublic ? "bg-main-panel" : "bg-sidebar"}`}>
289289
<Button variant="ghost" size="icon" onClick={zoomOut} disabled={scale <= MIN_ZOOM} className="size-7">
290290
<ZoomOutIcon className="size-4" />
291291
</Button>

surfsense_web/components/report-panel/report-panel.tsx

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
DropdownMenuItem,
1919
DropdownMenuTrigger,
2020
} from "@/components/ui/dropdown-menu";
21+
import { Spinner } from "@/components/ui/spinner";
2122
import { useMediaQuery } from "@/hooks/use-media-query";
2223
import { baseApiService } from "@/lib/apis/base-api.service";
2324
import { authenticatedFetch } from "@/lib/auth-utils";
@@ -292,7 +293,7 @@ export function ReportPanelContent({
292293
return (
293294
<>
294295
{/* Action bar — always visible; buttons are disabled while loading */}
295-
<div className="flex items-center justify-between px-4 py-2 shrink-0">
296+
<div className="flex h-14 items-center justify-between px-4 shrink-0">
296297
<div className="flex items-center gap-2">
297298
{/* Copy button — hidden for Typst (resume) */}
298299
{reportContent?.content_type !== "typst" && (
@@ -307,7 +308,18 @@ export function ReportPanelContent({
307308
</Button>
308309
)}
309310

310-
{/* Export dropdown */}
311+
{/* Export — plain button for resume (typst), dropdown for others */}
312+
{reportContent?.content_type === "typst" ? (
313+
<Button
314+
variant="outline"
315+
size="sm"
316+
onClick={() => handleExport("pdf")}
317+
disabled={isLoading || !reportContent?.content || exporting !== null}
318+
className={`h-8 min-w-[100px] px-3.5 py-4 text-[15px] ${btnBg} select-none`}
319+
>
320+
{exporting === "pdf" ? <Spinner size="xs" /> : "Download"}
321+
</Button>
322+
) : (
311323
<DropdownMenu modal={insideDrawer ? false : undefined}>
312324
<DropdownMenuTrigger asChild>
313325
<Button
@@ -328,10 +340,10 @@ export function ReportPanelContent({
328340
onExport={handleExport}
329341
exporting={exporting}
330342
showAllFormats={!shareToken}
331-
pdfOnly={reportContent?.content_type === "typst"}
332343
/>
333344
</DropdownMenuContent>
334345
</DropdownMenu>
346+
)}
335347

336348
{/* Version switcher — only shown when multiple versions exist */}
337349
{versions.length > 1 && (

0 commit comments

Comments
 (0)