fix. 게임 실행 Flow에서 OS 체크하는 로직 추가
This commit is contained in:
@@ -37,7 +37,7 @@ const onInput = (event: Event) => {
|
||||
:type="typeof $attrs.type === 'string' ? $attrs.type : 'text'"
|
||||
:placeholder="props.placeholder"
|
||||
v-bind="$attrs"
|
||||
class="relative w-full h-[48px] px-[12px] outline-none border border-solid border-[1px] border-[#D9D9D9] rounded-[8px] bg-white text-left text-[#333333] text-[14px] font-[400] leading-[20px] tracking-[-0.42px] placeholder:text-[#B2B2B2] md:h-[56px] md:px-[16px] md:text-[16px] md:leading-[26px] md:tracking-[-0.48px] hover:[&:not([readonly])]:border-[#999999] focus:border-[#999999]"
|
||||
class="relative w-full h-[48px] px-[12px] outline-none border-solid border-[1px] border-[#D9D9D9] rounded-[8px] bg-white text-left text-[#333333] text-[14px] font-[400] leading-[20px] tracking-[-0.42px] placeholder:text-[#B2B2B2] md:h-[56px] md:px-[16px] md:text-[16px] md:leading-[26px] md:tracking-[-0.48px] hover:[&:not([readonly])]:border-[#999999] focus:border-[#999999]"
|
||||
@input="onInput"
|
||||
@keydown="emit('keydown', $event)"
|
||||
/>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
const showSnsList = ref(false)
|
||||
|
||||
const { tm } = useI18n()
|
||||
const gameDataStore = useGameDataStore()
|
||||
const modalStore = useModalStore()
|
||||
|
||||
@@ -33,9 +34,9 @@ const handleCopy = async () => {
|
||||
try {
|
||||
const url = window.location.href
|
||||
await navigator.clipboard.writeText(url)
|
||||
handleOpenToast('복사 성공')
|
||||
handleOpenToast(tm('Alert_Copy_Complete'))
|
||||
} catch (error) {
|
||||
console.error('복사 실패:', error)
|
||||
console.error('[handleCopy] Error:', error)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -6,9 +6,7 @@ const { toast } = modalStore
|
||||
<template>
|
||||
<Transition name="fade">
|
||||
<div v-if="toast.storeIsOpen" class="toast-container">
|
||||
<p class="toast-text">
|
||||
{{ toast.storeContentText }}
|
||||
</p>
|
||||
<p v-dompurify-html="toast.storeContentText" class="toast-text"></p>
|
||||
</div>
|
||||
</Transition>
|
||||
</template>
|
||||
|
||||
@@ -52,11 +52,11 @@ const hasActiveChild = (children?: GameDataMenuChildren) => {
|
||||
const isNavItemActive = (gnbItem: GameDataMenu): boolean => {
|
||||
const cur = currentPath.value
|
||||
const base = gnbItem?.url_path
|
||||
if(import.meta.client) {
|
||||
if (import.meta.client) {
|
||||
const selfActive =
|
||||
!!base &&
|
||||
isInternalUrl(base) &&
|
||||
pathMatches(formatPathWithoutLocale(base), cur)
|
||||
!!base &&
|
||||
isInternalUrl(base) &&
|
||||
pathMatches(formatPathWithoutLocale(base), cur)
|
||||
return selfActive || hasActiveChild(gnbItem.children)
|
||||
}
|
||||
}
|
||||
@@ -363,7 +363,7 @@ onBeforeUnmount(() => {
|
||||
|
||||
<style scoped>
|
||||
.header {
|
||||
@apply bg-theme-foreground text-theme-foreground-reversal relative z-[100];
|
||||
@apply bg-theme-foreground text-theme-foreground-reversal relative z-[200];
|
||||
}
|
||||
.game-wrap {
|
||||
@apply absolute flex w-full h-[48px] items-center whitespace-nowrap px-[52px] bg-theme-foreground sm:px-[72px] md:h-16 md:pl-0 md:pr-[40px]
|
||||
|
||||
@@ -83,9 +83,18 @@ export const useCheckGameStart = () => {
|
||||
}
|
||||
}
|
||||
|
||||
// OS 체크 함수 추가
|
||||
const checkWindowsOS = (): boolean => {
|
||||
// 서버 사이드 렌더링 중에는 navigator 객체가 없으므로, 항상 false를 반환하여 통과시킵니다.
|
||||
// 실제 OS 체크는 클라이언트 사이드에서만 의미가 있습니다.
|
||||
if (typeof navigator === 'undefined') {
|
||||
return false
|
||||
}
|
||||
return /windows/i.test(navigator.userAgent)
|
||||
}
|
||||
|
||||
// 런처 호출
|
||||
const runLauncher = async () => {
|
||||
// 클라이언트에서만 실행
|
||||
if (!import.meta.client) return
|
||||
|
||||
const gameDataStore = useGameDataStore()
|
||||
@@ -141,6 +150,14 @@ export const useCheckGameStart = () => {
|
||||
const validateLauncher = () => {
|
||||
if (isProcessing.value) return
|
||||
|
||||
const isWindowsOS = checkWindowsOS()
|
||||
if (!isWindowsOS) {
|
||||
modalStore.handleOpenAlert({
|
||||
contentText: tm('Alert_Client_Window'),
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
isProcessing.value = true
|
||||
debounceHandler()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user