Merge commit 'ea5f31acffc6466a035d1b2cf41d0ec93d7e8512' into feature/20260130_cl_SWV-811
This commit is contained in:
@@ -8,7 +8,7 @@ const gameDataStore = useGameDataStore()
|
||||
const modalStore = useModalStore()
|
||||
const { sendLog } = useAnalytics()
|
||||
|
||||
const { gameData } = storeToRefs(gameDataStore)
|
||||
const { gameData, snsJson } = storeToRefs(gameDataStore)
|
||||
const { handleOpenToast } = modalStore
|
||||
|
||||
const analytics = {
|
||||
@@ -22,9 +22,6 @@ const snsBackgroundColor = computed(() => {
|
||||
const colorCode = getColorCodeFromData(colorData, 'none')
|
||||
return colorCode
|
||||
})
|
||||
const snsList = computed(() => {
|
||||
return gameData.value?.sns_json
|
||||
})
|
||||
|
||||
const handleControlForce = (state: boolean) => {
|
||||
showSnsList.value = state
|
||||
@@ -45,7 +42,7 @@ const handleCopy = async () => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="Object.keys(snsList).length > 0" class="sns-container">
|
||||
<div v-if="Object.keys(snsJson).length > 0" class="sns-container">
|
||||
<transition name="fade">
|
||||
<AtomsButtonCircle
|
||||
v-show="!showSnsList"
|
||||
@@ -63,7 +60,7 @@ const handleCopy = async () => {
|
||||
class="sns-list"
|
||||
:style="{ backgroundColor: snsBackgroundColor }"
|
||||
>
|
||||
<template v-for="(item, key) in snsList" :key="key">
|
||||
<template v-for="(item, key) in snsJson" :key="key">
|
||||
<a
|
||||
v-if="item.use_yn === 1 && item.url"
|
||||
:href="item.url"
|
||||
|
||||
@@ -20,7 +20,7 @@ const scrollStore = useScrollStore()
|
||||
const breakpoints = useResponsiveBreakpoints()
|
||||
const { sendLog } = useAnalytics()
|
||||
|
||||
const { gameData } = storeToRefs(gameDataStore)
|
||||
const { gameName, imgJson, gnb, eventBanner } = storeToRefs(gameDataStore)
|
||||
const { pageLayoutType } = storeToRefs(pageDataStore)
|
||||
const { isPassedStoveGnb } = storeToRefs(scrollStore)
|
||||
|
||||
@@ -35,18 +35,18 @@ const navWidth = ref(0)
|
||||
const officialItemWidths = ref<number[]>([])
|
||||
const overflowCount = ref<number>(0)
|
||||
|
||||
const gnbData = computed(() => gameData.value?.gnb)
|
||||
const biSmallPath = computed(() => imgJson.value?.bi_small)
|
||||
const gnbMenusCount = computed(() => {
|
||||
const menus = gnbData.value?.menus
|
||||
const menus = gnb.value?.menus
|
||||
if (!menus || typeof menus !== 'object') return 0
|
||||
return Object.keys(menus).length
|
||||
})
|
||||
const currentPath = computed(() => formatPathWithoutLocale(route.path))
|
||||
const start1depthData = computed(
|
||||
() => gnbData.value?.buttons[0]?.button_json as GameDataResourceGroup
|
||||
() => gnb.value?.buttons[0]?.button_json as GameDataResourceGroup
|
||||
)
|
||||
const start2depthData = computed(
|
||||
() => gnbData.value?.buttons[1]?.button_json as GameDataResourceGroupSet
|
||||
() => gnb.value?.buttons[1]?.button_json as GameDataResourceGroupSet
|
||||
)
|
||||
|
||||
// 자식 중 활성 링크 존재 여부 확인
|
||||
@@ -60,7 +60,7 @@ const hasActiveChild = (children?: GameDataMenuChildren) => {
|
||||
// navAreaRef의 넓이를 구하는 함수
|
||||
const calculateNavWidth = () => {
|
||||
if (!import.meta.client) return
|
||||
if (!navAreaRef.value || !gnbData.value) return 0
|
||||
if (!navAreaRef.value || !gnb.value) return 0
|
||||
|
||||
const navAreaWidth = navAreaRef.value.offsetWidth
|
||||
navWidth.value = navAreaWidth + MORE_WIDTH
|
||||
@@ -179,20 +179,17 @@ onMounted(() => {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<header :class="['header', { 'empty-game': !gnbData }]">
|
||||
<header :class="['header', { 'empty-game': !gnb }]">
|
||||
<BlocksStoveGnb class="h-[48px]" />
|
||||
<div
|
||||
v-if="gnbData"
|
||||
:class="['game-wrap', { 'is-fixed': isPassedStoveGnb }]"
|
||||
>
|
||||
<div v-if="gnb" :class="['game-wrap', { 'is-fixed': isPassedStoveGnb }]">
|
||||
<AtomsLocaleLink
|
||||
to="/home"
|
||||
class="mx-auto md:hidden"
|
||||
@click="handleSendLog('BI')"
|
||||
>
|
||||
<img
|
||||
:src="formatPathHost(gnbData?.bi_path)"
|
||||
:alt="gameData?.game_name"
|
||||
:src="formatPathHost(biSmallPath)"
|
||||
:alt="gameName"
|
||||
class="h-[30px]"
|
||||
/>
|
||||
</AtomsLocaleLink>
|
||||
@@ -211,8 +208,8 @@ onMounted(() => {
|
||||
@click="[handleMenuClose(), handleSendLog('BI')]"
|
||||
>
|
||||
<img
|
||||
:src="formatPathHost(gnbData?.bi_path)"
|
||||
:alt="gameData?.game_name"
|
||||
:src="formatPathHost(biSmallPath)"
|
||||
:alt="gameName"
|
||||
class="h-[30px]"
|
||||
/>
|
||||
</AtomsLocaleLink>
|
||||
@@ -221,7 +218,7 @@ onMounted(() => {
|
||||
<template v-if="gnbMenusCount > 0">
|
||||
<div class="official custom-theme-scrollbar">
|
||||
<div
|
||||
v-for="(gnbItem, key) in gnbData?.menus"
|
||||
v-for="(gnbItem, key) in gnb?.menus"
|
||||
:key="key"
|
||||
class="nav-item group"
|
||||
:class="{
|
||||
@@ -291,7 +288,7 @@ onMounted(() => {
|
||||
<div class="more-list">
|
||||
<div class="list-inner">
|
||||
<div
|
||||
v-for="(gnbItem, key) in gnbData?.menus"
|
||||
v-for="(gnbItem, key) in gnb?.menus"
|
||||
:key="key"
|
||||
:class="{
|
||||
'is-hidden':
|
||||
@@ -349,15 +346,11 @@ onMounted(() => {
|
||||
</div>
|
||||
</template>
|
||||
<ClientOnly>
|
||||
<div v-if="gameData?.event_banner" class="event">
|
||||
<div v-if="eventBanner" class="event">
|
||||
<div class="nav-item">
|
||||
<AtomsLocaleLink
|
||||
:to="gameData?.event_banner?.page_url"
|
||||
:target="
|
||||
gameData?.event_banner?.link_type === 1
|
||||
? '_self'
|
||||
: '_blank'
|
||||
"
|
||||
:to="eventBanner?.page_url"
|
||||
:target="eventBanner?.link_type === 1 ? '_self' : '_blank'"
|
||||
:class="[
|
||||
'nav-1depth',
|
||||
{ 'router-link-active': pageLayoutType === 'promotion' },
|
||||
|
||||
@@ -26,12 +26,12 @@ const {
|
||||
setPreregist,
|
||||
} = usePreregist()
|
||||
|
||||
const { gameData } = storeToRefs(gameDataStore)
|
||||
const { gameId, gameName } = storeToRefs(gameDataStore)
|
||||
const { sendLog } = useAnalytics()
|
||||
|
||||
// Constants
|
||||
const stoveCs = runtimeConfig.public.stoveCs
|
||||
const customerServiceUrl = `${stoveCs}/${gameData.value?.game_id}`
|
||||
const customerServiceUrl = `${stoveCs}/${gameId.value}`
|
||||
|
||||
/**
|
||||
* 번역 함수 (Props로 전달받은 tm 또는 key 반환)
|
||||
@@ -57,8 +57,7 @@ const errorMessages = computed<Record<number, string>>(() => ({
|
||||
const tmWithGameName = (key: string): string => {
|
||||
const text = tm(key)
|
||||
if (typeof text === 'string' && text.includes('%게임명%')) {
|
||||
const gameName = gameData.value?.game_name ?? ''
|
||||
return text.replace(/%게임명%/g, gameName)
|
||||
return text.replace(/%게임명%/g, gameName.value)
|
||||
}
|
||||
return text
|
||||
}
|
||||
@@ -375,7 +374,7 @@ defineExpose({
|
||||
<h3
|
||||
class="text-xl font-bold leading-[30px] tracking-[-0.6px] text-[#ebebeb] md:text-2xl md:leading-[34px] md:tracking-[-0.72px]"
|
||||
>
|
||||
{{ gameData?.game_name }}
|
||||
{{ gameName }}
|
||||
</h3>
|
||||
<p
|
||||
class="text-[13px] font-normal leading-[22px] tracking-[-0.325px] text-[#ebebeb] md:text-[15px] md:leading-6 md:tracking-[-0.45px]"
|
||||
|
||||
Reference in New Issue
Block a user