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>
|
2021-03-26 19:27:51 +01:00
|
|
|
<div
|
|
|
|
class="content"
|
|
|
|
v-if="config && config.privacy"
|
|
|
|
v-html="config.privacy.bodyHtml"
|
|
|
|
/>
|
2020-02-18 08:57:00 +01:00
|
|
|
</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";
|
2020-06-19 19:27:10 +02:00
|
|
|
import { PRIVACY } from "@/graphql/config";
|
2020-02-18 08:57:00 +01:00
|
|
|
import { IConfig } from "@/types/config.model";
|
2020-11-27 19:27:44 +01:00
|
|
|
import { InstancePrivacyType } from "@/types/enums";
|
2019-12-20 13:04:34 +01:00
|
|
|
|
|
|
|
@Component({
|
|
|
|
apollo: {
|
|
|
|
config: {
|
2020-06-19 19:27:10 +02:00
|
|
|
query: PRIVACY,
|
2019-12-20 13:04:34 +01:00
|
|
|
variables() {
|
|
|
|
return {
|
|
|
|
locale: this.locale,
|
|
|
|
};
|
|
|
|
},
|
|
|
|
skip() {
|
|
|
|
return !this.locale;
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2021-05-25 16:21:29 +02:00
|
|
|
metaInfo() {
|
|
|
|
return {
|
|
|
|
title: this.$t("Privacy Policy") as string,
|
|
|
|
};
|
|
|
|
},
|
2019-12-20 13:04:34 +01:00
|
|
|
})
|
2020-06-19 19:27:10 +02:00
|
|
|
export default class Privacy extends Vue {
|
2019-12-20 13:04:34 +01:00
|
|
|
config!: IConfig;
|
2020-02-18 08:57:00 +01:00
|
|
|
|
|
|
|
locale: string | null = null;
|
2019-12-20 13:04:34 +01:00
|
|
|
|
2020-11-27 19:27:44 +01:00
|
|
|
created(): void {
|
2019-12-20 13:04:34 +01:00
|
|
|
this.locale = this.$i18n.locale;
|
|
|
|
}
|
|
|
|
|
2020-02-18 08:57:00 +01:00
|
|
|
@Watch("config", { deep: true })
|
2020-11-27 19:27:44 +01:00
|
|
|
watchConfig(config: IConfig): void {
|
2021-03-01 18:29:48 +01:00
|
|
|
if (config?.privacy?.type) {
|
2019-12-20 13:04:34 +01:00
|
|
|
this.redirectToUrl();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2020-11-27 19:27:44 +01:00
|
|
|
redirectToUrl(): void {
|
2021-03-01 18:29:48 +01:00
|
|
|
if (this.config?.privacy?.type === InstancePrivacyType.URL) {
|
|
|
|
window.location.replace(this.config?.privacy?.url);
|
2019-12-20 13:04:34 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|
2020-02-18 08:57:00 +01:00
|
|
|
<style lang="scss" scoped>
|
|
|
|
main > .container {
|
|
|
|
background: $white;
|
2020-06-19 19:27:10 +02:00
|
|
|
|
2020-11-16 10:04:47 +01:00
|
|
|
::v-deep dt {
|
2020-06-19 19:27:10 +02:00
|
|
|
font-weight: bold;
|
|
|
|
}
|
|
|
|
}
|
2020-11-16 10:04:47 +01:00
|
|
|
.content ::v-deep li {
|
2020-06-19 19:27:10 +02:00
|
|
|
margin-bottom: 1rem;
|
2020-02-18 08:57:00 +01:00
|
|
|
}
|
|
|
|
</style>
|