Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

fix(desktop): 恢复侧边栏账号卡片容器圆角与操作按钮圆角

Shinkub6e9247d88f6
diff --git a/apps/desktop/src/renderer/__tests__/userInfoSectionHover.test.ts b/apps/desktop/src/renderer/__tests__/userInfoSectionHover.test.ts
index a83cad5716..9d75e7412f 100644
--- a/apps/desktop/src/renderer/__tests__/userInfoSectionHover.test.ts
+++ b/apps/desktop/src/renderer/__tests__/userInfoSectionHover.test.ts
@@ -35,7 +35,7 @@ describe('UserInfoSection — outer wrapper takes over full-row hover', () => {
expect(source).toContain('mt-auto pt-1');
});
- it('visible user card uses the tokenized capsule style (no rounded corners)', () => {
+ it('visible user card uses the tokenized capsule style with rectangular corners', () => {
expect(source).toContain(
'flex h-12 items-center border border-[var(--sidebar-user-card-border)] bg-[var(--sidebar-user-card-bg)] pl-3 pr-1.5',
);
@@ -193,9 +193,9 @@ describe('UserInfoSection — Flame button carries .flame-btn marker class', ()
expect(source).toMatch(/'transition-colors hover:bg-sidebar-item-hover'/);
});
- it('Flame button keeps correct size inside the account capsule', () => {
+ it('Flame button keeps correct size and rounded-full inside the account capsule', () => {
expect(source).toContain(
- 'flex h-9 w-9 shrink-0 items-center justify-center',
+ 'flex h-9 w-9 shrink-0 items-center justify-center rounded-full',
);
});
});
diff --git a/apps/desktop/src/renderer/components/sidebar/UserInfoSection.tsx b/apps/desktop/src/renderer/components/sidebar/UserInfoSection.tsx
index 536c7f1672..056b019a6f 100644
--- a/apps/desktop/src/renderer/components/sidebar/UserInfoSection.tsx
+++ b/apps/desktop/src/renderer/components/sidebar/UserInfoSection.tsx
@@ -95,7 +95,7 @@ export function UserInfoSection({ isCollapsed, onOpenUpdateNotice }: UserInfoSec
aria-label={t('sidebar.user.downloadMobile')}
className={cn(
'mobile-download-btn',
- 'flex shrink-0 items-center justify-center',
+ 'flex shrink-0 items-center justify-center rounded-full',
isCollapsed ? 'h-8 w-8' : 'h-9 w-9',
'text-[var(--sidebar-user-card-text)] transition-colors hover:bg-sidebar-item-hover',
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--focus-ring)]',
@@ -172,7 +172,7 @@ export function UserInfoSection({ isCollapsed, onOpenUpdateNotice }: UserInfoSec
<div className="mt-auto pt-1">
{/* 胶囊整体承载 hover(方案 D):玻璃底色加深一档;悬停右侧操作按钮时用
:has() 把胶囊底色还原,只让当前按钮高亮,避免双层叠色。
- 横向填满容器、向下填满、直角矩形(去掉圆角)。 */}
+ 横向填满容器、向下填满、无圆角(直角矩形)。 */}
<div
className={cn(
'flex h-12 items-center border border-[var(--sidebar-user-card-border)] bg-[var(--sidebar-user-card-bg)] pl-3 pr-1.5',
@@ -273,7 +273,7 @@ export function UserInfoSection({ isCollapsed, onOpenUpdateNotice }: UserInfoSec
}
className={cn(
'flame-btn',
- 'flex h-9 w-9 shrink-0 items-center justify-center',
+ 'flex h-9 w-9 shrink-0 items-center justify-center rounded-full',
'transition-colors hover:bg-sidebar-item-hover',
'transition-opacity duration-200 ease-in-out',
'opacity-100',