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

@@ -2,8 +2,8 @@
<div class="medium-10 column signup">
<div class="text-center medium-12 signup--hero">
<img
src="~dashboard/assets/images/woot-logo.svg"
alt="Woot-logo"
:src="globalConfig.logo"
:alt="globalConfig.installationName"
class="hero--logo"
/>
<h2 class="hero--title">
@@ -58,13 +58,18 @@
button-class="large expanded"
>
</woot-submit-button>
<p class="accept--terms" v-html="$t('REGISTER.TERMS_ACCEPT')"></p>
<p class="accept--terms" v-html="termsLink"></p>
</div>
</form>
<div class="column text-center sigin--footer">
<span>Already have an account?</span>
<router-link to="/app/login">
{{ $t('LOGIN.TITLE') }}
{{
useInstallationName(
$t('LOGIN.TITLE'),
globalConfig.installationName
)
}}
</router-link>
</div>
</div>
@@ -77,12 +82,13 @@
import { required, minLength, email } from 'vuelidate/lib/validators';
import Auth from '../../api/auth';
import { mapGetters } from 'vuex';
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
export default {
mixins: [globalConfigMixin],
data() {
return {
// We need to initialize the component with any
// properties that will be used in it
credentials: {
name: '',
email: '',
@@ -106,6 +112,19 @@ export default {
},
},
},
computed: {
...mapGetters({
globalConfig: 'globalConfig/get',
}),
termsLink() {
return this.$t('REGISTER.TERMS_ACCEPT')
.replace('https://www.chatwoot.com/terms', this.globalConfig.termsURL)
.replace(
'https://www.chatwoot.com/privacy-policy',
this.globalConfig.privacyURL
);
},
},
methods: {
showAlert(message) {
// Reset loading, current selected agent