aboutsummaryrefslogtreecommitdiff
path: root/front-end/src/bootstrap/components/CookieWarning.vue
diff options
context:
space:
mode:
Diffstat (limited to 'front-end/src/bootstrap/components/CookieWarning.vue')
-rw-r--r--front-end/src/bootstrap/components/CookieWarning.vue30
1 files changed, 10 insertions, 20 deletions
diff --git a/front-end/src/bootstrap/components/CookieWarning.vue b/front-end/src/bootstrap/components/CookieWarning.vue
index b5239f5..2651cd1 100644
--- a/front-end/src/bootstrap/components/CookieWarning.vue
+++ b/front-end/src/bootstrap/components/CookieWarning.vue
@@ -1,15 +1,4 @@
-<template>
- <div v-if="show" class="fixed top-0 left-0 z-10 w-full" :style="style">
- <div class="flex w-full p-2 text-center text-white bg-blue-600">
- <div class="m-auto text-sm font-semibold md:text-base">
- You must have cookies enabled for this site to work properly
- </div>
- </div>
- </div>
-</template>
-
<script setup lang="ts">
-
import { computed, toRefs } from 'vue'
import { useEnvSize } from '@vnuge/vnlib.browser'
@@ -18,19 +7,20 @@ const props = defineProps<{
}>()
const { hidden } = toRefs(props)
-
const { headerHeight } = useEnvSize()
const show = computed(() => (!window.navigator.cookieEnabled) && !hidden.value)
-
-const style = computed(() => {
- return {
- top: headerHeight.value + 'px'
- }
-})
+const style = computed(() => ({ top: headerHeight.value + 'px' }))
</script>
+<template>
+ <div v-if="show" class="fixed top-0 left-0 z-10 w-full" :style="style">
+ <div class="flex w-full p-2 text-center text-white bg-blue-600">
+ <div class="m-auto text-sm font-semibold md:text-base">
+ You must have cookies enabled for this site to work properly
+ </div>
+ </div>
+ </div>
+</template>
-<style>
-</style>