Chore: Use installation config in frontend (#847)

* Use installation config in widget
* Add configuration for installation in UI
* Add config for mailer

Co-authored-by: Sojan <sojan@pepalo.com>
This commit is contained in:
Pranav Raj S
2020-05-12 01:31:40 +05:30
committed by GitHub
parent c74b5c21d7
commit f819bc0f33
22 changed files with 264 additions and 49 deletions

View File

@@ -1,15 +1,34 @@
<template>
<a
class="branding"
href="https://www.chatwoot.com?utm_source=widget_branding"
:href="`${globalConfig.widgetBrandURL}?utm_source=widget_branding`"
rel="noreferrer noopener nofollow"
target="_blank"
>
<img src="~widget/assets/images/logo.svg" alt="ChatwootLogo" />
<span>{{ $t('POWERED_BY') }}</span>
<img
:alt="globalConfig.installationName"
:src="globalConfig.logoThumbnail"
/>
<span>
{{ useInstallationName($t('POWERED_BY'), globalConfig.installationName) }}
</span>
</a>
</template>
<script>
import { mapGetters } from 'vuex';
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
export default {
mixins: [globalConfigMixin],
computed: {
...mapGetters({
globalConfig: 'globalConfig/get',
}),
},
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
@import '~widget/assets/scss/variables.scss';

View File

@@ -7,6 +7,7 @@ import conversation from 'widget/store/modules/conversation';
import conversationAttributes from 'widget/store/modules/conversationAttributes';
import conversationLabels from 'widget/store/modules/conversationLabels';
import events from 'widget/store/modules/events';
import globalConfig from 'shared/store/globalConfig';
import message from 'widget/store/modules/message';
Vue.use(Vuex);
@@ -20,6 +21,7 @@ export default new Vuex.Store({
conversationAttributes,
conversationLabels,
events,
globalConfig,
message,
},
});