Skip to content

Commit

Permalink
Fix tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Jan 3, 2025
1 parent 171ee8c commit c4b8309
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/pages/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,10 +269,13 @@ export default function SettingsPage() {
type="button"
onClick={() => {
if (credentialSource !== "env") {
setShowPassword(!showPassword)
setShowPassword(!showPassword);
}
}}
className="absolute inset-y-0 right-0 pr-3 flex items-center text-muted-foreground hover:text-foreground transition-colors"
disabled={credentialSource === "env"}
className={`absolute inset-y-0 right-0 pr-3 flex items-center ${
credentialSource === "env" ? "cursor-not-allowed text-muted-foreground" : "text-muted-foreground hover:text-foreground"
}`}
>
{showPassword ? (
<EyeOff className="h-4 w-4" />
Expand All @@ -282,7 +285,9 @@ export default function SettingsPage() {
</button>
</TooltipTrigger>
<TooltipContent>
{showPassword
{credentialSource === "env"
? "Password visibility is locked by the environment"
: showPassword
? "Hide password"
: "Show password"}
</TooltipContent>
Expand Down

0 comments on commit c4b8309

Please sign in to comment.