Fix password field
This commit is contained in:
parent
8f9ec73caf
commit
298482f70e
@ -28,11 +28,24 @@ export type BooleanField = {
|
||||
type: FieldType.Checkbox
|
||||
name: string
|
||||
value?: "✓" | string
|
||||
designation?: undefined
|
||||
}
|
||||
|
||||
export type ItemField =
|
||||
| TextField
|
||||
| BooleanField
|
||||
| {
|
||||
name: string
|
||||
designation: "username"
|
||||
value: string
|
||||
type?: undefined
|
||||
}
|
||||
| {
|
||||
name: string
|
||||
designation: "password"
|
||||
value: string
|
||||
type?: undefined
|
||||
}
|
||||
| {
|
||||
// @TODO: This currently catches all item fields.
|
||||
type: FieldType
|
||||
|
@ -119,10 +119,7 @@ export const ItemFieldValue: React.FC<{
|
||||
export const ItemDetailsFieldValue: React.FC<{
|
||||
field: ItemField
|
||||
}> = ({ field }) => {
|
||||
if (
|
||||
field.type === FieldType.Password ||
|
||||
(field.type === FieldType.Text && field.designation === "password")
|
||||
) {
|
||||
if (field.type === FieldType.Password || field.designation === "password") {
|
||||
return <Password field={{ v: field.value } as any} />
|
||||
}
|
||||
|
||||
|
@ -25,6 +25,7 @@ const ItemView = styled.li`
|
||||
align-items: center;
|
||||
cursor: default;
|
||||
grid-template-columns: 35px 1fr;
|
||||
user-select: none;
|
||||
&:hover {
|
||||
background-color: var(--hover-background);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user