From b1405376a0d5391c78b1c0371165ffee7d72147d Mon Sep 17 00:00:00 2001 From: Montia37 Date: Mon, 8 Sep 2025 18:18:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BC=98=E5=8C=96=E4=BA=AE=E6=9A=97?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E6=96=87=E6=9C=AC=E5=8F=AF=E8=AF=BB?= =?UTF-8?q?=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/ui/chart.tsx | 5 +---- src/components/ui/tips.tsx | 8 +++++--- src/index.css | 8 ++++++-- src/pages/instance/LoadCharts.tsx | 12 ++++++++---- src/pages/instance/PingChart.tsx | 6 +++++- 5 files changed, 25 insertions(+), 14 deletions(-) diff --git a/src/components/ui/chart.tsx b/src/components/ui/chart.tsx index 9c11532..093a803 100644 --- a/src/components/ui/chart.tsx +++ b/src/components/ui/chart.tsx @@ -54,10 +54,7 @@ function ChartContainer({
diff --git a/src/components/ui/tips.tsx b/src/components/ui/tips.tsx index 7415dda..b3949a7 100644 --- a/src/components/ui/tips.tsx +++ b/src/components/ui/tips.tsx @@ -14,7 +14,7 @@ interface TipsProps { const Tips: React.FC> = ({ size = "16", - color = "gray", + color = "var(--theme-text-muted-color)", trigger, children, side = "bottom", @@ -68,13 +68,15 @@ const Tips: React.FC> = ({ sideOffset={5} onMouseEnter={!isMobile ? () => setIsOpen(true) : undefined} onMouseLeave={!isMobile ? () => setIsOpen(false) : undefined} - className="purcarte-blur theme-card-style z-50 text-muted-foreground" + className="purcarte-blur theme-card-style z-50" style={{ minWidth: isMobile ? "12rem" : "16rem", maxWidth: isMobile ? "80vw" : "16rem", backgroundColor: "var(--card)", }}> -
{children}
+
+ {children} +
)} diff --git a/src/index.css b/src/index.css index 2643b0f..706caa3 100644 --- a/src/index.css +++ b/src/index.css @@ -130,8 +130,12 @@ } @layer utilities { + .dark .radix-themes { + --theme-text-muted-color: rgb(from var(--accent-4) r g b / 0.8); + } + .radix-themes { - --theme-text-muted-color: rgb(from var(--accent-4) r g b / 0.7); + --theme-text-muted-color: rgb(from var(--accent-12) r g b / 0.8); } .theme-text-shadow { @@ -143,7 +147,7 @@ } .theme-text-muted { - @apply text-(--theme-text-muted-color) text-shadow-sm text-shadow-(color:--accent-foreground)/20; + @apply text-(--theme-text-muted-color); } } diff --git a/src/pages/instance/LoadCharts.tsx b/src/pages/instance/LoadCharts.tsx index 04bab4c..732517a 100644 --- a/src/pages/instance/LoadCharts.tsx +++ b/src/pages/instance/LoadCharts.tsx @@ -260,15 +260,19 @@ const LoadCharts = memo(({ node, hours, liveData }: LoadChartsProps) => { data={config.data} margin={chartMargin} {...chartProps}> - + { type="number" tick={{ dx: -8, - fill: "var(--theme-text-muted-color) !important", + fill: "var(--theme-text-muted-color)", }} width={200} mirror={true} diff --git a/src/pages/instance/PingChart.tsx b/src/pages/instance/PingChart.tsx index cc7a7f6..57782ce 100644 --- a/src/pages/instance/PingChart.tsx +++ b/src/pages/instance/PingChart.tsx @@ -335,7 +335,11 @@ const PingChart = memo(({ node, hours }: PingChartProps) => { {pingHistory?.tasks && pingHistory.tasks.length > 0 ? ( - +