fix. 노출되는 마켓 버튼 없는 경우 영역 카드 영역 미노출되도록 수정

This commit is contained in:
clkim
2026-02-10 15:56:54 +09:00
parent 0fa91264fc
commit 78a16f6e42

View File

@@ -79,32 +79,33 @@
<!-- 다운로드 카드 --> <!-- 다운로드 카드 -->
<div <div
v-if="launchingStatus" v-if="launchingStatus && supportedPlatforms.length > 0"
class="inspection-card inspection-download-card" class="inspection-card inspection-download-card"
> >
<h3 class="card-title text-base md:text-lg"> <h3 class="card-title text-base md:text-lg">
{{ {{
t('Inspection_Txt_Download', { t('Inspection_Txt_Download', {
gameName: gameData?.game_name, gameName: gameName,
}) })
}} }}
</h3> </h3>
<div class="flex flex-row gap-3 flex-wrap"> <div class="flex flex-row gap-3 flex-wrap">
<template <template
v-for="(market, index) in enabledMarkets" v-for="Platform in supportedPlatforms"
:key="index" :key="Platform"
> >
<BlocksButtonLauncher <BlocksButtonLauncher
:type="market === 'pc' ? 'default' : 'single'" :type="Platform === 'pc' ? 'default' : 'single'"
variant="outlined" variant="outlined"
:platform="market" :platform="Platform"
:class="[ :class="[
{ 'flex-1': market === 'pc' }, { 'flex-1': Platform === 'pc' },
{ 'flex-1': market !== 'pc' && !device.isDesktop }, { 'flex-1': Platform !== 'pc' && !device.isDesktop },
{ 'no-text': !getButtonText(Platform) },
'size-extra-small md:size-small', 'size-extra-small md:size-small',
]" ]"
> >
{{ getButtonText(market) }} {{ getButtonText(Platform) }}
</BlocksButtonLauncher> </BlocksButtonLauncher>
</template> </template>
</div> </div>
@@ -119,7 +120,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { globalDateFormat } from '@seed-next/date' import { globalDateFormat } from '@seed-next/date'
import AtomsIconsPlayRoundFill from '#layers/components/atoms/icons/PlayRoundFill.vue' import AtomsIconsPlayRoundFill from '#layers/components/atoms/icons/PlayRoundFill.vue'
import type { Platform } from '#layers/types/components/button' import type { PlatformTransformType } from '#layers/types/api/gameData'
const config = useRuntimeConfig() const config = useRuntimeConfig()
const stoveApiUrl = config.public.stoveApiUrl as string const stoveApiUrl = config.public.stoveApiUrl as string
@@ -142,10 +143,10 @@ const loadingStore = useLoadingStore()
const { webInspectionData, getInspectionDataExternal } = const { webInspectionData, getInspectionDataExternal } =
useGetInspectionDataExternal() useGetInspectionDataExternal()
const gameDataStore = useGameDataStore() const gameDataStore = useGameDataStore()
const { gameData } = storeToRefs(gameDataStore) const { gameId, gameName, platformType, osType } = storeToRefs(gameDataStore)
await getInspectionDataExternal({ await getInspectionDataExternal({
baseApiUrl: stoveApiUrl, baseApiUrl: stoveApiUrl,
gameId: gameData.value.game_id, gameId: gameId.value,
}) })
// locale에 따라 뒤에 KST 또는 UTC 추가 ko, en, zh-tw, ja // locale에 따라 뒤에 KST 또는 UTC 추가 ko, en, zh-tw, ja
@@ -183,25 +184,23 @@ const launchingStatus = computed(() => {
return webInspectionData.value?.launching_status return webInspectionData.value?.launching_status
}) })
const enabledMarkets = computed(() => { const supportedPlatforms = computed(() => {
const markets = getSupportedPlatforms( const platforms = getSupportedPlatforms(
gameData.value.platform_type, platformType.value,
gameData.value.os_type osType.value
) as Platform[] ) as PlatformTransformType[]
if (device.isMobile) {
// markets에 pc가 있다면 지우기
markets.splice(markets.indexOf('pc'), 1)
if (!device.isDesktop) {
platforms.splice(platforms.indexOf('pc'), 1)
if (device.isAndroid) { if (device.isAndroid) {
markets.splice(markets.indexOf('app_store'), 1) platforms.splice(platforms.indexOf('app_store'), 1)
} }
if (device.isApple) { if (device.isApple) {
markets.splice(markets.indexOf('google_play'), 1) platforms.splice(platforms.indexOf('google_play'), 1)
} }
} }
return markets return platforms
}) })
const logoImgUrl = computed(() => { const logoImgUrl = computed(() => {