fix(web): improve UI consistency and remove related unused icons (#27004)

This commit is contained in:
yangzheli
2025-10-20 14:03:16 +08:00
committed by GitHub
parent 1153dcef69
commit 9cc8ac981b
20 changed files with 11 additions and 429 deletions

View File

@@ -11,12 +11,11 @@ import { useRouter } from 'next/navigation'
import { debounce } from 'lodash-es'
import cn from '@/utils/classnames'
import AppIcon from '@/app/components/base/app-icon'
import { AiText, BubbleTextMod, ChatBot, CuteRobot } from '@/app/components/base/icons/src/vender/solid/communication'
import { Route } from '@/app/components/base/icons/src/vender/solid/mapsAndTravel'
import { AppTypeIcon } from '@/app/components/app/type-selector'
import { useAppContext } from '@/context/app-context'
import { useStore as useAppStore } from '@/app/components/app/store'
import { FileArrow01, FilePlus01, FilePlus02 } from '@/app/components/base/icons/src/vender/line/files'
import type { AppIconType } from '@/types/app'
import type { AppIconType, AppMode } from '@/types/app'
export type NavItem = {
id: string
@@ -26,7 +25,7 @@ export type NavItem = {
icon: string
icon_background: string | null
icon_url: string | null
mode?: string
mode?: AppMode
}
export type INavSelectorProps = {
navigationItems: NavItem[]
@@ -92,25 +91,7 @@ const NavSelector = ({ curNav, navigationItems, createText, isApp, onCreate, onL
imageUrl={nav.icon_url}
/>
{!!nav.mode && (
<span className={cn(
'absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 rounded border-[0.5px] border-[rgba(0,0,0,0.02)] bg-white p-0.5 shadow-sm',
)}>
{nav.mode === 'advanced-chat' && (
<BubbleTextMod className='h-2.5 w-2.5 text-[#1570EF]' />
)}
{nav.mode === 'agent-chat' && (
<CuteRobot className='h-2.5 w-2.5 text-indigo-600' />
)}
{nav.mode === 'chat' && (
<ChatBot className='h-2.5 w-2.5 text-[#1570EF]' />
)}
{nav.mode === 'completion' && (
<AiText className='h-2.5 w-2.5 text-[#0E9384]' />
)}
{nav.mode === 'workflow' && (
<Route className='h-2.5 w-2.5 text-[#f79009]' />
)}
</span>
<AppTypeIcon type={nav.mode} wrapperClassName='absolute -bottom-0.5 -right-0.5 h-3.5 w-3.5 shadow-sm' className='h-2.5 w-2.5' />
)}
</div>
<div className='truncate'>