mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-03 05:23:48 +00:00
fix[UI]: General setting form tag input not propogating updates to form.
- chore: set allowed file upload size to 500 mb in zod schema.
This commit is contained in:
@@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<form
|
<form @submit="onSubmit" class="space-y-6 w-full">
|
||||||
@submit="onSubmit"
|
|
||||||
class="space-y-6 w-full"
|
|
||||||
>
|
|
||||||
<FormField v-slot="{ field }" name="site_name">
|
<FormField v-slot="{ field }" name="site_name">
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Site Name</FormLabel>
|
<FormLabel>Site Name</FormLabel>
|
||||||
@@ -126,11 +123,15 @@
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
</FormField>
|
</FormField>
|
||||||
|
|
||||||
<FormField name="allowed_file_upload_extensions" v-slot="{ componentField }">
|
|
||||||
|
<FormField name="allowed_file_upload_extensions" v-slot="{ componentField, handleChange }">
|
||||||
<FormItem>
|
<FormItem>
|
||||||
<FormLabel>Allowed file upload extensions</FormLabel>
|
<FormLabel>Allowed file upload extensions</FormLabel>
|
||||||
<FormControl>
|
<FormControl>
|
||||||
<TagsInput v-model="componentField.modelValue">
|
<TagsInput
|
||||||
|
:modelValue="componentField.modelValue"
|
||||||
|
@update:modelValue="handleChange"
|
||||||
|
>
|
||||||
<TagsInputItem v-for="item in componentField.modelValue" :key="item" :value="item">
|
<TagsInputItem v-for="item in componentField.modelValue" :key="item" :value="item">
|
||||||
<TagsInputItemText />
|
<TagsInputItemText />
|
||||||
<TagsInputItemDelete />
|
<TagsInputItemDelete />
|
||||||
@@ -142,6 +143,8 @@
|
|||||||
<FormMessage />
|
<FormMessage />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
</FormField>
|
</FormField>
|
||||||
|
|
||||||
|
|
||||||
<Button type="submit" :isLoading="formLoading"> {{ submitLabel }} </Button>
|
<Button type="submit" :isLoading="formLoading"> {{ submitLabel }} </Button>
|
||||||
</form>
|
</form>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -35,8 +35,8 @@ export const formSchema = z.object({
|
|||||||
.min(1, {
|
.min(1, {
|
||||||
message: 'Max upload file size must be at least 1 MB.'
|
message: 'Max upload file size must be at least 1 MB.'
|
||||||
})
|
})
|
||||||
.max(30, {
|
.max(500, {
|
||||||
message: 'Max upload file size cannot exceed 30 MB.'
|
message: 'Max upload file size cannot exceed 500 MB.'
|
||||||
}),
|
}),
|
||||||
allowed_file_upload_extensions: z.array(z.string()).nullable().default([]).optional()
|
allowed_file_upload_extensions: z.array(z.string()).nullable().default([]).optional()
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user