2019-11-12 04:16:30 +00:00
|
|
|
<template>
|
2021-11-22 09:35:29 +00:00
|
|
|
<div v-if="globalConfig.brandName" class="px-0 py-3 flex justify-center">
|
2020-10-14 18:41:47 +00:00
|
|
|
<a
|
|
|
|
:href="brandRedirectURL"
|
|
|
|
rel="noreferrer noopener nofollow"
|
|
|
|
target="_blank"
|
2021-11-22 09:35:29 +00:00
|
|
|
class="branding--link justify-center"
|
2020-10-14 18:41:47 +00:00
|
|
|
>
|
2021-11-22 09:35:29 +00:00
|
|
|
<img
|
|
|
|
class="branding--image"
|
|
|
|
:alt="globalConfig.brandName"
|
|
|
|
:src="globalConfig.logoThumbnail"
|
|
|
|
/>
|
2020-10-14 18:41:47 +00:00
|
|
|
<span>
|
|
|
|
{{ useInstallationName($t('POWERED_BY'), globalConfig.brandName) }}
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
2021-11-22 09:35:29 +00:00
|
|
|
<div v-else class="p-3" />
|
2019-11-12 04:16:30 +00:00
|
|
|
</template>
|
|
|
|
|
2020-05-11 20:01:40 +00:00
|
|
|
<script>
|
|
|
|
import globalConfigMixin from 'shared/mixins/globalConfigMixin';
|
2021-11-22 09:35:29 +00:00
|
|
|
import { mapGetters } from 'vuex';
|
2020-05-11 20:01:40 +00:00
|
|
|
|
2021-08-03 12:52:50 +00:00
|
|
|
const {
|
|
|
|
LOGO_THUMBNAIL: logoThumbnail,
|
|
|
|
BRAND_NAME: brandName,
|
|
|
|
WIDGET_BRAND_URL: widgetBrandURL,
|
|
|
|
} = window.globalConfig || {};
|
|
|
|
|
2020-05-11 20:01:40 +00:00
|
|
|
export default {
|
|
|
|
mixins: [globalConfigMixin],
|
2020-10-14 18:41:47 +00:00
|
|
|
data() {
|
|
|
|
return {
|
2021-08-03 12:52:50 +00:00
|
|
|
globalConfig: {
|
|
|
|
brandName,
|
|
|
|
logoThumbnail,
|
|
|
|
widgetBrandURL,
|
|
|
|
},
|
2020-10-14 18:41:47 +00:00
|
|
|
};
|
|
|
|
},
|
2020-05-11 20:01:40 +00:00
|
|
|
computed: {
|
2021-11-22 09:35:29 +00:00
|
|
|
...mapGetters({ referrerHost: 'appConfig/getReferrerHost' }),
|
2020-10-14 18:41:47 +00:00
|
|
|
brandRedirectURL() {
|
|
|
|
const baseURL = `${this.globalConfig.widgetBrandURL}?utm_source=widget_branding`;
|
|
|
|
if (this.referrerHost) {
|
|
|
|
return `${baseURL}&utm_referrer=${this.referrerHost}`;
|
|
|
|
}
|
|
|
|
return baseURL;
|
|
|
|
},
|
|
|
|
},
|
2020-05-11 20:01:40 +00:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
2019-11-12 04:16:30 +00:00
|
|
|
<style scoped lang="scss">
|
|
|
|
@import '~widget/assets/scss/variables.scss';
|
|
|
|
|
2021-11-22 09:35:29 +00:00
|
|
|
.branding--image {
|
|
|
|
margin-right: $space-smaller;
|
|
|
|
max-width: $space-slab;
|
|
|
|
max-height: $space-slab;
|
2020-10-14 18:41:47 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
.branding--link {
|
2020-01-13 06:40:40 +00:00
|
|
|
color: $color-light-gray;
|
2020-10-14 18:41:47 +00:00
|
|
|
cursor: pointer;
|
2021-11-22 09:35:29 +00:00
|
|
|
display: inline-flex;
|
2019-11-12 04:16:30 +00:00
|
|
|
filter: grayscale(1);
|
2020-01-13 06:40:40 +00:00
|
|
|
font-size: $font-size-small;
|
2020-10-14 18:41:47 +00:00
|
|
|
opacity: 0.9;
|
2019-11-12 04:16:30 +00:00
|
|
|
text-decoration: none;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
filter: grayscale(0);
|
2020-01-13 06:40:40 +00:00
|
|
|
opacity: 1;
|
|
|
|
color: $color-gray;
|
2019-11-12 04:16:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
</style>
|