mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-24 10:06:56 +00:00
feat(webui): use filled bot icon when chatbot sidebar is open
This commit is contained in:
@@ -1,28 +1,29 @@
|
||||
import { client } from '@/ui/api/client'
|
||||
import { Badge } from '@/ui/components/ui/badge'
|
||||
import {
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuPortal,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubContent,
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuTrigger,
|
||||
DropdownMenu,
|
||||
DropdownMenuContent,
|
||||
DropdownMenuItem,
|
||||
DropdownMenuLabel,
|
||||
DropdownMenuPortal,
|
||||
DropdownMenuSeparator,
|
||||
DropdownMenuSub,
|
||||
DropdownMenuSubContent,
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuTrigger,
|
||||
} from '@/ui/components/ui/dropdown-menu'
|
||||
import {
|
||||
DockToLeft,
|
||||
DockToLeftFilled,
|
||||
DockToRight,
|
||||
DockToRightFilled,
|
||||
BotFilled,
|
||||
DockToLeft,
|
||||
DockToLeftFilled,
|
||||
DockToRight,
|
||||
DockToRightFilled,
|
||||
} from '@/ui/components/ui/icons'
|
||||
import {
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
Tooltip,
|
||||
TooltipContent,
|
||||
TooltipProvider,
|
||||
TooltipTrigger,
|
||||
} from '@/ui/components/ui/tooltip'
|
||||
import { usePermissions } from '@/ui/hooks/use-permissions'
|
||||
import { cn } from '@/ui/lib/utils'
|
||||
@@ -31,14 +32,14 @@ import type { AncestorFolder } from '@shumai/dtos'
|
||||
import { useQuery } from '@tanstack/react-query'
|
||||
import { Link, useNavigate } from '@tanstack/react-router'
|
||||
import {
|
||||
Bot,
|
||||
Check,
|
||||
ChevronDown,
|
||||
Columns2,
|
||||
FileIcon,
|
||||
History,
|
||||
LayoutGrid,
|
||||
List,
|
||||
Bot,
|
||||
Check,
|
||||
ChevronDown,
|
||||
Columns2,
|
||||
FileIcon,
|
||||
History,
|
||||
LayoutGrid,
|
||||
List,
|
||||
} from 'lucide-react'
|
||||
|
||||
interface BreadcrumbNavProps {
|
||||
@@ -481,12 +482,11 @@ export function BreadcrumbNav({
|
||||
isChatbotDisabled && 'opacity-50 cursor-not-allowed',
|
||||
)}
|
||||
>
|
||||
<Bot
|
||||
className={cn(
|
||||
'h-6 w-6 transition-colors',
|
||||
isChatbotOpen ? 'text-primary fill-primary/10' : 'text-muted-foreground',
|
||||
)}
|
||||
/>
|
||||
{isChatbotOpen ? (
|
||||
<BotFilled className="h-6 w-6 text-primary transition-colors" />
|
||||
) : (
|
||||
<Bot className="h-6 w-6 text-muted-foreground transition-colors" />
|
||||
)}
|
||||
</button>
|
||||
</span>
|
||||
</TooltipTrigger>
|
||||
|
||||
@@ -55,6 +55,34 @@ export const DockToRightFilled: React.FC<IconProps> = (props) => (
|
||||
</svg>
|
||||
)
|
||||
|
||||
/**
|
||||
* Icon: Bot (Filled)
|
||||
* A filled version of the Bot icon, useful when the chatbot sidebar is active.
|
||||
*/
|
||||
export const BotFilled: React.FC<IconProps> = (props) => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
height="24"
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
{...props}
|
||||
>
|
||||
<path d="M12 8V4H8" />
|
||||
<path
|
||||
d="M6 7H18A3 3 0 0 1 21 10V18A3 3 0 0 1 18 21H6A3 3 0 0 1 3 18V10A3 3 0 0 1 6 7ZM8 13V15A1 1 0 0 0 10 15V13A1 1 0 0 0 8 13ZM14 13V15A1 1 0 0 0 16 15V13A1 1 0 0 0 14 13Z"
|
||||
fill="currentColor"
|
||||
stroke="none"
|
||||
/>
|
||||
<path d="M2 14h2" />
|
||||
<path d="M20 14h2" />
|
||||
</svg>
|
||||
)
|
||||
|
||||
export const NotificationFillIcon: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
|
||||
Reference in New Issue
Block a user