diff --git a/components/common/SearchRecipe.vue b/components/common/SearchRecipe.vue index 0908a91..dcea16f 100644 --- a/components/common/SearchRecipe.vue +++ b/components/common/SearchRecipe.vue @@ -61,14 +61,14 @@ const filteredRecipes = computedAsync(async () => { leave-to="opacity-0 scale-95" >
{
{ :href="dish.link || `https://www.bilibili.com/video/${dish.bv}`" target="_blank" class="dish-tag rounded tag" p="x-2" border="~ blue-200 dark:blue-800" bg="blue-300 opacity-20" - @click="triggerGtm(dish.name)" + @click="triggerGtm(dish)" > {{ dishLabel }} diff --git a/components/ylf/YlfFormItem.vue b/components/ylf/YlfFormItem.vue index 0613b01..f638e5f 100644 --- a/components/ylf/YlfFormItem.vue +++ b/components/ylf/YlfFormItem.vue @@ -16,11 +16,11 @@ defineProps<{ :is="to ? NuxtLink : 'div'" :to="to" class="ylf-form-item" - w-full flex cursor-pointer items-center justify-between p-3 + w-full flex cursor-pointer items-center justify-between p-2 hover:bg-gray-100 dark:hover:bg-dark-400 > -
+
{{ label }}
diff --git a/components/ylf/YlfIconItem.vue b/components/ylf/YlfIconItem.vue new file mode 100644 index 0000000..ac18092 --- /dev/null +++ b/components/ylf/YlfIconItem.vue @@ -0,0 +1,22 @@ + + + diff --git a/composables/store/history.ts b/composables/store/history.ts new file mode 100644 index 0000000..7dd0487 --- /dev/null +++ b/composables/store/history.ts @@ -0,0 +1,10 @@ +import { useStorage } from '@vueuse/core' +import { namespace } from '~/constants' +import type { RecipeItem } from '~/types' + +export interface RecipeHistoryItem { + recipe: RecipeItem + time: number +} + +export const recipeHistories = useStorage(`${namespace}:history`, []) diff --git a/layouts/child.vue b/layouts/child.vue index 62a96c7..c2d5272 100644 --- a/layouts/child.vue +++ b/layouts/child.vue @@ -10,7 +10,7 @@ const route = useRoute()
-

+

{{ route.meta.title }}

diff --git a/package.json b/package.json index 8534573..03d4ee4 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,7 @@ "typecheck": "vue-tsc --noEmit" }, "dependencies": { + "dayjs": "^1.11.10", "vue-about-me": "^1.2.7" }, "devDependencies": { diff --git a/pages/recipes/collect.vue b/pages/recipes/collect.vue new file mode 100644 index 0000000..a8f2edd --- /dev/null +++ b/pages/recipes/collect.vue @@ -0,0 +1,12 @@ + + + diff --git a/pages/recipes/history.vue b/pages/recipes/history.vue new file mode 100644 index 0000000..6511d97 --- /dev/null +++ b/pages/recipes/history.vue @@ -0,0 +1,38 @@ + + + diff --git a/pages/user.vue b/pages/user.vue index 1ebc70b..10593a4 100644 --- a/pages/user.vue +++ b/pages/user.vue @@ -8,6 +8,12 @@ import { links } from '~/constants' 我的 +
+ + + +
+
- + diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9479ec1..d2f0511 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -5,6 +5,9 @@ settings: excludeLinksFromLockfile: false dependencies: + dayjs: + specifier: ^1.11.10 + version: 1.11.10 vue-about-me: specifier: ^1.2.7 version: 1.2.7(typescript@5.2.2) @@ -2520,6 +2523,7 @@ packages: dependencies: is-glob: 4.0.3 micromatch: 4.0.5 + napi-wasm: 1.1.0 dev: true bundledDependencies: - napi-wasm @@ -4923,6 +4927,10 @@ packages: whatwg-url: 12.0.1 dev: true + /dayjs@1.11.10: + resolution: {integrity: sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==} + dev: false + /de-indent@1.0.2: resolution: {integrity: sha512-e/1zu3xH5MQryN2zdVaF0OrdNLUbvWxzMbi+iNA6Bky7l1RoP8a2fIbRocyHclXt/arDrrR6lL3TqFD9pMQTsg==} dev: true @@ -7561,6 +7569,10 @@ packages: hasBin: true dev: true + /napi-wasm@1.1.0: + resolution: {integrity: sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==} + dev: true + /natural-compare-lite@1.4.0: resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==} dev: true