From 2838a7f923c6455a7bacd7b78f96606f887d2a32 Mon Sep 17 00:00:00 2001 From: LIlGG <1103069291@qq.com> Date: Mon, 29 Sep 2025 12:50:15 +0800 Subject: [PATCH] fix: resolve style issues in dark mode --- .../chat/usage/DeploymentRecordsDialog.tsx | 6 +- .../header/connections/NetlifyConnection.tsx | 3 +- .../header/connections/_1PanelConnection.tsx | 1 + app/components/webbuilder/DiffView.tsx | 2 +- app/components/webbuilder/PageTree.tsx | 4 +- .../__snapshots__/message-parser.spec.ts.snap | 93 +++++++++++++------ app/lib/runtime/message-parser.spec.ts | 8 +- 7 files changed, 76 insertions(+), 41 deletions(-) diff --git a/app/components/chat/usage/DeploymentRecordsDialog.tsx b/app/components/chat/usage/DeploymentRecordsDialog.tsx index 7bc812a..c07b9a4 100644 --- a/app/components/chat/usage/DeploymentRecordsDialog.tsx +++ b/app/components/chat/usage/DeploymentRecordsDialog.tsx @@ -350,7 +350,7 @@ export const DeploymentRecordsDialog = memo(({ isOpen, onClose }: DeploymentReco - + {Object.values(DeploymentPlatformEnum).map((platform, index) => { const count = stats.sitesByPlatform?.[platform] || 0; const isLoading = isPlatformLoading(platform); @@ -364,8 +364,8 @@ export const DeploymentRecordsDialog = memo(({ isOpen, onClose }: DeploymentReco className={classNames( 'flex-1 relative py-2 px-3 transition-all duration-200', isActive - ? 'bg-white dark:bg-gray-800 shadow-sm rounded-md text-upage-elements-textPrimary font-medium' - : 'hover:bg-gray-100/70 dark:hover:bg-gray-800/30 text-upage-elements-textSecondary', + ? 'bg-white dark:bg-gray-800 shadow-sm rounded-md text-upage-elements-textPrimary dark:text-upage-elements-textPrimary font-medium' + : 'bg-transparent dark:bg-transparent hover:bg-gray-100/70 dark:hover:bg-gray-800/30 text-upage-elements-textSecondary dark:text-upage-elements-textSecondary', )} >
diff --git a/app/components/header/connections/NetlifyConnection.tsx b/app/components/header/connections/NetlifyConnection.tsx index 3491c94..96001b0 100644 --- a/app/components/header/connections/NetlifyConnection.tsx +++ b/app/components/header/connections/NetlifyConnection.tsx @@ -618,6 +618,7 @@ export default function NetlifyConnection() { 'bg-upage-elements-button-secondary-background', 'hover:bg-upage-elements-button-secondary-backgroundHover', 'disabled:opacity-50 disabled:cursor-not-allowed', + 'text-upage-elements-textPrimary', )} > {isConnecting ? ( @@ -627,7 +628,7 @@ export default function NetlifyConnection() { ) : ( <> -
+
连接 )} diff --git a/app/components/header/connections/_1PanelConnection.tsx b/app/components/header/connections/_1PanelConnection.tsx index f7c28bf..1de9204 100644 --- a/app/components/header/connections/_1PanelConnection.tsx +++ b/app/components/header/connections/_1PanelConnection.tsx @@ -510,6 +510,7 @@ export default function _1PanelConnection({ 'bg-upage-elements-button-secondary-background', 'hover:bg-upage-elements-button-secondary-backgroundHover', 'disabled:opacity-50 disabled:cursor-not-allowed', + 'text-upage-elements-textPrimary', )} > {isConnecting ? ( diff --git a/app/components/webbuilder/DiffView.tsx b/app/components/webbuilder/DiffView.tsx index 7e317c2..e580006 100644 --- a/app/components/webbuilder/DiffView.tsx +++ b/app/components/webbuilder/DiffView.tsx @@ -125,7 +125,7 @@ interface FullscreenButtonProps { const FullscreenButton = memo(({ onClick, isFullscreen }: FullscreenButtonProps) => (