feat(game-ui): 토너먼트와 베팅 메뉴를 합치고 화면 설정을 분리한다
토너먼트 기본 동작과 베팅 선택을 split 메뉴로 묶고 빈 국가 메뉴 칸에 화면 설정을 배치한다. 내 정보 화면에는 게임 상태 설정만 남기며 화면 폭, 모바일 패널 순서, 개인 CSS는 기기별 전용 화면에서 관리한다.
This commit is contained in:
@@ -37,7 +37,9 @@ const { setRoot, openId, close, toggle } = useMenuPopup();
|
||||
const globalEntries = computed(() => buildGlobalNavigation(props.npcMode, props.entries));
|
||||
const nationMenuColor = computed(() => props.nationColor || '#000000');
|
||||
const nationMenuTextColor = computed(() => legacyNationTextColor(nationMenuColor.value));
|
||||
const isActive = (link: MainNavigationLinkItem) => link.highlightStage === props.tournamentStage;
|
||||
const isActive = (link: MainNavigationLinkItem) =>
|
||||
link.highlightStage === props.tournamentStage ||
|
||||
link.highlightStages?.some((stage) => stage === props.tournamentStage) === true;
|
||||
|
||||
const onQuick = (item: QuickNavigationItem) => {
|
||||
close();
|
||||
@@ -165,6 +167,7 @@ const onAction = (action: NonNullable<MainNavigationLinkItem['action']>) => {
|
||||
<MainNavigationLink
|
||||
:link="item"
|
||||
:enabled="isNationNavigationEnabled(item, access)"
|
||||
:active="isActive(item)"
|
||||
compact
|
||||
role="menuitem"
|
||||
@navigate="close()"
|
||||
|
||||
@@ -16,7 +16,9 @@ const props = defineProps<{
|
||||
}>();
|
||||
|
||||
const { setRoot, openId, close, toggle } = useMenuPopup();
|
||||
const isActive = (link: MainNavigationLinkItem) => link.highlightStage === props.tournamentStage;
|
||||
const isActive = (link: MainNavigationLinkItem) =>
|
||||
link.highlightStage === props.tournamentStage ||
|
||||
link.highlightStages?.some((stage) => stage === props.tournamentStage) === true;
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -59,6 +61,7 @@ const isActive = (link: MainNavigationLinkItem) => link.highlightStage === props
|
||||
<MainNavigationLink
|
||||
:link="item"
|
||||
:enabled="isNationNavigationEnabled(item, access)"
|
||||
:active="isActive(item)"
|
||||
role="menuitem"
|
||||
@navigate="close()"
|
||||
/>
|
||||
|
||||
@@ -12,6 +12,7 @@ export type MainNavigationLink = RuntimeNavigationLink & {
|
||||
compactLabel?: string;
|
||||
access?: NationAccessRule;
|
||||
highlightStage?: 1 | 6;
|
||||
highlightStages?: readonly [1, 6];
|
||||
unavailableReason?: string;
|
||||
};
|
||||
|
||||
@@ -144,14 +145,38 @@ export const nationNavigation: MainNavigationEntry[] = [
|
||||
access: 'nation-secret',
|
||||
},
|
||||
{
|
||||
kind: 'link',
|
||||
id: 'tournament',
|
||||
label: '토 너 먼 트',
|
||||
compactLabel: '토너먼트',
|
||||
to: '/tournament',
|
||||
newTab: true,
|
||||
access: 'always',
|
||||
highlightStage: 1,
|
||||
kind: 'split',
|
||||
id: 'tournament-betting',
|
||||
main: {
|
||||
kind: 'link',
|
||||
id: 'tournament',
|
||||
label: '토 너 먼 트',
|
||||
compactLabel: '토너먼트',
|
||||
to: '/tournament',
|
||||
newTab: true,
|
||||
access: 'always',
|
||||
highlightStages: [1, 6],
|
||||
},
|
||||
items: [
|
||||
{
|
||||
kind: 'link',
|
||||
id: 'tournament-menu',
|
||||
label: '토너먼트',
|
||||
to: '/tournament',
|
||||
newTab: true,
|
||||
access: 'always',
|
||||
highlightStage: 1,
|
||||
},
|
||||
{
|
||||
kind: 'link',
|
||||
id: 'betting',
|
||||
label: '베팅장',
|
||||
to: '/betting',
|
||||
newTab: true,
|
||||
access: 'always',
|
||||
highlightStage: 6,
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
kind: 'link',
|
||||
@@ -218,16 +243,7 @@ export const nationNavigation: MainNavigationEntry[] = [
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
kind: 'link',
|
||||
id: 'betting',
|
||||
label: '베 팅 장',
|
||||
compactLabel: '베팅장',
|
||||
to: '/betting',
|
||||
newTab: true,
|
||||
access: 'always',
|
||||
highlightStage: 6,
|
||||
},
|
||||
{ kind: 'link', id: 'my-settings', label: '화면 설정', to: '/my-settings', access: 'always' },
|
||||
];
|
||||
|
||||
export const quickNavigation: Array<QuickNavigationItem | MainNavigationDivider> = [
|
||||
|
||||
Reference in New Issue
Block a user