mirror of
https://github.com/abhinavxd/libredesk.git
synced 2026-09-23 02:53:32 +00:00
make subject required, submit new conversation form on ctrl + enter
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
|
||||
<FormField v-slot="{ componentField }" name="subject" v-if="!isOutgoingTemplate">
|
||||
<FormItem>
|
||||
<FormLabel>{{ $t('form.field.subject') }}</FormLabel>
|
||||
<FormLabel>{{ $t('globals.terms.subject') }}</FormLabel>
|
||||
<FormControl>
|
||||
<Input type="text" placeholder="" v-bind="componentField" />
|
||||
</FormControl>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
<div class="grid grid-cols-2 gap-4">
|
||||
<FormField v-slot="{ componentField }" name="subject">
|
||||
<FormItem>
|
||||
<FormLabel>{{ $t('form.field.subject') }}</FormLabel>
|
||||
<FormLabel>{{ $t('globals.terms.subject') }}</FormLabel>
|
||||
<FormControl>
|
||||
<Input type="text" placeholder="" v-bind="componentField" />
|
||||
</FormControl>
|
||||
@@ -167,6 +167,7 @@
|
||||
:insertContent="insertContent"
|
||||
:autoFocus="false"
|
||||
class="w-full flex-1 overflow-y-auto p-2 box min-h-0"
|
||||
@send="createConversation"
|
||||
/>
|
||||
|
||||
<!-- Macro preview -->
|
||||
@@ -289,7 +290,12 @@ const isDisabled = computed(() => {
|
||||
})
|
||||
|
||||
const formSchema = z.object({
|
||||
subject: z.string().optional(),
|
||||
subject: z.string().min(
|
||||
1,
|
||||
t('globals.messages.cannotBeEmpty', {
|
||||
name: t('globals.terms.subject')
|
||||
})
|
||||
),
|
||||
content: z.string().min(
|
||||
1,
|
||||
t('globals.messages.cannotBeEmpty', {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="space-y-4">
|
||||
<div class="flex flex-col" v-if="conversation.subject">
|
||||
<p class="font-medium">{{ $t('form.field.subject') }}</p>
|
||||
<p class="font-medium">{{ $t('globals.terms.subject') }}</p>
|
||||
<Skeleton v-if="conversationStore.conversation.loading" class="w-32 h-4" />
|
||||
<p v-else>
|
||||
{{ conversation.subject }}
|
||||
|
||||
+1
-1
@@ -97,6 +97,7 @@
|
||||
"globals.terms.visibility": "Visibility | Visibilities",
|
||||
"globals.terms.privateNote": "Private note | Private notes",
|
||||
"globals.terms.automationRule": "Automation Rule | Automation Rules",
|
||||
"globals.terms.subject": "Subject | Subjects",
|
||||
"globals.messages.replying": "Replying",
|
||||
"globals.messages.golangDurationHoursMinutes": "Duration in hours or minutes. Example: 1h, 30m, 1h30m",
|
||||
"globals.messages.badRequest": "Bad request",
|
||||
@@ -263,7 +264,6 @@
|
||||
"form.field.clientID": "Client ID",
|
||||
"form.field.clientSecret": "Client Secret",
|
||||
"form.field.callbackURL": "Callback URL",
|
||||
"form.field.subject": "Subject",
|
||||
"form.field.referenceNumber": "Reference Number",
|
||||
"form.field.initiatedAt": "Initiated at",
|
||||
"form.field.firstReplyAt": "First Reply At",
|
||||
|
||||
Reference in New Issue
Block a user