mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-14 09:25:47 +01:00
Merge pull request #1489 from ajnart/fix-board-customize-affix
🐛 No validation messages when saving, Dirty state not reset, Wrong page title validation
This commit is contained in:
@@ -130,6 +130,7 @@ export default function CustomizationPage({
|
|||||||
color: 'green',
|
color: 'green',
|
||||||
icon: <IconCheck />,
|
icon: <IconCheck />,
|
||||||
});
|
});
|
||||||
|
form.resetDirty();
|
||||||
},
|
},
|
||||||
onError() {
|
onError() {
|
||||||
updateNotification({
|
updateNotification({
|
||||||
@@ -193,12 +194,12 @@ export default function CustomizationPage({
|
|||||||
<Button
|
<Button
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
if (!form.isValid()) {
|
if (!form.isValid()) {
|
||||||
|
form.validate();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
handleSubmit(form.values);
|
handleSubmit(form.values);
|
||||||
}}
|
}}
|
||||||
disabled={!form.isValid()}
|
|
||||||
loading={isLoading}
|
loading={isLoading}
|
||||||
color="green"
|
color="green"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export const createBoardSchemaValidation = z.object({
|
|||||||
|
|
||||||
export const boardCustomizationSchema = z.object({
|
export const boardCustomizationSchema = z.object({
|
||||||
access: z.object({
|
access: z.object({
|
||||||
allowGuests: z.boolean()
|
allowGuests: z.boolean(),
|
||||||
}),
|
}),
|
||||||
layout: z.object({
|
layout: z.object({
|
||||||
leftSidebarEnabled: z.boolean(),
|
leftSidebarEnabled: z.boolean(),
|
||||||
@@ -20,7 +20,7 @@ export const boardCustomizationSchema = z.object({
|
|||||||
lg: z.number().min(5).max(20),
|
lg: z.number().min(5).max(20),
|
||||||
}),
|
}),
|
||||||
pageMetadata: z.object({
|
pageMetadata: z.object({
|
||||||
pageTitle: z.string().min(1),
|
pageTitle: z.string(),
|
||||||
metaTitle: z.string(),
|
metaTitle: z.string(),
|
||||||
logoSrc: z.string(),
|
logoSrc: z.string(),
|
||||||
faviconSrc: z.string(),
|
faviconSrc: z.string(),
|
||||||
|
|||||||
Reference in New Issue
Block a user