mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-20 21:15:01 +00:00
* feat: Remove foundation * chore: Minor fix * Minor fix * Update _forms.scss * chore: More changes * chore: Minor fix * chore: Clean up * fix: font-weight * chore: More changes * chore: Setting page * chore: Editor fix * chore: Reports page * chore: More changes * chore: Minor changes * chore: More fixes * chore: More changes * chore: More changes * chore: More changes * chore: Minor fix * chore: More changes * chore: More changes * chore: More changes * chore: More changes * chore: Clean up * chore: Minor fix * chore: Clean ups * chore: Rename basic file * chore: Remove unused files * chore: Fix expanded input * Fix campaign rendering * chore: Clean up * chore: More changes * chore: Remove unused files * fix: Overflow issue * chore: Minor fix * chore: Clean up * chore: Minor fix * chore: Remove unused files * chore: Minor fix * chore: Minor fix * fix: autoprefixer start/end value has mixed support * chore: Minor fix * chore: Remove unused files * chore: Minor fix * chore: Minor fix * chore: Minor fix * Add responsive design to label settings * fix inbox view * chore: Minor fix * w-60% to w-2/3 * chore: Fix team * chore: Fix button * w-[34%] to w-1/3 * chore: Fix border * Add support mobile views in team page * chore: fix snackbar * chore: clean up * chore: Clean up * fix: loading state alignment * fix: alert styles * chore: Minor fix * fix: spacing for agent bot row * fix: layout * fix: layout for SLA * fix: checkbox * fix: SLA checkbox spacing * Update inbox settings pages * fix macros listing page layout * fix canned responses * chore: Fix bot page * chore: fix automation page * chore: fix agents page * chore: fix canned response editor * chore: Fix settings table * chore: fix settings layout * chore: Minor fix * fix: canned response table layou * fix: layout for table header for webhooks * fix: webhook row layout * fix: dashboard app modal layout * fix: add title to canned response truncated shortcode * fix: dashboard apps row layuot * fix: layouts hooks * fix: body color * fix: delete action color in portal locales * fix: text color for campagin title * fix: success button color --------- Co-authored-by: Pranav <pranav@chatwoot.com> Co-authored-by: Vishnu Narayanan <iamwishnu@gmail.com> Co-authored-by: Shivam Mishra <scm.mymail@gmail.com>
170 lines
4.8 KiB
Vue
170 lines
4.8 KiB
Vue
<template>
|
|
<div>
|
|
<div v-if="toEmails">
|
|
<div class="input-group small" :class="{ error: $v.toEmailsVal.$error }">
|
|
<label class="input-group-label">
|
|
{{ $t('CONVERSATION.REPLYBOX.EMAIL_HEAD.TO') }}
|
|
</label>
|
|
<div class="rounded-none flex-1 min-w-0 m-0 whitespace-nowrap">
|
|
<woot-input
|
|
v-model.trim="$v.toEmailsVal.$model"
|
|
type="text"
|
|
class="[&>input]:mb-0 [&>input]:border-transparent [&>input]:h-8 [&>input]:text-sm [&>input]:!border-0 [&>input]:border-none"
|
|
:class="{ error: $v.toEmailsVal.$error }"
|
|
:placeholder="$t('CONVERSATION.REPLYBOX.EMAIL_HEAD.CC.PLACEHOLDER')"
|
|
@blur="onBlur"
|
|
/>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="input-group-wrap">
|
|
<div class="input-group small" :class="{ error: $v.ccEmailsVal.$error }">
|
|
<label class="input-group-label">
|
|
{{ $t('CONVERSATION.REPLYBOX.EMAIL_HEAD.CC.LABEL') }}
|
|
</label>
|
|
<div class="rounded-none flex-1 min-w-0 m-0 whitespace-nowrap">
|
|
<woot-input
|
|
v-model.trim="$v.ccEmailsVal.$model"
|
|
class="[&>input]:mb-0 [&>input]:border-transparent [&>input]:h-8 [&>input]:text-sm [&>input]:!border-0 [&>input]:border-none"
|
|
type="text"
|
|
:class="{ error: $v.ccEmailsVal.$error }"
|
|
:placeholder="$t('CONVERSATION.REPLYBOX.EMAIL_HEAD.CC.PLACEHOLDER')"
|
|
@blur="onBlur"
|
|
/>
|
|
</div>
|
|
<woot-button
|
|
v-if="!showBcc"
|
|
variant="clear"
|
|
size="small"
|
|
@click="handleAddBcc"
|
|
>
|
|
{{ $t('CONVERSATION.REPLYBOX.EMAIL_HEAD.ADD_BCC') }}
|
|
</woot-button>
|
|
</div>
|
|
<span v-if="$v.ccEmailsVal.$error" class="message">
|
|
{{ $t('CONVERSATION.REPLYBOX.EMAIL_HEAD.CC.ERROR') }}
|
|
</span>
|
|
</div>
|
|
<div v-if="showBcc" class="input-group-wrap">
|
|
<div class="input-group small" :class="{ error: $v.bccEmailsVal.$error }">
|
|
<label class="input-group-label">
|
|
{{ $t('CONVERSATION.REPLYBOX.EMAIL_HEAD.BCC.LABEL') }}
|
|
</label>
|
|
<div class="rounded-none flex-1 min-w-0 m-0 whitespace-nowrap">
|
|
<woot-input
|
|
v-model.trim="$v.bccEmailsVal.$model"
|
|
type="text"
|
|
class="[&>input]:mb-0 [&>input]:border-transparent [&>input]:h-8 [&>input]:text-sm [&>input]:!border-0 [&>input]:border-none"
|
|
:class="{ error: $v.bccEmailsVal.$error }"
|
|
:placeholder="
|
|
$t('CONVERSATION.REPLYBOX.EMAIL_HEAD.BCC.PLACEHOLDER')
|
|
"
|
|
@blur="onBlur"
|
|
/>
|
|
</div>
|
|
</div>
|
|
<span v-if="$v.bccEmailsVal.$error" class="message">
|
|
{{ $t('CONVERSATION.REPLYBOX.EMAIL_HEAD.BCC.ERROR') }}
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import { validEmailsByComma } from './helpers/emailHeadHelper';
|
|
|
|
export default {
|
|
props: {
|
|
ccEmails: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
bccEmails: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
toEmails: {
|
|
type: String,
|
|
default: '',
|
|
},
|
|
},
|
|
data() {
|
|
return {
|
|
showBcc: false,
|
|
ccEmailsVal: '',
|
|
bccEmailsVal: '',
|
|
toEmailsVal: '',
|
|
};
|
|
},
|
|
watch: {
|
|
bccEmails(newVal) {
|
|
if (newVal !== this.bccEmailsVal) {
|
|
this.bccEmailsVal = newVal;
|
|
}
|
|
},
|
|
ccEmails(newVal) {
|
|
if (newVal !== this.ccEmailsVal) {
|
|
this.ccEmailsVal = newVal;
|
|
}
|
|
},
|
|
toEmails(newVal) {
|
|
if (newVal !== this.toEmailsVal) {
|
|
this.toEmailsVal = newVal;
|
|
}
|
|
},
|
|
},
|
|
mounted() {
|
|
this.ccEmailsVal = this.ccEmails;
|
|
this.bccEmailsVal = this.bccEmails;
|
|
this.toEmailsVal = this.toEmails;
|
|
},
|
|
validations: {
|
|
ccEmailsVal: {
|
|
hasValidEmails(value) {
|
|
return validEmailsByComma(value);
|
|
},
|
|
},
|
|
bccEmailsVal: {
|
|
hasValidEmails(value) {
|
|
return validEmailsByComma(value);
|
|
},
|
|
},
|
|
toEmailsVal: {
|
|
hasValidEmails(value) {
|
|
return validEmailsByComma(value);
|
|
},
|
|
},
|
|
},
|
|
methods: {
|
|
handleAddBcc() {
|
|
this.showBcc = true;
|
|
},
|
|
onBlur() {
|
|
this.$v.$touch();
|
|
this.$emit('update:bccEmails', this.bccEmailsVal);
|
|
this.$emit('update:ccEmails', this.ccEmailsVal);
|
|
this.$emit('update:toEmails', this.toEmailsVal);
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="scss" scoped>
|
|
.input-group-wrap .message {
|
|
@apply text-sm text-red-500 dark:text-red-500;
|
|
}
|
|
.input-group {
|
|
@apply border-b border-solid border-slate-75 dark:border-slate-700 my-1 flex items-center gap-2;
|
|
|
|
.input-group-label {
|
|
@apply border-transparent bg-transparent text-xs font-semibold pl-0;
|
|
}
|
|
}
|
|
|
|
.input-group.error {
|
|
@apply border-b-red-500 dark:border-b-red-500;
|
|
.input-group-label {
|
|
@apply text-red-500 dark:text-red-500;
|
|
}
|
|
}
|
|
</style>
|