diff --git a/frontend/src/components/primitives/layers.ts b/frontend/src/components/primitives/layers.ts index 0924251..414ea84 100644 --- a/frontend/src/components/primitives/layers.ts +++ b/frontend/src/components/primitives/layers.ts @@ -37,7 +37,10 @@ export const triggerLayer = cva([ * 直接消费它们,就不需要旧 use-popup.ts 里手算 left/top/maxH 与二次纠正。 */ export const contentLayer = [ - 'fixed z-[400] flex flex-col overflow-hidden', + // 不能写 fixed:Radix 的定位在它外层 wrapper 上(translate 摆位置), + // 面板自己再 fixed 就脱离文档流,wrapper 量到的高度是 0, + // flip/size 全按 0 高算——贴近视口底边时「该翻不翻」或「翻了不减高度」,面板掉到屏幕外。 + 'z-[400] flex flex-col overflow-hidden', 'rounded-[10px] border border-line-strong bg-panel shadow-pop', // 宽度三段式:至少和触发器一样宽(面板不会缩成一条)、按最长选项自然展开 // (长标签不该被挤成两行)、超过 440 或视口放不下才换行 diff --git a/frontend/src/pages/Account.tsx b/frontend/src/pages/Account.tsx index d7ed514..7c57745 100644 --- a/frontend/src/pages/Account.tsx +++ b/frontend/src/pages/Account.tsx @@ -12,7 +12,7 @@ import { describeUserAgent, fmtAgo, fmtTime } from '../lib/format' import { useAutoRefresh } from '../hooks/use-auto-refresh' import { SecretInput } from '../components/forms' import { - Actions, Button, CardRow, Empty, ErrorText, Field, FormRow, Layout, Notice, PageHead, Panel, PanelHead, Stack, Tag + Actions, Button, CardRow, Empty, ErrorText, Field, FormGrid, FormRow, Layout, Notice, PageHead, Panel, PanelHead, Stack, Tag } from '../components/ui' import { login, roleLabel, setUser, useAuthStore } from '../stores/auth' @@ -107,53 +107,55 @@ export default function Account() { - - - - - - setProfile((p) => ({ ...p, display_name: e.target.value }))} /> - - - setProfile((p) => ({ ...p, email: e.target.value }))} /> - - - - - - - + + + + + + + setProfile((p) => ({ ...p, display_name: e.target.value }))} /> + + + setProfile((p) => ({ ...p, email: e.target.value }))} /> + + + + + + + - - - - - setPwd((p) => ({ ...p, current_password: v }))} /> - - - setPwd((p) => ({ ...p, new_password: v }))} /> - - - setPwd((p) => ({ ...p, confirm: v }))} - onKeyUp={(e) => { if (e.key === 'Enter') void changePassword() }} /> - - - - - - - + + + + + setPwd((p) => ({ ...p, current_password: v }))} /> + + + setPwd((p) => ({ ...p, new_password: v }))} /> + + + setPwd((p) => ({ ...p, confirm: v }))} + onKeyUp={(e) => { if (e.key === 'Enter') void changePassword() }} /> + + + + + + + +