Parcourir la source

恢复原有群聊图标

LSamien il y a 2 mois
Parent
commit
a56c658f88

+ 5 - 1
src/client/components/app/WorkspaceShell.vue

@@ -99,6 +99,10 @@ 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'
+}
+
 async function openSidebarSearch(host: HTMLElement | null) {
   if (sidebarCollapsed.value) {
     sidebarCollapsed.value = false
@@ -221,7 +225,7 @@ onBeforeUnmount(() => {
           :title="item.label"
           @click="navigate(item.path)"
         >
-          <AppIcon :name="item.icon" :size="18" />
+          <YaoYaoSidebarIcon :name="navIcon(item.key)" />
           <span>{{ item.label }}</span>
         </button>
       </nav>

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

@@ -67,11 +67,9 @@ withDefaults(defineProps<{ name: IconName; size?: number }>(), { size: 18 })
       <path d="M8 9h8M8 13h5" />
     </template>
     <template v-else-if="name === 'groups'">
-      <circle cx="12" cy="7" r="3.25" fill="currentColor" stroke="none" />
-      <path d="M5.9 20.5c.55-3.9 2.74-5.85 6.1-5.85s5.55 1.95 6.1 5.85" fill="currentColor" stroke="none" />
-      <circle cx="5.1" cy="9.2" r="2.35" fill="currentColor" stroke="none" opacity=".82" />
-      <circle cx="18.9" cy="9.2" r="2.35" fill="currentColor" stroke="none" opacity=".82" />
-      <path d="M1.7 20.5c.38-2.85 1.8-4.38 4.25-4.6M22.3 20.5c-.38-2.85-1.8-4.38-4.25-4.6" fill="currentColor" stroke="none" opacity=".82" />
+      <path d="M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2" />
+      <circle cx="9" cy="7" r="4" />
+      <path d="M22 21v-2a4 4 0 0 0-3-3.87M16 3.13a4 4 0 0 1 0 7.75" />
     </template>
     <template v-else-if="name === 'files'">
       <path d="M4 4a2 2 0 0 1 2-2h5l2 3h5a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2z" />

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

@@ -5,16 +5,18 @@ import {
   AddOutline,
   ChatbubbleOutline,
   FolderOutline,
+  PeopleOutline,
   SearchOutline,
 } from '@vicons/ionicons5'
 
-type SidebarIconName = 'add' | 'chat' | 'folder' | 'search'
+type SidebarIconName = 'add' | 'chat' | 'folder' | 'people' | 'search'
 
 const props = withDefaults(defineProps<{ name: SidebarIconName; size?: number }>(), { size: 20 })
 const component = computed(() => ({
   add: AddOutline,
   chat: ChatbubbleOutline,
   folder: FolderOutline,
+  people: PeopleOutline,
   search: SearchOutline,
 })[props.name])
 </script>