fix: 게임 시작 버튼에 OS 및 지원 플랫폼 검사 로직 추가 (미지원 시 얼럿 표시)
This commit is contained in:
@@ -33,11 +33,6 @@ const { pageData } = storeToRefs(usePageDataStore())
|
||||
|
||||
// Constants
|
||||
const COLOR_INDEX = { BACKGROUND: 0, TEXT: 1 } as const
|
||||
const OS_TYPE_MAP: Record<string, Platform[]> = {
|
||||
'1': ['google_play'],
|
||||
'2': ['app_store'],
|
||||
'3': ['google_play', 'app_store'],
|
||||
}
|
||||
|
||||
const preregistModalRef = ref<{
|
||||
handleOpenPreregist: () => Promise<void>
|
||||
@@ -101,12 +96,6 @@ const buttonColors = computed(() => {
|
||||
}
|
||||
})
|
||||
|
||||
// Platform Buttons
|
||||
const platformButtons = computed<Platform[]>(() => {
|
||||
const osType = String(gameData.value?.os_type ?? '')
|
||||
return OS_TYPE_MAP[osType] ?? []
|
||||
})
|
||||
|
||||
// Reward Section
|
||||
const accBackgroundData = computed(() =>
|
||||
getComponentGroup(props.components, 'backgroundAccReward')
|
||||
@@ -280,10 +269,10 @@ const handlePreregistClick = () => {
|
||||
{{ tm('Preregist_Btn_Preegist') }}
|
||||
</BlocksButtonLauncher>
|
||||
<BlocksButtonLauncher
|
||||
v-for="platform in platformButtons"
|
||||
v-for="platform in getSupportedPlatforms(gameData?.os_type)"
|
||||
:key="`preregist-${platform}`"
|
||||
type="duplication"
|
||||
:platform="platform"
|
||||
:platform="platform as Platform"
|
||||
:background-color="buttonColors.backgroundColor"
|
||||
:text-color="buttonColors.textColor"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user