feat(B 페이지): 떠남 물음 가드 · 지금 프로젝트 = 탭마다 (PLAN 572-2 · 요구 400~403)
- B04 · B07 · B08 · B09 가 공용 guardProjectLeave 에 {dirty, save, discard} 등록 — 고침 있을 때만 [취소 · 폐기 · 저장]
- B04 = 관 지점 고침(drainageDirty) · 저장 = 관 지점 · 세부유역 영구저장
- B07 = CAD · 탭 고침 · 저장 = saveEditedDrawings · 폐기 = 고친 도면 CAD 자동백업도 버림(discardEditedRecovery)
- B08 = 세션 b08-* 칸 넷 · 저장 = saveShown · B09 = b09-estimation 칸 · 저장 = saveChanged
- 지금 프로젝트 직접 읽기(localStorage) → currentProjectId() · B02 새 프로젝트 = setCurrentProject — B02 · B03 · B04 · B07 · B08 · B09 · B11
- 다른 프로젝트 보관함 지우기 셋(B04 · B05 종단 · B11) 뺌 — enterProject 한 곳 · 다른 탭 보관분 안 지움
- B02 · B03 은 가드 없음 — 저장 안 한 프로젝트 값 없음(B03 올리기 끊김은 이어 올리기 배너가 받음)
- 시험 test_560_4 넓힘(B 가드 · 탭 프로젝트 · 보관함) · helper_298_2 · helper_481_2 · test_204_2 흉내를 currentProjectId 로
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { CURRENT_PROJECT_ID_KEY, ROUTES, type RoutePath } from "@config/config_frontend";
|
||||
import { ROUTES, type RoutePath } from "@config/config_frontend";
|
||||
import { createButton } from "@ui/ui_template_elements";
|
||||
import { createGeneralLayout } from "@ui/ui_template_general_layout";
|
||||
import { t } from "@ui/ui_template_locale";
|
||||
@@ -7,12 +7,12 @@ import {
|
||||
markProjectPreloaded,
|
||||
preloadSurfaceAssets,
|
||||
PRELOAD_NO_SURFACE,
|
||||
purgeOtherProjects,
|
||||
readPreloadTarget,
|
||||
} from "../A00_Common/b_asset_cache";
|
||||
import { navigateTo } from "../A00_Common/router";
|
||||
import { fetchSurfaceStatus } from "../B04_PreProcess/B04_PreProcess_Api_Fetch";
|
||||
import "./B11_Status_UI_Style.css";
|
||||
import { currentProjectId } from "../A00_Common/b_project_switch";
|
||||
|
||||
/* =============================================================================
|
||||
* 자료 준비 화면 (B11)
|
||||
@@ -51,7 +51,7 @@ async function waitWhileDesigning(
|
||||
}
|
||||
|
||||
export async function renderB11Loading(root: HTMLElement): Promise<void> {
|
||||
const projectId = localStorage.getItem(CURRENT_PROJECT_ID_KEY);
|
||||
const projectId = currentProjectId();
|
||||
const target = (readPreloadTarget() ?? ROUTES.B03_FILE_INPUT) as RoutePath;
|
||||
|
||||
const progress = createProgressCircle({ label: t("B11_Loading_Start"), size: 96 });
|
||||
@@ -83,8 +83,6 @@ export async function renderB11Loading(root: HTMLElement): Promise<void> {
|
||||
// 초기 설계 체인이 도는 동안은 여기서 기다린다(2026-08-29 사용자 확정) — 자료를 담아도
|
||||
// 계산이 안 끝난 화면으로 보내면 반쯤 된 값을 만지게 된다.
|
||||
await waitWhileDesigning(projectId, (label) => progress.set(0, label));
|
||||
// 다른 프로젝트 자료가 남아 있으면 지운다 — 프로젝트끼리 섞이면 안 된다.
|
||||
await purgeOtherProjects(projectId);
|
||||
const signature = await preloadSurfaceAssets(projectId, (label, ratio) => {
|
||||
progress.set(ratio, label);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user