fix. 플랫폼 pc 미지원하는 경우 데스크탑에서 모바일 텍스트 노출 수정

This commit is contained in:
clkim
2026-02-12 13:37:50 +09:00
parent 6597da1df0
commit b7a17eee6d

View File

@@ -99,9 +99,7 @@
variant="outlined"
:platform="Platform"
:class="[
{ 'flex-1': Platform === 'pc' },
{ 'flex-1': Platform !== 'pc' && !device.isDesktop },
{ 'no-text': !getButtonText(Platform) },
getButtonText(Platform) ? 'flex-1' : 'no-text',
'size-extra-small md:size-small',
]"
>
@@ -227,18 +225,21 @@ const handleCommunityClick = () => {
window.open(communityUrl.value, '_blank')
}
const getButtonText = (platform: string) => {
const platformKeyMap: Record<string, string> = {
pc: 'platform_pc',
google_play: 'platform_google_play',
app_store: 'platform_app_store',
}
const PLATFORM_LABEL_KEYS: Record<PlatformTransformType, string> = {
pc: 'platform_pc',
google_play: 'platform_google_play',
app_store: 'platform_app_store',
}
if (platform !== 'pc' && device.isDesktop) {
const getButtonText = (platform: PlatformTransformType) => {
// 데스크탭 환경에서 pc지원하는 경우 os 버튼 텍스트 미표시
const isDesktopWithSinglePlatform =
device.isDesktop && platformType.value !== '2' && platform !== 'pc'
if (isDesktopWithSinglePlatform) {
return ''
}
const key = platformKeyMap[platform]
const key = PLATFORM_LABEL_KEYS[platform]
return key ? tm(key) : ''
}