diff --git a/public/images/cabbage-dog.jpg b/public/images/cabbage-dog.jpg deleted file mode 100644 index 9a980e5..0000000 Binary files a/public/images/cabbage-dog.jpg and /dev/null differ diff --git a/scripts/convert.ts b/scripts/convert.ts index 91a91b6..14efb1e 100644 --- a/scripts/convert.ts +++ b/scripts/convert.ts @@ -4,7 +4,6 @@ import path from 'path' import url from 'url' import consola from 'consola' import type { Recipe, RecipeItem } from '~/types' -import { generateEmojisFromStuff } from '~/utils' const __dirname = url.fileURLToPath(new URL('.', import.meta.url)) const recipeCsvFile = path.resolve(__dirname, '../src/data/recipe.csv') @@ -30,7 +29,6 @@ function run() { recipeJson.push({ name: attrs[0].trim(), stuff, - emojis: generateEmojisFromStuff(stuff), // link: attrs[2].trim(), // bv id bv: attrs[2].trim().replace('https://www.bilibili.com/video/', ''), diff --git a/src/components/BaseFooter.vue b/src/components/BaseFooter.vue index d809e1f..1ce0a2e 100644 --- a/src/components/BaseFooter.vue +++ b/src/components/BaseFooter.vue @@ -8,7 +8,7 @@ onBeforeMount(() => { displayICP.value = ['cook.yunyoujun.cn', 'localhost', '127.0.0.1'].includes(window.location.hostname) }) -const commitSha = import.meta.env.CF_PAGES_COMMIT_SHA || '' +const commitSha = import.meta.env.VITE_COMMIT_REF || '' const now = import.meta.env.VITE_APP_BUILD_TIME const buildDate = (new Date(parseInt(now) * 1000)).toLocaleDateString() diff --git a/src/components/ChooseFood.vue b/src/components/ChooseFood.vue index 8447738..c56c982 100644 --- a/src/components/ChooseFood.vue +++ b/src/components/ChooseFood.vue @@ -5,7 +5,6 @@ import type { StuffItem } from '~/data/food' import { meat, staple, tools, vegetable } from '~/data/food' import recipeData from '~/data/recipe.json' import type { Recipe, RecipeItem } from '~/types' -import { useRecipeStore } from '~/store/recipe' import { useInvisibleElement } from '~/composables/helper' import { useEmojiAnimation } from '~/composables/animation' diff --git a/src/components/tags/DishTag.vue b/src/components/tags/DishTag.vue index af15b12..c9232e3 100644 --- a/src/components/tags/DishTag.vue +++ b/src/components/tags/DishTag.vue @@ -2,7 +2,9 @@ import { useGtm } from '@gtm-support/vue-gtm' import { tools } from '~/data/food' import type { RecipeItem } from '~/types' -defineProps<{ +import { getEmojisFromStuff } from '~/utils' + +const props = defineProps<{ dish: RecipeItem }>() @@ -20,6 +22,11 @@ const triggerGtm = (val: string) => { action: val, }) } + +const dishLabel = computed(() => { + const emojis = getEmojisFromStuff(props.dish.stuff) + return `${props.dish.tags?.includes('ๆ‚็ƒฉ') ? '๐Ÿฒ' : emojis.join(' ')} ${props.dish.name}` +})