feat: 에러 추가 중

This commit is contained in:
“hyeonggkim”
2025-10-27 21:18:12 +09:00
parent 1f72069418
commit 470d8a62c7
9 changed files with 494 additions and 126 deletions

View File

@@ -24,12 +24,12 @@
</li>
<li class="relative">
<button class="hover:text-gray-600 transition-colors" @click="toggleAgeRating">
{{ tm('Footer_AgeRating') }}
{{ footerAgeRating }}
</button>
<div v-if="showAgeRating" class="game-rating-card absolute bottom-6 left-1/2 -translate-x-1/2 bg-[#383838] rounded-lg w-[340px] mx-auto z-10">
<!-- 헤더 -->
<div class="px-6 py-4 rounded-t-lg flex justify-between items-center">
<h3 class="text-white text-base">{{ tm('Footer_AgeRating') }}</h3>
<h3 class="text-white text-base">{{ footerAgeRating }}</h3>
<button class="text-white hover:text-gray-300 transition-colors" @click="toggleAgeRating">
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"></path>
@@ -55,23 +55,23 @@
<div class="px-6 py-6 rounded-b-lg bg-[#A31639]">
<div class="space-y-2">
<div class="flex flex-start border-b border-white/10 pb-2">
<span class="text-white text-sm flex-1">{{ tm('Footer_AgeRating_Info')[0] }}</span>
<span class="text-white text-sm flex-1">{{ footerAgeRatingInfo[0] }}</span>
<span class="text-white text-sm flex-1">{{ footerData.game_rating_info.company_name }}</span>
</div>
<div class="flex flex-start border-b border-white/10 pb-2">
<span class="text-white text-sm flex-1">{{ tm('Footer_AgeRating_Info')[1] }}</span>
<span class="text-white text-sm flex-1">{{ footerAgeRatingInfo[1] }}</span>
<span class="text-white text-sm flex-1">{{ footerData.game_rating_info.rating_grade }}</span>
</div>
<div class="flex flex-start border-b border-white/10 pb-2">
<span class="text-white text-sm flex-1">{{ tm('Footer_AgeRating_Info')[2] }}</span>
<span class="text-white text-sm flex-1">{{ footerAgeRatingInfo[2] }}</span>
<span class="text-white text-sm flex-1">{{ footerData.game_rating_info.reg_no }}</span>
</div>
<div class="flex flex-start border-b border-white/10 pb-2">
<span class="text-white text-sm flex-1">{{ tm('Footer_AgeRating_Info')[3] }}</span>
<span class="text-white text-sm flex-1">{{ footerAgeRatingInfo[3] }}</span>
<span class="text-white text-sm flex-1">{{ footerData.game_rating_info.prod_date }}</span>
</div>
<div class="flex flex-start">
<span class="text-white text-sm flex-1">{{ tm('Footer_AgeRating_Info')[4] }}</span>
<span class="text-white text-sm flex-1">{{ footerAgeRatingInfo[4] }}</span>
<span class="text-white text-sm flex-1">{{ footerData.game_rating_info.rating_class_no }}</span>
</div>
</div>
@@ -85,7 +85,7 @@
<address class="not-italic text-gray-500">
<div class="row my-1.5 leading-5">
<span
v-dompurify-html="tm('Footer_Address')"
v-dompurify-html="footerAddress"
class="[&_a]:cursor-pointer [&_a]:text-blue-500 [&_a]:underline"
></span>
</div>
@@ -93,11 +93,11 @@
</div>
<div class="mt-6 md:mt-6">
<div class="text-xs text-white/30">{{ tm('Footer_caution') }}</div>
<div class="text-xs text-white/30">{{ footerCaution }}</div>
</div>
<div class="copyright-area mt-6 text-gray-500 md:mt-4">
<span>{{ tm('Footer_Copyright') }}</span>
<span>&copy; Smilegate. All rights reserved</span>
</div>
<div class="logo-area flex mt-6 md:mt-6">
@@ -144,10 +144,11 @@
</template>
<script setup lang="ts">
const config = useRuntimeConfig()
const staticUrl = config.public.staticUrl
// const runType = config.public.runType
const runType = config.public.runType
const translationApi = `${runType}/test/multilingual/test_common_template.json`
const result = await useApiData({ baseApiUrl: staticUrl, url: translationApi })
@@ -162,74 +163,126 @@ const { tm } = useI18n({
const gameDataStore = useGameDataStore()
const { gameData } = storeToRefs(gameDataStore)
const commonResourceUrl = `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common`
// 공통다국어 data
const footerLinks = computed(() => {
return tm('Footer_Menu') as unknown as any[]
})
const footerData = ref(gameData.value?.footer_json as any)
// 타입 정의
interface FooterMenuItem {
title: string
url: string
target?: string
active?: string
}
const setDevCi = ref({
interface GameRatingInfo {
company_name: string
rating_grade: string
reg_no: string
prod_date: string
rating_class_no: string
rating_type: string
content_info: string
}
interface FooterData {
game_rating_info: GameRatingInfo
use_dev_ci_url?: string
}
interface DevCiConfig {
dev_ci_yn: boolean
dev_ci_img_path: string
}
// 공통다국어 data
const footerLinks = computed((): FooterMenuItem[] => {
const menu = (tm as any)('Footer_Menu')
return Array.isArray(menu) ? menu as FooterMenuItem[] : []
})
const footerData = ref(gameData.value?.footer_json as unknown as FooterData)
const setDevCi = ref<DevCiConfig>({
dev_ci_yn: gameData.value?.footer_dev_ci_img_yn as boolean,
dev_ci_img_path: gameData.value?.footer_dev_ci_img_path as string,
})
///local/template/common/grades_age
const getGameRatingImage = computed(() => {
const getGameRatingImage = computed((): string[] => {
const contentInfo = footerData.value.game_rating_info.rating_type.split(',')
// rating_type 12, 15, 18, 19 에 따라 이미지명을 가져오고 이미지를 반환
return contentInfo.map(item => {
switch (item) {
case '12':
return `${commonResourceUrl}/grades_age/Type12.svg`
case '15':
return `${commonResourceUrl}/grades_age/Type15.svg`
case '19':
return `${commonResourceUrl}/grades_age/Type19.svg`
case 'all':
return `${commonResourceUrl}/grades_age/TypeAll.svg`
case 'e':
return `${commonResourceUrl}/grades_age/TypeExempt.svg`
default:
return `${commonResourceUrl}/grades_age/TypeTest.svg`
if (item === '12') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/Type12.svg`
} else if (item === '15') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/Type15.svg`
} else if (item === '19') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/Type19.svg`
} else if (item === 'all') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/TypeAll.svg`
} else if (item === 'e') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/TypeExempt.svg`
} else {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_age/TypeTest.svg`
}
})
})
const getContentInfoImage = computed(() => {
const getContentInfoImage = computed((): string[] => {
const contentInfo = footerData.value.game_rating_info.content_info.split(',')
contentInfo.pop()
return contentInfo.map(item => {
switch (item) {
case '1':
return `${commonResourceUrl}/grades_use/Type-sexual.svg`
case '2':
return `${commonResourceUrl}/grades_use/Type-fear.svg`
case '3':
return `${commonResourceUrl}/grades_use/Type-inapposite.svg`
case '4':
return `${commonResourceUrl}/grades_use/Type-drug.svg`
case '5':
return `${commonResourceUrl}/grades_use/Type-crime.svg`
case '6':
return `${commonResourceUrl}/grades_use/Type-speculation.svg`
case '7':
return `${commonResourceUrl}/grades_use/Type-violence.svg`
default:
return ''
if (item === '1') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-sexual.svg`
} else if (item === '2') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-fear.svg`
} else if (item === '3') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-inapposite.svg`
} else if (item === '4') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-drug.svg`
} else if (item === '5') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-crime.svg`
} else if (item === '6') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-speculation.svg`
} else if (item === '7') {
return `${staticUrl}/local/template/${gameData.value.s3_folder_name}/common/grades_use/Type-violence.svg`
}
})
})
const showAgeRating = ref(false)
const toggleAgeRating = () => {
const showAgeRating = ref<boolean>(false)
const toggleAgeRating = (): void => {
showAgeRating.value = !showAgeRating.value
}
// 템플릿에서 사용할 다국어 텍스트들
const footerAgeRating = computed((): string => {
const text = (tm as any)('Footer_AgeRating')
return typeof text === 'string' ? text : ''
})
const footerAgeRatingInfo = computed((): string[] => {
const info = (tm as any)('Footer_AgeRating_Info')
return Array.isArray(info) ? info : []
})
const footerAddress = computed((): string => {
const address = (tm as any)('Footer_Address')
return typeof address === 'string' ? address : ''
})
const footerCaution = computed((): string => {
const caution = (tm as any)('Footer_caution')
return typeof caution === 'string' ? caution : ''
})
</script>
<style scoped>
/* 태국어 폰트 크기 조정 */
@media (max-width: 411px) {
:global(.lang-th) .menu-area li {
font-size: 10px;
}
}
@media (max-width: 321px) {
:global(.lang-th) .menu-area li {
font-size: 9px;
}
}
</style>