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