fix. 불필요한 파일 제거

This commit is contained in:
clkim
2025-11-03 16:19:00 +09:00
parent 4487d2e34f
commit 9f1fbbeec1
3 changed files with 50 additions and 165 deletions

View File

@@ -9,7 +9,7 @@ const { gameData } = useGameDataStore()
const stoveInflowPath = runtimeConfig.public.stoveInflowPath const stoveInflowPath = runtimeConfig.public.stoveInflowPath
const stoveGameNo = runtimeConfig.public.stoveGameNo const stoveGameNo = runtimeConfig.public.stoveGameNo
const gnbData = gameData?.stove_gnb_json const stoveGnbData = gameData?.stove_gnb_json
const languageCodes = computed(() => { const languageCodes = computed(() => {
if (Array.isArray(availableLocales)) { if (Array.isArray(availableLocales)) {
@@ -24,9 +24,9 @@ const loadGnb = (locale: string) => {
locale = locale.toLowerCase() locale = locale.toLowerCase()
const gnbOption = { const gnbOption = {
wrapper: '#stove-wrapper', wrapper: '#stove-wrap',
isResponsive: true, isResponsive: true,
skin: gnbData?.skin_type || 'gnb-dark-mini', skin: stoveGnbData?.skin_type || 'gnb-dark-mini',
widget: { widget: {
gameListAndService: false, gameListAndService: false,
languageSelect: false, languageSelect: false,
@@ -42,7 +42,7 @@ const loadGnb = (locale: string) => {
params: { params: {
inflow_path: stoveInflowPath, inflow_path: stoveInflowPath,
game_no: stoveGameNo, game_no: stoveGameNo,
show_play_button: gnbData?.stove_install_button_visible || 'Y', show_play_button: stoveGnbData?.stove_install_button_visible || 'Y',
}, },
redirectCurrentPage: true, redirectCurrentPage: true,
windowTitle: undefined, windowTitle: undefined,
@@ -66,5 +66,5 @@ onBeforeUnmount(() => {
</script> </script>
<template> <template>
<div id="stove-wrapper" class="relative z-[5]" /> <div id="stove-wrap" class="relative z-[5]" />
</template> </template>

View File

@@ -1,55 +1,52 @@
<template>
<div id="stove-wrapper" class="relative z-[5]" />
</template>
<script setup lang="ts"> <script setup lang="ts">
import type { import type { GameDataValue } from '#layers/types/api/gameData'
GameDataValue,
} from '#layers/types/api/gameData'
let mountedInstance: any = null let mountedInstance: any = null
onMounted(() => { onMounted(() => {
const gameDataStore = useGameDataStore() const gameDataStore = useGameDataStore()
const gameData = gameDataStore.gameData as GameDataValue const gameData = gameDataStore.gameData as GameDataValue
const langCodes = gameData?.lang_codes const langCodes = gameData?.lang_codes
const defaultLangCode = gameData?.default_lang_code const defaultLangCode = gameData?.default_lang_code
const gnbData = gameData?.stove_gnb_json const stoveGnbData = gameData?.stove_gnb_json
const currentDomain = window.location.protocol + '//' + window.location.hostname; const currentDomain =
if (typeof window !== 'undefined' && (window as any).StoveGnb) { window.location.protocol + '//' + window.location.hostname
mountedInstance = (window as any).StoveGnb.mount('#stove-wrapper', { if (typeof window !== 'undefined' && (window as any).StoveGnb) {
logArea: currentDomain, mountedInstance = (window as any).StoveGnb.mount('#stove-wrap', {
useLanguageCodeFromPath: true, logArea: currentDomain,
serviceTitle: { useLanguageCodeFromPath: true,
pc: '', serviceTitle: {
mobile: '' pc: '',
mobile: '',
},
widget: {
notification: true,
stoveDownload: true,
languageSelect: false,
themeSelect: false,
stoveMenu: {
active: false,
mobile: true,
}, },
widget: { },
notification: true, global: {
stoveDownload: true, languageCoverages: langCodes,
languageSelect: false, defaultSelectedLanguage: defaultLangCode || 'en',
themeSelect: false, },
stoveMenu: { loginMethod: {
active: false, redirectCurrentPage: true,
mobile: true },
}, mode: {
}, theme: {
global: { default:
languageCoverages: langCodes, stoveGnbData?.skin_type === 'gnb-dark-mini' ? 'dark' : 'light',
defaultSelectedLanguage: defaultLangCode || 'en', support: ['dark', 'light'],
},
loginMethod: {
redirectCurrentPage: true,
},
mode: {
theme: {
default: gnbData?.skin_type === 'gnb-dark-mini' ? 'dark' : 'light',
support: ['dark', 'light'],
},
mini: true,
fixed:false,
}, },
mini: true,
fixed: false,
},
}) })
} }
}) })
onBeforeUnmount(() => { onBeforeUnmount(() => {
@@ -59,3 +56,6 @@ onBeforeUnmount(() => {
mountedInstance = null mountedInstance = null
}) })
</script> </script>
<template>
<div id="stove-wrap" class="relative z-[5]" />
</template>

View File

@@ -1,115 +0,0 @@
import { defineStore } from 'pinia'
import { useWindowSize, useWindowScroll } from '@vueuse/core'
interface DeviceMode {
mode: 'desktop' | 'mobile'
browser: 'chrome' | 'crawler' | 'edge' | 'firefox' | 'safari' | null
isDesktop: boolean
isMobile: boolean
isTablet: boolean
isIos: boolean
isAndroid: boolean
isDeviceReady: boolean
}
export const useCommonStore = defineStore('commonStore', () => {
const stoveGnbHeight = 48
const useDeviceData = useDevice()
const { width: windowWidth, height: windowHeight } = useWindowSize()
const { x: windowX, y: windowY } = useWindowScroll({ behavior: 'smooth' })
const device = ref<DeviceMode>({
mode: useDeviceData.isMobile || useDeviceData.isTablet ? 'mobile' : 'desktop',
browser: useDeviceData.isChrome
? 'chrome'
: useDeviceData.isCrawler
? 'crawler'
: useDeviceData.isEdge
? 'edge'
: useDeviceData.isFirefox
? 'firefox'
: useDeviceData.isSafari
? 'safari'
: null,
isDesktop: useDeviceData.isDesktop,
isMobile: useDeviceData.isMobile,
isTablet: useDeviceData.isTablet,
isIos: useDeviceData.isIos,
isAndroid: useDeviceData.isAndroid,
isDeviceReady: false
})
const isPassedStoveGnb = ref(false)
const scrollFixedXValue = ref('0px')
const footerRef = ref<HTMLElement | null>(null)
const isLoading = ref<boolean>(true)
const isScrollLock = ref<boolean>(false)
const updateDeviceMode = () => {
device.value.mode = useDeviceData.isMobile || useDeviceData.isTablet ? 'mobile' : 'desktop'
device.value.browser = useDeviceData.isChrome
? 'chrome'
: useDeviceData.isCrawler
? 'crawler'
: useDeviceData.isEdge
? 'edge'
: useDeviceData.isFirefox
? 'firefox'
: useDeviceData.isSafari
? 'safari'
: null
device.value.isDesktop = useDeviceData.isDesktop
device.value.isMobile = useDeviceData.isMobile
device.value.isTablet = useDeviceData.isTablet
device.value.isIos = useDeviceData.isIos
device.value.isAndroid = useDeviceData.isAndroid
device.value.isDeviceReady = true
}
const updateIsPassedStoveGnb = () => {
isPassedStoveGnb.value = windowY.value >= stoveGnbHeight
if (isPassedStoveGnb.value) {
scrollFixedXValue.value = `-${windowX.value}px`
} else {
scrollFixedXValue.value = '0px'
}
}
const isLoadingComplete = () => {
isLoading.value = false
}
const scrollLock = () => {
isScrollLock.value = !isScrollLock.value
}
const addScrollLock = () => {
isScrollLock.value = true
}
const removeScrollLock = () => {
isScrollLock.value = false
}
return {
device,
windowWidth,
windowHeight,
windowX,
windowY,
isPassedStoveGnb,
scrollFixedXValue,
footerRef,
isLoading,
isScrollLock,
updateDeviceMode,
updateIsPassedStoveGnb,
isLoadingComplete,
scrollLock,
addScrollLock,
removeScrollLock
}
})