mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-02 13:03:35 +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,22 +123,28 @@
|
|||||||
</FormItem>
|
</FormItem>
|
||||||
</FormField>
|
</FormField>
|
||||||
|
|
||||||
<FormField name="allowed_file_upload_extensions" v-slot="{ componentField }">
|
|
||||||
<FormItem>
|
<FormField name="allowed_file_upload_extensions" v-slot="{ componentField, handleChange }">
|
||||||
<FormLabel>Allowed file upload extensions</FormLabel>
|
<FormItem>
|
||||||
<FormControl>
|
<FormLabel>Allowed file upload extensions</FormLabel>
|
||||||
<TagsInput v-model="componentField.modelValue">
|
<FormControl>
|
||||||
<TagsInputItem v-for="item in componentField.modelValue" :key="item" :value="item">
|
<TagsInput
|
||||||
<TagsInputItemText />
|
:modelValue="componentField.modelValue"
|
||||||
<TagsInputItemDelete />
|
@update:modelValue="handleChange"
|
||||||
</TagsInputItem>
|
>
|
||||||
<TagsInputInput placeholder="jpg" />
|
<TagsInputItem v-for="item in componentField.modelValue" :key="item" :value="item">
|
||||||
</TagsInput>
|
<TagsInputItemText />
|
||||||
</FormControl>
|
<TagsInputItemDelete />
|
||||||
<FormDescription>Use `*` to allow any file.</FormDescription>
|
</TagsInputItem>
|
||||||
<FormMessage />
|
<TagsInputInput placeholder="jpg" />
|
||||||
</FormItem>
|
</TagsInput>
|
||||||
</FormField>
|
</FormControl>
|
||||||
|
<FormDescription>Use `*` to allow any file.</FormDescription>
|
||||||
|
<FormMessage />
|
||||||
|
</FormItem>
|
||||||
|
</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