From e2f0037053db931a4c4dd451eda0f3c75e80a1de Mon Sep 17 00:00:00 2001 From: shiyu Date: Thu, 18 Dec 2025 14:08:59 +0800 Subject: [PATCH] fix(Header): adjust path editor height and improve styling --- .../FileExplorerPage/components/Header.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/web/src/pages/FileExplorerPage/components/Header.tsx b/web/src/pages/FileExplorerPage/components/Header.tsx index 89a2fe9..9e7e06c 100644 --- a/web/src/pages/FileExplorerPage/components/Header.tsx +++ b/web/src/pages/FileExplorerPage/components/Header.tsx @@ -41,6 +41,7 @@ export const Header: React.FC = ({ const { t } = useI18n(); const [editingPath, setEditingPath] = useState(false); const [pathInputValue, setPathInputValue] = useState(''); + const pathEditorHeight = token.fontSizeSM * token.lineHeight + token.paddingXXS * 2; const handlePathEdit = () => { setEditingPath(true); @@ -71,7 +72,7 @@ export const Header: React.FC = ({ onBlur={handlePathCancel} onKeyDown={(e) => e.key === 'Escape' && handlePathCancel()} autoFocus - style={{ flex: 1 }} + style={{ flex: 1, height: pathEditorHeight, boxSizing: 'border-box' }} /> ); } @@ -89,12 +90,23 @@ export const Header: React.FC = ({ return (
{ e.currentTarget.style.backgroundColor = token.colorFillTertiary; }} onMouseLeave={(e) => { e.currentTarget.style.backgroundColor = 'transparent'; }} onClick={handlePathEdit} > - +
); };