-
레거시 지도 렌더러 이식 대기
-
@@ -140,22 +206,41 @@ const mapSummary = computed(() => {
}
.map-body {
- display: grid;
- gap: 12px;
+ display: flex;
+ flex-direction: column;
+ gap: 8px;
+}
+
+.map-area {
+ position: relative;
+ border: 1px dashed rgba(201, 164, 90, 0.4);
+ background: rgba(16, 16, 16, 0.6);
+ overflow: hidden;
}
.map-placeholder {
- border: 1px dashed rgba(201, 164, 90, 0.4);
- padding: 12px;
- display: flex;
- flex-direction: column;
- gap: 6px;
- background: rgba(16, 16, 16, 0.6);
+ position: absolute;
+ top: 8px;
+ left: 8px;
+ font-size: 0.7rem;
+ color: rgba(232, 221, 196, 0.6);
}
-.map-placeholder-text {
- font-size: 0.85rem;
- color: rgba(232, 221, 196, 0.8);
+.map-tooltip {
+ position: absolute;
+ pointer-events: none;
+ border: 1px solid rgba(201, 164, 90, 0.4);
+ background: rgba(16, 16, 16, 0.9);
+ padding: 4px 6px;
+ font-size: 0.65rem;
+}
+
+.tooltip-title {
+ font-weight: 600;
+}
+
+.tooltip-body {
+ color: rgba(232, 221, 196, 0.6);
}
.map-meta {
@@ -165,44 +250,9 @@ const mapSummary = computed(() => {
color: rgba(232, 221, 196, 0.6);
}
-.city-list {
- display: flex;
- flex-direction: column;
- gap: 6px;
-}
-
-.city-row {
- display: grid;
- grid-template-columns: 14px 1fr auto auto;
- gap: 8px;
- align-items: center;
- padding: 4px 6px;
- border: 1px solid rgba(201, 164, 90, 0.2);
- font-size: 0.75rem;
-}
-
-.city-row.mine {
- background: rgba(201, 164, 90, 0.15);
-}
-
-.city-row .nation {
- width: 12px;
- height: 12px;
- border: 1px solid rgba(232, 221, 196, 0.6);
-}
-
-.city-row .name {
- color: rgba(232, 221, 196, 0.9);
-}
-
-.city-row .meta,
-.city-row .state {
- color: rgba(232, 221, 196, 0.6);
-}
-
-.city-empty {
- font-size: 0.8rem;
- color: rgba(232, 221, 196, 0.6);
+.map-footnote {
+ font-size: 0.65rem;
+ color: rgba(232, 221, 196, 0.5);
}
.map-empty {
diff --git a/app/game-frontend/src/stores/mapViewer.ts b/app/game-frontend/src/stores/mapViewer.ts
new file mode 100644
index 0000000..c946d1a
--- /dev/null
+++ b/app/game-frontend/src/stores/mapViewer.ts
@@ -0,0 +1,26 @@
+import { defineStore } from 'pinia';
+
+interface MapViewerState {
+ showCityName: boolean;
+ detailMode: boolean;
+ hoveredCityId: number | null;
+}
+
+export const useMapViewerStore = defineStore('mapViewer', {
+ state: (): MapViewerState => ({
+ showCityName: true,
+ detailMode: false,
+ hoveredCityId: null,
+ }),
+ actions: {
+ toggleCityName() {
+ this.showCityName = !this.showCityName;
+ },
+ toggleDetailMode() {
+ this.detailMode = !this.detailMode;
+ },
+ setHoveredCity(cityId: number | null) {
+ this.hoveredCityId = cityId;
+ },
+ },
+});
diff --git a/docs/architecture/game-frontend-spa-plan.md b/docs/architecture/game-frontend-spa-plan.md
index 51775c2..a92de8a 100644
--- a/docs/architecture/game-frontend-spa-plan.md
+++ b/docs/architecture/game-frontend-spa-plan.md
@@ -125,13 +125,15 @@
- 라우트: Public/Login/Join/Main 기본 가드 및 분기 처리
- 메인 화면 스켈레톤: 지도/명령/장수/도시/국가/메시지 패널 + 반응형 레이아웃 + 실시간 토글 UI
- API 보강: 게임 API에 `general.me` 추가 (메인 화면 컨텍스트 제공)
+- MapViewer 1차 이식: 지도 토글/툴팁/도시 마커/디테일 모드와 Pinia 상태 연결
## Next Frontend Tasks
- 게이트웨이 로그인/프로필 선택 플로우 정리 (토큰 전달 방식, 자동 로그인, 쿠키 기반 전환 고려)
- 공개(Public) 화면 구현: 캐싱된 지도/중원정세/세력일람 + 제한된 장수일람
- 실시간 업데이트(SSE) 연결 설계 및 메인 화면 토글과 연동
-- 레거시 주요 컴포넌트 이식(MapViewer/CommandSelectForm/MessagePanel 등)
+- MapViewer 데이터 보강: 도시명/좌표 제공 API 및 레거시 맵 렌더링 이식
+- CommandSelectForm/MessagePanel 이식 마무리(예약/전송 플로우 연결)
- Join/빙의 UI 구현 및 완료 후 상태 갱신(장수 생성 감지)
- 화면 라우트 매핑 표 및 데이터 계약 문서화
diff --git a/docs/architecture/todo.md b/docs/architecture/todo.md
index c73d82f..b8eb198 100644
--- a/docs/architecture/todo.md
+++ b/docs/architecture/todo.md
@@ -22,6 +22,7 @@ Move items into the main docs once they are finalized.
- [AI suggestion] Implement Public 화면: 캐싱된 지도/중원정세/세력일람 + 제한된 장수일람 API/뷰.
- [AI suggestion] Define main screen SSE contract + 실시간 동기화 토글 연동 (지도/명령/도시/국가/장수/메시지/동향/기록).
- [AI suggestion] Port legacy main UI components into `app/game-frontend` (MapViewer, CommandSelectForm, MessagePanel 등).
+- [AI suggestion] Provide map city name/position data for MapViewer (API or scenario export) and replace placeholder layout.
- [AI suggestion] Implement join/빙의 UI and post-creation refresh flow.
- [AI suggestion] Build and maintain a legacy-to-SPA route mapping table with data requirements.