Bläddra i källkod

侧栏对话入口使用 Bots 图标

LSamien 2 månader sedan
förälder
incheckning
1597ef0e3e

+ 4 - 4
src/client/components/app/WorkspaceShell.vue

@@ -10,7 +10,7 @@ type NavItem = {
   key: 'chat' | 'groups' | 'files'
   label: string
   path: string
-  icon: 'chat' | 'groups' | 'files'
+  icon: 'bots' | 'groups' | 'files'
 }
 
 const SIDEBAR_COLLAPSED_KEY = 'hermes-yaoyao:sidebar-collapsed'
@@ -61,7 +61,7 @@ const desktopSidebarContext = ref<HTMLElement | null>(null)
 const mobileSidebarContext = ref<HTMLElement | null>(null)
 
 const navItems: NavItem[] = [
-  { key: 'chat', label: '对话', path: '/chat', icon: 'chat' },
+  { key: 'chat', label: '对话', path: '/chat', icon: 'bots' },
   { key: 'groups', label: '群聊', path: '/groups', icon: 'groups' },
   { key: 'files', label: '文件库', path: '/files', icon: 'files' },
 ]
@@ -99,8 +99,8 @@ function toggleSidebar() {
   try { localStorage.setItem(SIDEBAR_COLLAPSED_KEY, sidebarCollapsed.value ? '1' : '0') } catch { /* optional persistence */ }
 }
 
-function navIcon(key: NavItem['key']): 'chat' | 'folder' | 'people' {
-  return key === 'groups' ? 'people' : key === 'files' ? 'folder' : 'chat'
+function navIcon(key: NavItem['key']): 'bots' | 'folder' | 'people' {
+  return key === 'groups' ? 'people' : key === 'files' ? 'folder' : 'bots'
 }
 
 async function openSidebarSearch(host: HTMLElement | null) {

+ 5 - 0
src/client/components/common/AppIcon.vue

@@ -1,6 +1,7 @@
 <script setup lang="ts">
 type IconName =
   | 'chat'
+  | 'bots'
   | 'groups'
   | 'files'
   | 'artifacts'
@@ -66,6 +67,10 @@ withDefaults(defineProps<{ name: IconName; size?: number }>(), { size: 18 })
       <path d="M8 18h-3a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2h-5l-6 4z" />
       <path d="M8 9h8M8 13h5" />
     </template>
+    <template v-else-if="name === 'bots'">
+      <rect x="4" y="7" width="16" height="12" rx="3" />
+      <path d="M12 3v4M9 12h.01M15 12h.01M9 16h6" />
+    </template>
     <template v-else-if="name === 'groups'">
       <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" />
       <circle cx="9" cy="7" r="4" />

+ 3 - 1
src/client/components/common/YaoYaoSidebarIcon.vue

@@ -8,12 +8,14 @@ import {
   PeopleOutline,
   SearchOutline,
 } from '@vicons/ionicons5'
+import { Robot } from '@vicons/tabler'
 
-type SidebarIconName = 'add' | 'chat' | 'folder' | 'people' | 'search'
+type SidebarIconName = 'add' | 'bots' | 'chat' | 'folder' | 'people' | 'search'
 
 const props = withDefaults(defineProps<{ name: SidebarIconName; size?: number }>(), { size: 20 })
 const component = computed(() => ({
   add: AddOutline,
+  bots: Robot,
   chat: ChatbubbleOutline,
   folder: FolderOutline,
   people: PeopleOutline,