feat(game-ui): 토너먼트 단계별 메인 메뉴를 전환한다
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
<script setup lang="ts">
|
||||
import { computed } from 'vue';
|
||||
import MainNavigationLink from './MainNavigationLink.vue';
|
||||
import {
|
||||
buildNationNavigation,
|
||||
isNationNavigationEnabled,
|
||||
nationNavigation,
|
||||
type MainNavigationLink as MainNavigationLinkItem,
|
||||
type NationNavigationAccess,
|
||||
} from './mainNavigation';
|
||||
@@ -12,10 +13,12 @@ import { legacyNationTextColor } from '../../utils/legacyNationColor';
|
||||
const props = defineProps<{
|
||||
access: NationNavigationAccess;
|
||||
tournamentStage: number;
|
||||
tournamentType: number | null;
|
||||
nationColor: string;
|
||||
}>();
|
||||
|
||||
const { setRoot, openId, close, toggle } = useMenuPopup();
|
||||
const entries = computed(() => buildNationNavigation(props.tournamentStage, props.tournamentType));
|
||||
const isActive = (link: MainNavigationLinkItem) =>
|
||||
link.highlightStage === props.tournamentStage ||
|
||||
link.highlightStages?.some((stage) => stage === props.tournamentStage) === true;
|
||||
@@ -29,7 +32,7 @@ const isActive = (link: MainNavigationLinkItem) =>
|
||||
:class="{ 'dark-label': legacyNationTextColor(nationColor) === '#000000' }"
|
||||
aria-label="국가 메뉴"
|
||||
>
|
||||
<template v-for="entry in nationNavigation" :key="entry.id">
|
||||
<template v-for="entry in entries" :key="entry.id">
|
||||
<MainNavigationLink
|
||||
v-if="entry.kind === 'link'"
|
||||
:link="entry"
|
||||
|
||||
Reference in New Issue
Block a user