From d981cd4d8b1a3d36e9bae8992cf914180ef4fd2a Mon Sep 17 00:00:00 2001 From: xue jiahao Date: Wed, 18 Mar 2026 10:53:13 +0800 Subject: [PATCH] Fix dropzone UI --- src/renderer/src/components/AppDetail/DropZone.tsx | 2 +- .../src/components/AppDetail/FileSection.tsx | 12 +++++------- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/renderer/src/components/AppDetail/DropZone.tsx b/src/renderer/src/components/AppDetail/DropZone.tsx index f69711c..c2491b0 100644 --- a/src/renderer/src/components/AppDetail/DropZone.tsx +++ b/src/renderer/src/components/AppDetail/DropZone.tsx @@ -22,7 +22,7 @@ const useStyles = createStyles(({ token, css }) => ({ align-items: center; justify-content: center; gap: ${token.paddingXS}px; - padding: ${token.paddingSM}px; + padding: ${token.paddingMD}px; border: 2px dashed ${token.colorBorderSecondary}; border-radius: ${token.borderRadiusSM}px; color: ${token.colorTextQuaternary}; diff --git a/src/renderer/src/components/AppDetail/FileSection.tsx b/src/renderer/src/components/AppDetail/FileSection.tsx index b928e01..f22bfb2 100644 --- a/src/renderer/src/components/AppDetail/FileSection.tsx +++ b/src/renderer/src/components/AppDetail/FileSection.tsx @@ -75,9 +75,11 @@ const useStyles = createStyles(({ token, css }) => ({ `, dropZoneWrapper: css` padding: ${token.paddingXS}px ${token.paddingSM}px; - border-top: 1px solid ${token.colorBorderSecondary}; background: ${token.colorBgContainer}; `, + dropZoneWrapperWithBorder: css` + border-top: 1px solid ${token.colorBorderSecondary}; + `, dropOverlay: css` position: absolute; inset: 0; @@ -362,14 +364,10 @@ const FileSection: React.FC = ({ )} {/* File list */} - {files.length === 0 ? ( -
{t("noConfig")}
- ) : ( - - )} + {files.length > 0 && } {/* Click-to-add strip */} -
+
0 && styles.dropZoneWrapperWithBorder)}>