chore: Add feature flag for branding (#5370)
This commit is contained in:
parent
ee2189d98a
commit
83fb46bc50
4 changed files with 17 additions and 4 deletions
|
@ -1,5 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<div v-if="globalConfig.brandName" class="px-0 py-3 flex justify-center">
|
<div
|
||||||
|
v-if="globalConfig.brandName && !disableBranding"
|
||||||
|
class="px-0 py-3 flex justify-center"
|
||||||
|
>
|
||||||
<a
|
<a
|
||||||
:href="brandRedirectURL"
|
:href="brandRedirectURL"
|
||||||
rel="noreferrer noopener nofollow"
|
rel="noreferrer noopener nofollow"
|
||||||
|
@ -30,6 +33,12 @@ const {
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [globalConfigMixin],
|
mixins: [globalConfigMixin],
|
||||||
|
props: {
|
||||||
|
disableBranding: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false,
|
||||||
|
},
|
||||||
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
globalConfig: {
|
globalConfig: {
|
||||||
|
|
|
@ -46,7 +46,7 @@
|
||||||
>
|
>
|
||||||
<router-view />
|
<router-view />
|
||||||
</transition>
|
</transition>
|
||||||
<branding />
|
<branding :disable-branding="disableBranding" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -70,6 +70,7 @@ export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
showPopoutButton: false,
|
showPopoutButton: false,
|
||||||
|
disableBranding: window.chatwootWebChannel.disableBranding || false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
|
@ -24,7 +24,8 @@
|
||||||
workingHours: <%= @web_widget.inbox.working_hours.to_json.html_safe %>,
|
workingHours: <%= @web_widget.inbox.working_hours.to_json.html_safe %>,
|
||||||
outOfOfficeMessage: <%= @web_widget.inbox.out_of_office_message.to_json.html_safe %>,
|
outOfOfficeMessage: <%= @web_widget.inbox.out_of_office_message.to_json.html_safe %>,
|
||||||
utcOffset: '<%= ActiveSupport::TimeZone[@web_widget.inbox.timezone].now.formatted_offset %>',
|
utcOffset: '<%= ActiveSupport::TimeZone[@web_widget.inbox.timezone].now.formatted_offset %>',
|
||||||
allowMessagesAfterResolved: <%= @web_widget.inbox.allow_messages_after_resolved %>
|
allowMessagesAfterResolved: <%= @web_widget.inbox.allow_messages_after_resolved %>,
|
||||||
|
disableBranding: <%= @web_widget.inbox.account.feature_enabled?('disable_branding') %>
|
||||||
}
|
}
|
||||||
window.chatwootWidgetDefaults = {
|
window.chatwootWidgetDefaults = {
|
||||||
useInboxAvatarForBot: <%= ActiveModel::Type::Boolean.new.cast(ENV.fetch('USE_INBOX_AVATAR_FOR_BOT', false)) %>,
|
useInboxAvatarForBot: <%= ActiveModel::Type::Boolean.new.cast(ENV.fetch('USE_INBOX_AVATAR_FOR_BOT', false)) %>,
|
||||||
|
|
|
@ -9,3 +9,5 @@
|
||||||
enabled: true
|
enabled: true
|
||||||
- name: ip_lookup
|
- name: ip_lookup
|
||||||
enabled: false
|
enabled: false
|
||||||
|
- name: disable_branding
|
||||||
|
enabled: false
|
||||||
|
|
Loading…
Reference in a new issue