2019-12-20 13:04:34 +01:00
|
|
|
<template>
|
2020-02-18 08:57:00 +01:00
|
|
|
<div class="container section">
|
|
|
|
<h2 class="title">{{ $t("Privacy Policy") }}</h2>
|
|
|
|
<div class="content" v-html="config.terms.bodyHtml" />
|
|
|
|
</div>
|
2019-12-20 13:04:34 +01:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
2020-02-18 08:57:00 +01:00
|
|
|
import { Component, Vue, Watch } from "vue-property-decorator";
|
|
|
|
import { TERMS } from "@/graphql/config";
|
|
|
|
import { IConfig } from "@/types/config.model";
|
|
|
|
import { InstanceTermsType } from "@/types/admin.model";
|
|
|
|
import RouteName from "../router/name";
|
2019-12-20 13:04:34 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
apollo: {
|
|
|
|
config: {
|
|
|
|
query: TERMS,
|
|
|
|
variables() {
|
|
|
|
return {
|
|
|
|
locale: this.locale,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
skip() {
|
|
|
|
return !this.locale;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
})
|
|
|
|
export default class Terms extends Vue {
|
|
|
|
config!: IConfig;
|
2020-02-18 08:57:00 +01:00
|
|
|
|
|
|
|
locale: string | null = null;
|
2019-12-20 13:04:34 +01:00
|
|
|
|
|
|
|
created() {
|
|
|
|
this.locale = this.$i18n.locale;
|
|
|
|
}
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
@Watch("config", { deep: true })
|
2019-12-20 13:04:34 +01:00
|
|
|
watchConfig(config: IConfig) {
|
|
|
|
if (config.terms.type) {
|
|
|
|
console.log(this.config.terms);
|
|
|
|
this.redirectToUrl();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
redirectToUrl() {
|
|
|
|
if (this.config.terms.type === InstanceTermsType.URL) {
|
|
|
|
window.location.replace(this.config.terms.url);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
RouteName = RouteName;
|
|
|
|
}
|
|
|
|
</script>
|
2020-02-18 08:57:00 +01:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
@import "@/variables.scss";
|
2019-12-20 13:04:34 +01:00
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
main > .container {
|
|
|
|
background: $white;
|
|
|
|
}
|
|
|
|
</style>
|