Skip to content

Commit 7abc339

Browse files
committed
fix theme UI
1 parent 941ec4e commit 7abc339

File tree

3 files changed

+13
-6
lines changed

3 files changed

+13
-6
lines changed

dify-helm-watchdog/src/components/modals/values-wizard-modal.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import {
1111
X,
1212
} from "lucide-react";
1313
import { motion } from "framer-motion";
14+
import { useTheme } from "next-themes";
1415
import YAML from "yaml";
1516
import { CodeBlock } from "@/components/ui/code-block";
1617

@@ -124,6 +125,7 @@ export default function ValuesWizardModal({
124125
selectedVersion,
125126
imageTagMap,
126127
}: ValuesWizardModalProps) {
128+
const { resolvedTheme } = useTheme();
127129
const [wizardStep, setWizardStep] = useState<WizardStepId>(1);
128130
const [uploadedFileName, setUploadedFileName] = useState<string | null>(null);
129131
const [uploadedValuesText, setUploadedValuesText] = useState<string>("");
@@ -489,11 +491,10 @@ export default function ValuesWizardModal({
489491
</div>
490492
<div className="flex justify-between text-[10px] uppercase tracking-[0.35em] text-muted-foreground">
491493
{WIZARD_STEPS.map((step) => {
492-
const isLit = wizardStep >= step.id;
493494
return (
494495
<span
495496
key={step.id}
496-
className={`flex-1 text-center ${isLit ? "text-success-foreground" : ""}`}
497+
className="flex-1 text-center"
497498
>
498499
{step.label}
499500
</span>
@@ -533,7 +534,9 @@ export default function ValuesWizardModal({
533534
disabled={wizardProcessing}
534535
whileHover={!wizardProcessing ? { scale: 1.02 } : {}}
535536
whileTap={!wizardProcessing ? { scale: 0.98 } : {}}
536-
className="inline-flex items-center gap-2 rounded-full border border-success/60 bg-success/20 px-4 py-2 text-xs font-semibold uppercase tracking-[0.3em] text-success-foreground transition hover:border-success/80 hover:bg-success/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-success disabled:cursor-not-allowed disabled:opacity-60"
537+
className={`inline-flex items-center gap-2 rounded-full border border-success/60 bg-success/20 px-4 py-2 text-xs font-semibold uppercase tracking-[0.3em] transition hover:border-success/80 hover:bg-success/30 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-success disabled:cursor-not-allowed disabled:opacity-60 ${
538+
resolvedTheme === "dark" ? "text-white" : "text-foreground"
539+
}`}
537540
>
538541
{wizardStep === 3 ? "Finish" : "Next"}
539542
</motion.button>

dify-helm-watchdog/src/components/theme-toggle.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ export function ThemeToggle() {
5555
stiffness: 260,
5656
damping: 20,
5757
}}
58-
className="inline-flex h-10 w-10 items-center justify-center rounded-full border border-border bg-card text-muted-foreground shadow-sm transition-colors hover:border-primary hover:bg-primary/10 hover:text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary"
58+
className={`inline-flex h-10 w-10 items-center justify-center rounded-full border border-border bg-card text-muted-foreground shadow-sm transition-colors hover:border-primary hover:bg-primary/10 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary ${
59+
isDark ? "hover:text-white" : "hover:text-primary"
60+
}`}
5961
aria-label={`Switch to ${isDark ? "light" : "dark"} mode`}
6062
title={`Switch to ${isDark ? "light" : "dark"} mode`}
6163
>

dify-helm-watchdog/src/components/version-explorer.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,9 @@ export function VersionExplorer({ data }: VersionExplorerProps) {
589589
href="https://langgenius.github.io/dify-helm/#/"
590590
target="_blank"
591591
rel="noopener noreferrer"
592-
className="inline-flex items-center gap-1.5 rounded-full border border-primary bg-primary/10 px-3 py-0.5 text-[10px] font-semibold uppercase tracking-[0.3em] text-primary transition hover:bg-primary/20 active:bg-primary active:text-primary-foreground"
592+
className={`inline-flex items-center gap-1.5 rounded-full border border-primary bg-primary/10 px-3 py-0.5 text-[10px] font-semibold uppercase tracking-[0.3em] transition hover:bg-primary/20 active:bg-primary active:text-primary-foreground ${
593+
resolvedTheme === "dark" ? "text-white" : "text-primary"
594+
}`}
593595
>
594596
<ArrowUpRight className="h-2.5 w-2.5" />
595597
Dify Helm
@@ -605,7 +607,7 @@ export function VersionExplorer({ data }: VersionExplorerProps) {
605607
</div>
606608
<div className="flex shrink-0 items-center gap-2">
607609
<div className="flex items-center gap-2 rounded-xl border border-border bg-card px-3 py-2 text-xs text-muted-foreground">
608-
<CalendarClock className="h-4 w-4 text-primary" />
610+
<CalendarClock className={`h-4 w-4 ${resolvedTheme === "dark" ? "text-white" : "text-primary"}`} />
609611
<div className="flex flex-col leading-tight">
610612
<span className="text-[10px] uppercase tracking-widest text-muted-foreground">
611613
Last sync

0 commit comments

Comments
 (0)