Skip to content

Commit 319491b

Browse files
committed
endedPurchaseStore
1 parent 020336d commit 319491b

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

apps/web/app/components/StorePageSection.vue

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import { useTranslation } from '~/composables/useTranslation'
33
import type { Product } from '@vuejs-jp/model'
44
import MarkDownText from '~/components/MarkDownText.vue'
5-
import { storeUrl } from '~/utils/constants'
5+
import { endedPurchaseStore, storeUrl } from '~/utils/constants'
66
77
const { translate: t } = useTranslation()
88
@@ -117,6 +117,7 @@ const products: Product[] = [
117117
rel="noreferrer"
118118
background-color="vue-green/200"
119119
color="white"
120+
:disabled="endedPurchaseStore"
120121
>
121122
{{ $t('store.preorder') }}
122123
</VFLinkButton>
@@ -125,7 +126,7 @@ const products: Product[] = [
125126
<div class="store-menu">
126127
<div class="store-menu-list">
127128
<div v-for="product in products" :key="product.name" class="store-card">
128-
<VFProduct v-bind="product">
129+
<VFProduct v-bind="{ ...product, disabled: endedPurchaseStore }">
129130
<template #explain>
130131
<i18n-t :keypath="product.explain" tag="p" style="margin: 0;">
131132
<template #kawaiiStickerCreator>
@@ -150,6 +151,7 @@ const products: Product[] = [
150151
rel="noreferrer"
151152
background-color="vue-green/200"
152153
color="white"
154+
:disabled="endedPurchaseStore"
153155
>
154156
{{ $t('store.preorder') }}
155157
</VFLinkButton>
@@ -168,6 +170,7 @@ const products: Product[] = [
168170
rel="noreferrer"
169171
background-color="vue-green/200"
170172
color="white"
173+
:disabled="endedPurchaseStore"
171174
>
172175
{{ $t('store.preorder') }}
173176
</VFLinkButton>

apps/web/app/utils/constants.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ export const endedApplyEarly = true
5151

5252
export const endedApplyHandson = true
5353

54+
export const endedPurchaseStore = true
55+
5456
export const endedCreateNamecard = true
5557

5658
export const displayNameMaxLength = 24

packages/model/lib/store.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ export interface Product {
99
weight?: string
1010
src: string
1111
alt: string
12+
disabled?: boolean
1213
}

packages/ui/components/store/Product.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@ const props = defineProps<StoreItemProps>()
88

99
<template>
1010
<div class="store-item">
11-
<a :href="url" target="_blank">
11+
<template v-if="!disabled">
12+
<a :href="url" target="_blank" :aria-label="name">
13+
<NuxtImg :alt :src width="616" height="616" fit="cover" loading="lazy" class="image" />
14+
</a>
15+
</template>
16+
<template v-else>
1217
<NuxtImg :alt :src width="616" height="616" fit="cover" loading="lazy" class="image" />
13-
</a>
18+
</template>
1419
<div class="name">{{ name }}</div>
1520
<div class="price">{{ price }}</div>
1621
<div class="explain">

0 commit comments

Comments
 (0)