Skip to content

Commit c4b8309

Browse files
authored
Fix tooltip
1 parent 171ee8c commit c4b8309

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/pages/Settings.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,13 @@ export default function SettingsPage() {
269269
type="button"
270270
onClick={() => {
271271
if (credentialSource !== "env") {
272-
setShowPassword(!showPassword)
272+
setShowPassword(!showPassword);
273273
}
274274
}}
275-
className="absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground transition-colors"
275+
disabled={credentialSource === "env"}
276+
className={`absolute inset-y-0 right-0 pr-3 flex items-center ${
277+
credentialSource === "env" ? "cursor-not-allowed text-muted-foreground" : "text-muted-foreground hover:text-foreground"
278+
}`}
276279
>
277280
{showPassword ? (
278281
<EyeOff className="h-4 w-4" />
@@ -282,7 +285,9 @@ export default function SettingsPage() {
282285
</button>
283286
</TooltipTrigger>
284287
<TooltipContent>
285-
{showPassword
288+
{credentialSource === "env"
289+
? "Password visibility is locked by the environment"
290+
: showPassword
286291
? "Hide password"
287292
: "Show password"}
288293
</TooltipContent>

0 commit comments

Comments
 (0)