File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ import { PropertiesTable } from '~/ui/lib/PropertiesTable'
26
26
import { ResourceLabel } from '~/ui/lib/SideModal'
27
27
import { Truncate } from '~/ui/lib/Truncate'
28
28
import { pb } from '~/util/path-builder'
29
+ import { capitalize } from '~/util/str'
29
30
import { bytesToGiB } from '~/util/units'
30
31
31
32
EditProjectImageSideModalForm . loader = async ( { params } : LoaderFunctionArgs ) => {
@@ -69,12 +70,14 @@ export function EditImageSideModalForm({
69
70
} ) {
70
71
const navigate = useNavigate ( )
71
72
const form = useForm ( { defaultValues : image } )
73
+ const resourceName = type === 'Project' ? 'project image' : 'silo image'
72
74
73
75
return (
74
76
< SideModalForm
77
+ title = { capitalize ( resourceName ) }
75
78
form = { form }
76
79
formType = "edit"
77
- resourceName = { type === 'Project' ? 'project image' : 'silo image' }
80
+ resourceName = { resourceName }
78
81
onDismiss = { ( ) => navigate ( dismissLink ) }
79
82
subtitle = {
80
83
< ResourceLabel >
@@ -100,7 +103,6 @@ export function EditImageSideModalForm({
100
103
< DateTime date = { image . timeModified } />
101
104
</ PropertiesTable . Row >
102
105
</ PropertiesTable >
103
-
104
106
< NameField name = "name" control = { form . control } disabled />
105
107
< DescriptionField name = "description" control = { form . control } required disabled />
106
108
< TextField name = "os" label = "OS" control = { form . control } required disabled />
You can’t perform that action at this time.
0 commit comments