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
2 changed files with 22 additions and 9 deletions

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) {