Make url optional, move name to top on app detail modal
This commit is contained in:
parent
04c425c32c
commit
6186f3dd3d
@ -68,6 +68,7 @@ export const ModalAppDetails = () => {
|
|||||||
if (isEmptyString(url)) return
|
if (isEmptyString(url)) return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
||||||
const u = new URL(url)
|
const u = new URL(url)
|
||||||
|
|
||||||
if (isEmptyString(name)) setDetails((prev) => ({ ...prev, name: u.hostname }))
|
if (isEmptyString(name)) setDetails((prev) => ({ ...prev, name: u.hostname }))
|
||||||
@ -119,7 +120,7 @@ export const ModalAppDetails = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const isFormValid = !isEmptyString(url) && !isEmptyString(name)
|
const isFormValid = !isEmptyString(name)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal open={isModalOpened} onClose={handleCloseModal}>
|
<Modal open={isModalOpened} onClose={handleCloseModal}>
|
||||||
@ -130,6 +131,13 @@ export const ModalAppDetails = () => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
|
<Input
|
||||||
|
label="Name"
|
||||||
|
fullWidth
|
||||||
|
placeholder="Enter app name"
|
||||||
|
onChange={handleInputChange('name')}
|
||||||
|
value={details.name}
|
||||||
|
/>
|
||||||
<Autocomplete
|
<Autocomplete
|
||||||
options={[]}
|
options={[]}
|
||||||
freeSolo
|
freeSolo
|
||||||
@ -150,13 +158,6 @@ export const ModalAppDetails = () => {
|
|||||||
)
|
)
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Input
|
|
||||||
label="Name"
|
|
||||||
fullWidth
|
|
||||||
placeholder="Enter app name"
|
|
||||||
onChange={handleInputChange('name')}
|
|
||||||
value={details.name}
|
|
||||||
/>
|
|
||||||
<Input
|
<Input
|
||||||
label="Icon"
|
label="Icon"
|
||||||
fullWidth
|
fullWidth
|
||||||
|
Loading…
x
Reference in New Issue
Block a user