feat: Add the ability to edit inbox name (#2406)

This commit is contained in:
Muhsin Keloth 2021-06-09 21:26:23 +05:30 committed by GitHub
parent 77d4f86ec9
commit 174886671d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 22 additions and 9 deletions

View file

@ -28,6 +28,14 @@
}
],
"ADD": {
"CHANNEL_NAME": {
"LABEL": "Inbox Name",
"PLACEHOLDER": "Enter your inbox name (eg: Acme Inc)"
},
"WEBSITE_NAME": {
"LABEL": "Website Name",
"PLACEHOLDER": "Enter your website name (eg: Acme Inc)"
},
"FB": {
"HELP": "PS: By signing in, we only get access to your Page's messages. Your private messages can never be accessed by Chatwoot.",
"CHOOSE_PAGE": "Choose Page",
@ -48,10 +56,6 @@
"CHANNEL_AVATAR": {
"LABEL": "Channel Avatar"
},
"CHANNEL_NAME": {
"LABEL": "Website Name",
"PLACEHOLDER": "Enter your website name (eg: Acme Inc)"
},
"CHANNEL_DOMAIN": {
"LABEL": "Website Domain",
"PLACEHOLDER": "Enter your website domain (eg: acme.com)"

View file

@ -25,13 +25,10 @@
@change="handleImageUpload"
/>
<woot-input
v-if="isAWebWidgetInbox"
v-model.trim="selectedInboxName"
class="medium-9 columns"
:label="$t('INBOX_MGMT.ADD.WEBSITE_CHANNEL.CHANNEL_NAME.LABEL')"
:placeholder="
$t('INBOX_MGMT.ADD.WEBSITE_CHANNEL.CHANNEL_NAME.PLACEHOLDER')
"
:label="inboxNameLabel"
:placeholder="inboxNamePlaceHolder"
/>
<woot-input
v-if="isAWebWidgetInbox"
@ -381,6 +378,18 @@ export default {
messengerScript() {
return createMessengerScript(this.inbox.page_id);
},
inboxNameLabel() {
if (this.isAWebWidgetInbox) {
return this.$t('INBOX_MGMT.ADD.WEBSITE_NAME.LABEL');
}
return this.$t('INBOX_MGMT.ADD.CHANNEL_NAME.LABEL');
},
inboxNamePlaceHolder() {
if (this.isAWebWidgetInbox) {
return this.$t('INBOX_MGMT.ADD.WEBSITE_NAME.PLACEHOLDER');
}
return this.$t('INBOX_MGMT.ADD.CHANNEL_NAME.PLACEHOLDER');
},
},
watch: {
$route(to) {