File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
routes/_app.orgs.$organizationSlug.projects.v3.$projectParam.environment-variables.new Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ const DialogContent = React.forwardRef<
43
43
< DialogPrimitive . Content
44
44
ref = { ref }
45
45
className = { cn (
46
- "fixed z-50 grid w-full gap-4 rounded-b-lg border bg-background-dimmed px-4 pb-6 pt-3.5 shadow-lg animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-lg sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0" ,
46
+ "fixed z-50 grid w-full gap-4 rounded-b-lg border bg-background-dimmed px-4 pb-4 pt-3.5 shadow-lg animate-in data-[state=open]:fade-in-90 data-[state=open]:slide-in-from-bottom-10 sm:max-w-lg sm:rounded-lg sm:zoom-in-90 data-[state=open]:sm:slide-in-from-bottom-0" ,
47
47
className
48
48
) }
49
49
{ ...props }
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import { FormError } from "~/components/primitives/FormError";
16
16
import { Input } from "~/components/primitives/Input" ;
17
17
import { InputGroup } from "~/components/primitives/InputGroup" ;
18
18
import { Label } from "~/components/primitives/Label" ;
19
+ import { Switch } from "~/components/primitives/Switch" ;
19
20
import { prisma } from "~/db.server" ;
20
21
import { useOrganization } from "~/hooks/useOrganizations" ;
21
22
import { useProject } from "~/hooks/useProject" ;
@@ -134,6 +135,8 @@ export default function Page() {
134
135
shouldRevalidate : "onSubmit" ,
135
136
} ) ;
136
137
138
+ const [ revealAll , setRevealAll ] = useState ( false ) ;
139
+
137
140
useEffect ( ( ) => {
138
141
setIsOpen ( true ) ;
139
142
} , [ ] ) ;
@@ -169,7 +172,15 @@ export default function Page() {
169
172
/>
170
173
</ InputGroup >
171
174
< InputGroup fullWidth >
172
- < Label > Values</ Label >
175
+ < div className = "flex items-center justify-between" >
176
+ < Label > Values</ Label >
177
+ < Switch
178
+ variant = "small"
179
+ label = "Reveal values"
180
+ checked = { revealAll }
181
+ onCheckedChange = { ( e ) => setRevealAll ( e . valueOf ( ) ) }
182
+ />
183
+ </ div >
173
184
< div className = "grid grid-cols-[auto_1fr] gap-x-2 gap-y-2" >
174
185
{ environments . map ( ( environment , index ) => {
175
186
return (
@@ -186,7 +197,7 @@ export default function Page() {
186
197
< EnvironmentLabel environment = { environment } className = "h-5 px-2" />
187
198
</ label >
188
199
< Input
189
- type = " password"
200
+ type = { revealAll ? "text" : " password"}
190
201
name = { `values[${ index } ].value` }
191
202
placeholder = "Not set"
192
203
/>
You can’t perform that action at this time.
0 commit comments