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