mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
Merge pull request #453 from mpcref/patch-1
Generate valid appName on changing name
This commit is contained in:
@@ -145,7 +145,10 @@ export const AddApplication = ({ projectId, projectName }: Props) => {
|
|||||||
{...field}
|
{...field}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const val = e.target.value?.trim() || "";
|
const val = e.target.value?.trim() || "";
|
||||||
form.setValue("appName", `${slug}-${val}`);
|
form.setValue(
|
||||||
|
"appName",
|
||||||
|
`${slug}-${val.toLowerCase().replaceAll(" ", "-")}`,
|
||||||
|
);
|
||||||
field.onChange(val);
|
field.onChange(val);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -149,7 +149,10 @@ export const AddCompose = ({ projectId, projectName }: Props) => {
|
|||||||
{...field}
|
{...field}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const val = e.target.value?.trim() || "";
|
const val = e.target.value?.trim() || "";
|
||||||
form.setValue("appName", `${slug}-${val}`);
|
form.setValue(
|
||||||
|
"appName",
|
||||||
|
`${slug}-${val.toLowerCase()}`,
|
||||||
|
);
|
||||||
field.onChange(val);
|
field.onChange(val);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -361,7 +361,10 @@ export const AddDatabase = ({ projectId, projectName }: Props) => {
|
|||||||
{...field}
|
{...field}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
const val = e.target.value?.trim() || "";
|
const val = e.target.value?.trim() || "";
|
||||||
form.setValue("appName", `${slug}-${val}`);
|
form.setValue(
|
||||||
|
"appName",
|
||||||
|
`${slug}-${val.toLowerCase()}`,
|
||||||
|
);
|
||||||
field.onChange(val);
|
field.onChange(val);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|||||||
Reference in New Issue
Block a user