Files
multica/packages/views/layout/help-launcher.tsx
Naiyuan Qing e994d77982 feat(help): mark external links with arrow, move Feedback last (#1560)
Add an ArrowUpRight glyph next to Docs and Change log to signal they
open externally, and reorder so Feedback (internal modal) sits at the
bottom.

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 17:18:18 +08:00

63 lines
1.9 KiB
TypeScript

"use client";
import { ArrowUpRight, BookOpen, CircleHelp, History, MessageCircle } from "lucide-react";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "@multica/ui/components/ui/dropdown-menu";
import { useModalStore } from "@multica/core/modals";
const DOCS_URL = "https://multica.ai/docs";
const CHANGELOG_URL = "https://multica.ai/changelog";
export function HelpLauncher() {
return (
<DropdownMenu>
<DropdownMenuTrigger
aria-label="Help"
title="Help"
className="inline-flex size-7 items-center justify-center rounded-full text-muted-foreground transition-colors cursor-pointer hover:bg-accent hover:text-foreground data-popup-open:bg-accent data-popup-open:text-foreground"
>
<CircleHelp className="size-4" />
</DropdownMenuTrigger>
<DropdownMenuContent
align="end"
side="top"
sideOffset={8}
className="min-w-40"
>
<DropdownMenuItem
render={
<a href={DOCS_URL} target="_blank" rel="noopener noreferrer" />
}
>
<BookOpen className="h-3.5 w-3.5" />
Docs
<ArrowUpRight className="size-3 translate-y-px text-muted-foreground/50" />
</DropdownMenuItem>
<DropdownMenuItem
render={
<a
href={CHANGELOG_URL}
target="_blank"
rel="noopener noreferrer"
/>
}
>
<History className="h-3.5 w-3.5" />
Change log
<ArrowUpRight className="size-3 translate-y-px text-muted-foreground/50" />
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => useModalStore.getState().open("feedback")}
>
<MessageCircle className="h-3.5 w-3.5" />
Feedback
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
);
}