-
-
Notifications
You must be signed in to change notification settings - Fork 592
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #128 from mariusihring/canary
Updated the database view to hide the password in the connection string
- Loading branch information
Showing
12 changed files
with
56 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -55,3 +55,4 @@ yarn-error.log* | |
|
||
*.lockb | ||
*.rdb | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { useState } from "react"; | ||
import { EyeIcon, EyeOffIcon } from "lucide-react"; | ||
import { Input, type InputProps } from "../ui/input"; | ||
import { Button } from "../ui/button"; | ||
|
||
export const ToggleVisibilityInput = ({ ...props }: InputProps) => { | ||
const [isPasswordVisible, setIsPasswordVisible] = useState(false); | ||
|
||
const togglePasswordVisibility = () => { | ||
setIsPasswordVisible((prevVisibility) => !prevVisibility); | ||
}; | ||
|
||
const inputType = isPasswordVisible ? "text" : "password"; | ||
return ( | ||
<div className="flex w-full items-center space-x-2"> | ||
<Input type={inputType} {...props} /> | ||
<Button onClick={togglePasswordVisibility} variant={"secondary"}> | ||
{inputType === "password" ? ( | ||
<EyeIcon className="size-4 text-muted-foreground" /> | ||
) : ( | ||
<EyeOffIcon className="size-4 text-muted-foreground" /> | ||
)} | ||
</Button> | ||
</div> | ||
); | ||
}; |