From 42f2d7be5091abc7a7d1fa5fd784c6fd4e1bff13 Mon Sep 17 00:00:00 2001 From: Tunglies <77394545+Tunglies@users.noreply.github.com> Date: Sun, 15 Nov 2026 00:54:56 +0800 Subject: [PATCH] fix(connections): align detail actions in narrow layouts --- Changelog.md | 1 + .../connection/connection-detail.tsx | 24 ++++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/Changelog.md b/Changelog.md index 9d30c4ec4..8e18c9cbb 100644 --- a/Changelog.md +++ b/Changelog.md @@ -32,6 +32,7 @@ - 修复窗口较窄时,首页「当前节点」卡片中过长的节点名把延迟标签挤出卡片 - 修复断开链式代理时清空已选节点,导致再次连接需要重新选择的问题 - 修复「连接」页表格排序时表头换行、标题位置跳动的问题 +- 修复连接详情较窄时操作按钮偏离右侧 **🍎 macOS** diff --git a/src/components/connection/connection-detail.tsx b/src/components/connection/connection-detail.tsx index 77cda53d7..4a20aa149 100644 --- a/src/components/connection/connection-detail.tsx +++ b/src/components/connection/connection-detail.tsx @@ -41,12 +41,15 @@ export function ConnectionDetail({ ref }: { ref?: Ref }) { onClose={onClose} sx={{ '.MuiSnackbarContent-root': { - maxWidth: '520px', + width: '520px', + maxWidth: 'calc(100vw - 32px)', + boxSizing: 'border-box', maxHeight: '480px', overflowY: 'auto', backgroundColor: theme.palette.background.paper, color: theme.palette.text.primary, }, + '.MuiSnackbarContent-message': { width: '100%', minWidth: 0 }, }} message={ detail ? ( @@ -132,7 +135,14 @@ const InnerConnectionDetail = ({ data, closed, onClose }: InnerProps) => { const onDelete = useLockFn(async () => closeConnection(data.id)) return ( - + {information.map((each) => (
{each.label} @@ -148,7 +158,15 @@ const InnerConnectionDetail = ({ data, closed, onClose }: InnerProps) => { ))} {!closed && ( - +