fix. 로그 전송 수정
This commit is contained in:
@@ -31,12 +31,6 @@ const { isProcessing, validateLauncher } = useCheckGameStart()
|
||||
|
||||
const { gameData } = storeToRefs(gameDataStore)
|
||||
|
||||
const PLATFORM_LABEL_KEY: Record<PlatformTransformType, string> = {
|
||||
pc: 'PC',
|
||||
google_play: 'Google Play',
|
||||
app_store: 'App Store',
|
||||
} as const
|
||||
|
||||
const PLATFORM_ICON_MAP: Record<Platform, string> = {
|
||||
google_play: 'AtomsIconsLogoGoogle',
|
||||
app_store: 'AtomsIconsLogoApple',
|
||||
@@ -93,7 +87,7 @@ const tmWithGameName = (key: string): string => {
|
||||
)
|
||||
|
||||
const platformLines = supportedPlatforms.value
|
||||
.map(platform => highlight(PLATFORM_LABEL_KEY[platform] as string))
|
||||
.map(platform => highlight(formatSnakeToTitle(platform)))
|
||||
.filter(Boolean)
|
||||
|
||||
return platformLines.length
|
||||
|
||||
@@ -26,12 +26,8 @@ const snsList = computed(() => {
|
||||
return gameData.value?.sns_json
|
||||
})
|
||||
|
||||
const handleMouseEnter = () => {
|
||||
showSnsList.value = true
|
||||
}
|
||||
|
||||
const handleForceClose = () => {
|
||||
showSnsList.value = false
|
||||
const handleControlForce = (state: boolean) => {
|
||||
showSnsList.value = state
|
||||
}
|
||||
|
||||
const handleCopy = async () => {
|
||||
@@ -56,7 +52,7 @@ const handleCopy = async () => {
|
||||
class="btn-sns"
|
||||
sr-only="sns"
|
||||
:style="{ backgroundColor: snsBackgroundColor }"
|
||||
@click="handleMouseEnter"
|
||||
@click="handleControlForce(true)"
|
||||
>
|
||||
<AtomsIconsShareLine class="icon-share" />
|
||||
</AtomsButtonCircle>
|
||||
@@ -96,7 +92,7 @@ const handleCopy = async () => {
|
||||
<button
|
||||
type="button"
|
||||
class="opacity-50 z-[1] hover:opacity-100"
|
||||
@click="handleForceClose"
|
||||
@click="handleControlForce(false)"
|
||||
>
|
||||
<span class="sr-only">close</span>
|
||||
<AtomsIconsCloseLine size="24" />
|
||||
@@ -105,7 +105,7 @@ onMounted(() => {
|
||||
:class="['utile-wrap', { 'is-stop': pinToMain }]"
|
||||
>
|
||||
<BlocksButtonScrollTop v-if="isShowTopBtn" />
|
||||
<BlocksButtonSns v-if="isShowSnsBtn" />
|
||||
<BlocksSns v-if="isShowSnsBtn" />
|
||||
</div>
|
||||
</ClientOnly>
|
||||
</template>
|
||||
|
||||
@@ -387,10 +387,9 @@ defineExpose({
|
||||
<!-- STOVE App Download -->
|
||||
<div class="flex flex-col gap-5">
|
||||
<p
|
||||
v-dompurify-html="tmWithGameName('Preregist_Stove_Download')"
|
||||
class="text-left text-sm font-medium leading-6 tracking-[-0.42px] text-[#ebebeb] md:text-center md:text-base md:leading-[26px] md:tracking-[-0.48px]"
|
||||
>
|
||||
{{ tm('Preregist_Stove_Download') }}
|
||||
</p>
|
||||
/>
|
||||
<div class="flex items-center gap-3">
|
||||
<div
|
||||
v-if="device.isDesktop"
|
||||
|
||||
@@ -32,7 +32,7 @@ const resultGetMultilingual = await useGetMultilingual({
|
||||
baseApiUrl: dataResourcesUrl,
|
||||
fileName: multilingualFileName,
|
||||
})
|
||||
const { tm, locale }: any = useI18n({
|
||||
const { t, tm, locale }: any = useI18n({
|
||||
useScope: 'local',
|
||||
messages: Object(resultGetMultilingual?.value?.multilingual),
|
||||
})
|
||||
@@ -230,7 +230,11 @@ const handleMoveFocus = (target: 'pc' | 'mobile') => {
|
||||
v-else-if="breakpoints.isMd || breakpoints.isDesktop"
|
||||
platform="pc"
|
||||
class="!w-full !max-w-[300px]"
|
||||
@click="handleSendLog('PC 버전 다운로드')"
|
||||
@click="
|
||||
handleSendLog(
|
||||
t('Download_Button_PC_Download', {}, { locale: 'ko' })
|
||||
)
|
||||
"
|
||||
>
|
||||
<span>{{ tm('Download_Button_PC') }}</span>
|
||||
</BlocksButtonLauncher>
|
||||
@@ -249,7 +253,11 @@ const handleMoveFocus = (target: 'pc' | 'mobile') => {
|
||||
target="_self"
|
||||
rel="noopener noreferrer"
|
||||
class="inline-flex items-center justify-start gap-[4px] text-[#3C75FF] text-[16px] font-[500] reading-[24px] tracking-[-0.48px]"
|
||||
@click="handleSendLog('스토브 PC 클라이언트 다운로드')"
|
||||
@click="
|
||||
handleSendLog(
|
||||
t('Download_Button_STOVE', {}, { locale: 'ko' })
|
||||
)
|
||||
"
|
||||
>
|
||||
<span>{{ tm('Download_Button_STOVE') }}</span>
|
||||
<AtomsIconsDownloadLine color="#3C75FF" />
|
||||
@@ -304,7 +312,7 @@ const handleMoveFocus = (target: 'pc' | 'mobile') => {
|
||||
"
|
||||
:platform="`${os.platformCode as Platform}`"
|
||||
class="!w-full"
|
||||
@click="handleSendLog(os.platformCode)"
|
||||
@click="handleSendLog(formatSnakeToTitle(os.platformCode))"
|
||||
>
|
||||
<span>{{ os.platformText }}</span>
|
||||
</BlocksButtonLauncher>
|
||||
@@ -388,7 +396,7 @@ const handleMoveFocus = (target: 'pc' | 'mobile') => {
|
||||
gameNo: gameData?.game_code?.toString(),
|
||||
locale: locale as string,
|
||||
}),
|
||||
handleSendLog('내 PC 사양 확인하기'),
|
||||
handleSendLog(t('Download_Button_SpecCheck', {}, { locale: 'ko' })),
|
||||
]"
|
||||
>
|
||||
<em
|
||||
|
||||
@@ -223,17 +223,12 @@ const handleSendLog = (item: string) => {
|
||||
click_item: item,
|
||||
click_sarea: props.pageVerTmplNameEn,
|
||||
}
|
||||
sendLog(locale.value, analytics)
|
||||
sendLog(locale.value, analytics, { useGA: true })
|
||||
}
|
||||
|
||||
const handlePreregistClick = () => {
|
||||
preregistModalRef.value?.handleOpenPreregist()
|
||||
handleSendLog(`STOVE_${t('Preregist_Btn_Preegist', {}, { locale: 'ko' })}`)
|
||||
}
|
||||
|
||||
const handleSnsButtonClick = (btn: { id: string; link: string }) => {
|
||||
csrGoExternalLink(btn.link)
|
||||
handleSendLog(btn.id)
|
||||
handleSendLog(`STOVE ${t('Preregist_Btn_Preegist', {}, { locale: 'ko' })}`)
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -324,7 +319,7 @@ const handleSnsButtonClick = (btn: { id: string; link: string }) => {
|
||||
:text-color="buttonColors.textColor"
|
||||
@click="
|
||||
handleSendLog(
|
||||
`${sns}_${t('Preregist_Btn_Preegist', {}, { locale: 'ko' })}`
|
||||
`${formatSnakeToTitle(sns)} ${t('Preregist_Btn_Preegist', {}, { locale: 'ko' })}`
|
||||
)
|
||||
"
|
||||
>
|
||||
|
||||
@@ -54,7 +54,7 @@ const secureCards = computed(() => {
|
||||
benefitIcon: '/images/common/img_OTP.png',
|
||||
buttonDisabled: false,
|
||||
url: tm('Secure_OtpLogin_Url'),
|
||||
analyticsItem: '스토브 인증기',
|
||||
analyticsItem: t('Secure_Stove_otp', {}, { locale: 'ko' }),
|
||||
},
|
||||
{
|
||||
id: 'SECURE_CARD_1',
|
||||
@@ -68,7 +68,7 @@ const secureCards = computed(() => {
|
||||
benefitIcon: '',
|
||||
buttonDisabled: false,
|
||||
url: tm('Secure_AbroadLogin_Url'),
|
||||
analyticsItem: '해외 로그인 차단',
|
||||
analyticsItem: t('Secure_Block_foreign_login', {}, { locale: 'ko' }),
|
||||
},
|
||||
{
|
||||
id: 'SECURE_CARD_2',
|
||||
@@ -82,7 +82,7 @@ const secureCards = computed(() => {
|
||||
benefitIcon: '',
|
||||
buttonDisabled: false,
|
||||
url: tm('Secure_PcRegister_Url'),
|
||||
analyticsItem: '지정 PC 관리',
|
||||
analyticsItem: t('Secure_Trusted_pc_management', {}, { locale: 'ko' }),
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
@@ -75,3 +75,29 @@ export const formatPathHost = (
|
||||
|
||||
return `${basePath}${path}`
|
||||
}
|
||||
|
||||
/**
|
||||
* snake_case 문자열을 Title Case로 변환합니다.
|
||||
* 짧은 단어(pc, stove 등)는 전체 대문자로 표시됩니다.
|
||||
* @param str 변환할 문자열 (예: "google_play", "pc", "stove")
|
||||
* @returns Title Case로 변환된 문자열 (예: "Google Play", "PC", "STOVE")
|
||||
*/
|
||||
export const formatSnakeToTitle = (str: string): string => {
|
||||
if (!str) return ''
|
||||
|
||||
// 전체 대문자로 표시할 단어 목록
|
||||
const uppercaseWords = ['pc', 'stove']
|
||||
|
||||
return str
|
||||
.split('_')
|
||||
.map(word => {
|
||||
const lowerWord = word.toLowerCase()
|
||||
// 특정 단어는 전체 대문자로 표시
|
||||
if (uppercaseWords.includes(lowerWord)) {
|
||||
return word.toUpperCase()
|
||||
}
|
||||
// 일반 단어는 첫 글자만 대문자
|
||||
return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
|
||||
})
|
||||
.join(' ')
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user