예약 명령 인자 입력을 전체화면 overlay로 전환
Ref v_processing처럼 인자가 필요한 장수·사령턴 명령은 작은 popup 대신 body 위 전체화면 dialog에서 입력한다. 명령 목록 단계는 기존 popup을 유지한다. - 상단 막대: 명령 취소 · 명령 다시 선택 · 명령명과 대상 턴 · 검색 켜짐/꺼짐 - 검색 토글 상태를 useCommandTargetSearchEnabled()로 폼과 공유 - URL은 유지하고 같은 URL의 history entry로 Back이 overlay만 닫게 함 - 1120px 이상에서는 원본 700px 지도와 대상 목록을 두 열로 배치 - 징병·모병 sticky 기준을 공용 header 높이 변수로 연결 - e2e를 전체화면 계약에 맞게 갱신하고 overlay·Back·geometry 테스트 추가 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
9d0a1a4add
commit
a373ed327d
7 files changed
+613
-278
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import { useStorage } from '@vueuse/core';
|
||||
import { effectScope, type Ref } from 'vue';
|
||||
|
||||
import type { CommandInputField } from '../components/command/types';
|
||||
|
||||
// Ref TopBackBar의 `검색 켜짐/꺼짐`은 처리 화면 상단에 있고 목록 선택기가 그 값을 받는다.
|
||||
// Core도 상단 바와 인자 폼이 같은 ref를 공유하도록 모듈 단위로 한 번만 만든다.
|
||||
// 처음 호출한 component가 unmount되어도 저장 watch가 멈추지 않게 분리된 scope에 둔다.
|
||||
let searchEnabled: Ref<boolean> | undefined;
|
||||
|
||||
export const useCommandTargetSearchEnabled = (): Ref<boolean> => {
|
||||
searchEnabled ??= effectScope(true).run(() => useStorage('sam.core.commandTargetSearch', false));
|
||||
if (!searchEnabled) throw new Error('command target search state was not created');
|
||||
return searchEnabled;
|
||||
};
|
||||
|
||||
export const isCommandTargetSearchField = (field: CommandInputField): boolean =>
|
||||
field.kind === 'select' && ['generals', 'cities', 'nations'].includes(field.optionSource ?? '');
|
||||
Reference in new issue
Block a user