chore: fix ci lint/typecheck/test

This commit is contained in:
YunYouJun
2024-04-28 19:36:17 +08:00
parent 778594652c
commit 10073b3a07
5 changed files with 8 additions and 4 deletions

View File

@@ -1,6 +1,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { installPrompt } from './utils/pwa' import { installPrompt } from './utils/pwa'
import { appName } from '~/constants' import { appName } from '~/constants'
import { useIndexedDB } from '~/composables/db'
// https://nuxt.com/docs/api/composables/use-head // https://nuxt.com/docs/api/composables/use-head
useHead({ useHead({

View File

@@ -8,7 +8,10 @@ const props = defineProps({
const rStore = useRecipeStore() const rStore = useRecipeStore()
const { displayedRecipe } = storeToRefs(rStore) const { displayedRecipe } = storeToRefs(rStore)
const showBasketBtn = computed(async () => { /**
* Show basket button if there are recipes in the basket
*/
const showBasketBtn = computed(() => {
return displayedRecipe.value.length !== rStore.recipesLength && props.isVisible return displayedRecipe.value.length !== rStore.recipesLength && props.isVisible
}) })
</script> </script>

View File

@@ -1,4 +1,5 @@
<script lang="ts" setup> <script lang="ts" setup>
// @ts-expect-error // Ignore this line
import VueAboutMe from 'vue-about-me' import VueAboutMe from 'vue-about-me'
import 'vue-about-me/style.css' import 'vue-about-me/style.css'

View File

@@ -1,5 +1,6 @@
import { useStorage } from '@vueuse/core' import { useStorage } from '@vueuse/core'
import { lastDbUpdated, namespace } from '~/constants' import { lastDbUpdated, namespace } from '~/constants'
import { db, initDb } from '~/utils/db'
export function useIndexedDB() { export function useIndexedDB() {
const dbUpdated = useStorage(`${namespace}:lastDbUpdated`, lastDbUpdated) const dbUpdated = useStorage(`${namespace}:lastDbUpdated`, lastDbUpdated)

View File

@@ -1,3 +1 @@
import indexeddb from 'fake-indexeddb' import 'fake-indexeddb/auto'
globalThis.indexedDB = indexeddb