Fix: 去除账号信息弹窗四角不透明遮罩 (#144)
Project CI / Repository checks (push) Successful in 54s
Project CI / Frontend tests (push) Failing after 2m19s
Project CI / Backend tests (push) Successful in 3m51s
Project CI / Native shell tests (push) Successful in 15m8s

`before:`
![image.png](/attachments/fc0f1c7d-e722-46d4-8360-fd8069d6bb12)
`after:`
![image.png](/attachments/3c0f0f95-c27f-4053-9ce2-55a11a56b580)

---------

Co-authored-by: 段舒康 <kdletters@qq.com>
Co-authored-by: suzmii <suzmii@foxmail.com>
Reviewed-on: http://192.168.35.82/git/GenarrativeAI/Genarrative/pulls/144
Reviewed-by: 段舒康 <kdletters@qq.com>
Co-authored-by: 董羽秦 <suzmii@qq.com>
Co-committed-by: 董羽秦 <suzmii@qq.com>
This commit was merged in pull request #144.
This commit is contained in:
2026-08-07 20:46:08 +08:00
committed by 段舒康
parent 1bc8ccd077
commit d793b0e4c7
3 changed files with 19 additions and 4 deletions
@@ -166,7 +166,14 @@ test('direct account entry does not render the settings shell as another dialog'
renderAccountModal({ entryMode: 'account' });
const accountDialog = screen.getByRole('dialog', { name: '账号信息' });
const accountBody = accountDialog.firstElementChild as HTMLElement | null;
const accountWrapper = accountBody?.firstElementChild as HTMLElement | null;
expect(accountDialog).toBeTruthy();
expect(accountDialog.style.background).toBe('none');
expect(accountDialog.style.borderWidth).toBe('0px');
expect(accountDialog.className).toContain('!overflow-visible');
expect(accountBody?.className).toContain('!overflow-visible');
expect(accountWrapper?.className).toContain('overflow-visible');
expect(screen.queryByRole('dialog', { name: '设置与账号安全' })).toBeNull();
expect(screen.queryByText('设置与账号安全')).toBeNull();
expect(
+11 -3
View File
@@ -518,18 +518,26 @@ export function AccountModal({
authCardClassName={isDirectAccountMode ? '' : undefined}
panelClassName={
isDirectAccountMode
? 'relative !max-w-3xl !rounded-none !bg-transparent !shadow-none'
? 'relative !max-w-3xl !overflow-visible !rounded-none !bg-transparent !shadow-none'
: 'relative !h-[min(100%,calc(100vh-2rem))] !max-w-5xl !rounded-[28px] !p-5 sm:!p-6'
}
bodyClassName="!flex !min-h-0 !flex-1 !overflow-hidden !p-0"
bodyClassName={`!flex !min-h-0 !flex-1 !p-0 ${
isDirectAccountMode ? '!overflow-visible' : '!overflow-hidden'
}`}
panelStyle={{
maxHeight: ACCOUNT_MODAL_MAX_HEIGHT,
...(isDirectAccountMode
? {
background: 'none',
borderWidth: 0,
}
: {}),
}}
>
<div
className={
isDirectAccountMode
? 'relative flex max-h-full w-full max-w-3xl min-h-0 flex-col overflow-hidden'
? 'relative flex max-h-full w-full max-w-3xl min-h-0 flex-col overflow-visible'
: 'relative flex h-full w-full min-h-0 flex-col overflow-hidden'
}
style={{ maxHeight: ACCOUNT_MODAL_MAX_HEIGHT }}