]> git.ipfire.org Git - thirdparty/vuejs/pinia.git/commitdiff
docs: add madvue banner (#2949)
authorIsrael Ortuño <ai.ortuno@gmail.com>
Fri, 21 Mar 2025 11:05:16 +0000 (12:05 +0100)
committerGitHub <noreply@github.com>
Fri, 21 Mar 2025 11:05:16 +0000 (12:05 +0100)
packages/docs/.vitepress/theme/components/MadVueBanner.vue

index fd28530ab9f0907cdc38725a6622bd7f48020c7c..9e06512d76cb6c023c2c0bf0c359ed678ac053dd 100644 (file)
@@ -2,7 +2,7 @@
 import { ref, onMounted } from 'vue'
 
 const isVisible = ref(false)
-const nameStorage = 'MADVUE-BANNER-MARCH-2025'
+const nameStorage = 'MADVUE-BANNER-MARCH-25'
 const target = 'https://madvue.es/?utm_source=pinia&utm_content=top_banner'
 
 function closeBanner() {
@@ -18,17 +18,20 @@ onMounted(() => {
     return
   }
 
-  const keys = Object.keys(localStorage).filter(
-    (key) => key.includes('FREEWEEKEND25') && key.endsWith('_CLOSED')
-  )
+  isVisible.value = true
+  document.documentElement.classList.add('has-banner')
 
-  if (
-    keys.length > 0 &&
-    keys.every((key) => localStorage.getItem(key) != null)
-  ) {
-    isVisible.value = true
-    document.documentElement.classList.add('has-banner')
-  }
+  // const keys = Object.keys(localStorage).filter(
+  //   (key) => key.includes('FREEWEEKEND25') && key.endsWith('_CLOSED')
+  // )
+
+  // if (
+  //   keys.length > 0 &&
+  //   keys.every((key) => localStorage.getItem(key) != null)
+  // ) {
+  //   isVisible.value = true
+  //   document.documentElement.classList.add('has-banner')
+  // }
 })
 </script>