Remove analytics consent (#163)

* Remove analytics consent

* Use watch for cookie popup visibility

* Fix double scrollbar, delete account not centered
This commit is contained in:
Geometrically
2021-04-11 14:31:21 -07:00
committed by GitHub
parent cecafb726c
commit 28092d6862
5 changed files with 24 additions and 17 deletions

View File

@@ -25,21 +25,26 @@ import scopes from '~/privacy-toggles'
export default {
name: 'CookieConsent',
fetch() {
// Get informations in the store
this.$store.dispatch('consent/loadFromCookies', this.$cookies)
if (
!this.$store.state.consent.is_consent_given &&
this.$route.path !== '/dashboard/privacy'
) {
this.shown = true
}
this.checkVisibility()
},
data() {
return {
shown: false,
}
},
watch: {
$route() {
this.checkVisibility()
},
},
methods: {
checkVisibility() {
this.$store.dispatch('consent/loadFromCookies', this.$cookies)
this.shown =
!this.$store.state.consent.is_consent_given &&
this.$route.path !== '/dashboard/privacy'
},
hide() {
this.$store.commit('consent/set_consent', true)
// Accept all scopes