diff --git a/assets/components/container/container.vue b/assets/components/container/container.vue
index 44dcd87c..6f879db6 100644
--- a/assets/components/container/container.vue
+++ b/assets/components/container/container.vue
@@ -6,7 +6,8 @@
@@ -41,9 +42,11 @@ function toggleSidebar(state) {
this.showSidebar = typeof state === 'boolean' ? state : !this.showSidebar;
}
-function closeWarning() {
- this.showWarning = false;
- sessionStorage.setItem('warning', 'warned');
+async function setConsent(consent) {
+ if (consent) {
+ this.showWarning = false;
+ await this.$store.dispatch('setConsent', true);
+ }
}
function mounted() {
@@ -61,7 +64,7 @@ export default {
data() {
return {
showSidebar: false,
- showWarning: sessionStorage.getItem('warning') !== 'warned',
+ showWarning: !window.env.consent,
};
},
computed: {
@@ -72,7 +75,7 @@ export default {
mounted,
methods: {
toggleSidebar,
- closeWarning,
+ setConsent,
},
};
diff --git a/assets/components/container/warning.vue b/assets/components/container/warning.vue
index 3d47ab23..467b2bba 100644
--- a/assets/components/container/warning.vue
+++ b/assets/components/container/warning.vue
@@ -21,6 +21,7 @@
Leave