Просмотр исходного кода

WIP: 统一使用直立大头针置顶图标

[gstack-context]
Decisions: 置顶、取消置顶和列表标记共用直立大头针;列表图标增至 12px
Remaining: 全量测试、重载 8800、真实菜单检查
Skill: /frontend-skill
[/gstack-context]
samien 2 месяцев назад
Родитель
Сommit
335cd3d141

+ 1 - 1
src/client/components/app/ResourceSidebar.vue

@@ -139,7 +139,7 @@ defineExpose({ focusSearch })
             </span>
             <span class="sidebar-item__copy">
               <span class="sidebar-item__row">
-                <strong><AppIcon v-if="row.item.pinned" name="pin" :size="10" />{{ row.item.title }}</strong>
+                <strong><AppIcon v-if="row.item.pinned" name="pin" :size="12" />{{ row.item.title }}</strong>
                 <small v-if="row.item.meta">{{ row.item.meta }}</small>
               </span>
               <span v-if="!singleLine && row.item.subtitle" class="sidebar-item__row sidebar-item__row--secondary">

+ 1 - 1
src/client/components/common/AppIcon.vue

@@ -107,7 +107,7 @@ withDefaults(defineProps<{ name: IconName; size?: number }>(), { size: 18 })
     <template v-else-if="name === 'trash'"><path d="M3 6h18M8 6V4h8v2M19 6l-1 15H6L5 6M10 11v5M14 11v5" /></template>
     <template v-else-if="name === 'edit'"><path d="M12 20h9M16.5 3.5a2.1 2.1 0 0 1 3 3L8 18l-4 1 1-4z" /></template>
     <template v-else-if="name === 'panel'"><rect x="3" y="3" width="18" height="18" rx="2" /><path d="M15 3v18" /></template>
-    <template v-else-if="name === 'pin'"><path d="m14 4 6 6-3 1-4 4-1 5-2-2-2-2 5-1 4-4zM4 20l5-5" /></template>
+    <template v-else-if="name === 'pin'"><path d="M9 4v6l-2 4v2h10v-2l-2-4V4M12 16v5M8 4h8" /></template>
   </svg>
 </template>
 

+ 1 - 0
tests/e2e/workspace.spec.ts

@@ -195,6 +195,7 @@ test('keeps the canonical logo and yaoyao-webui composer geometry', async ({ pag
   await page.getByRole('button', { name: '会话操作' }).click()
   const sessionMenu = page.getByRole('menu', { name: '会话操作' })
   await expect(sessionMenu.getByText('取消置顶', { exact: true })).toBeVisible()
+  await expect(sessionMenu.getByRole('menuitem', { name: '取消置顶' }).locator('path')).toHaveAttribute('d', /M9 4v6l-2 4v2h10/)
   await expect(sessionMenu.getByText('重命名', { exact: true })).toBeVisible()
   await expect(sessionMenu.getByText('删除会话', { exact: true })).toBeVisible()
   await expect(page.getByText('置顶会话', { exact: true })).toHaveCount(0)