From 8d51f6d334edafbff92e76ac48a55cc43de44b95 Mon Sep 17 00:00:00 2001 From: umsangdon Date: Sat, 8 Aug 2026 13:32:43 +0900 Subject: [PATCH] =?UTF-8?q?fix(B01):=20=EC=9E=84=EC=8B=9C=20=EB=B3=B4?= =?UTF-8?q?=EA=B4=80=ED=95=A8=20=EC=95=88=EB=82=B4=20=EB=AC=B8=EB=8B=A8=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0,=20=EB=B3=B4=EA=B4=80=20=EA=B8=B0=EA=B0=84?= =?UTF-8?q?=EC=9D=80=20=EC=A0=9C=EB=AA=A9=20=EC=98=86=20=ED=83=9C=EA=B7=B8?= =?UTF-8?q?=EB=A1=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 섹션 제목 오른쪽에 "30일 보관" 태그 표시(서버 retention_days 반영) - 빈 상태를 공용 표 블록에 위임해 프로젝트 컨테이너와 같은 문구·서식 사용 - 쓰지 않게 된 locale 키 2종 정리 Co-Authored-By: Claude Fable 5 --- B01_Dashboard/B01_Dashboard_UI_Style_Temp.css | 16 ++++------- B01_Dashboard/B01_Dashboard_UI_TempUpload.ts | 28 +++++++++++-------- ui_template/ui_template_locale_b1.ts | 7 +---- 3 files changed, 23 insertions(+), 28 deletions(-) diff --git a/B01_Dashboard/B01_Dashboard_UI_Style_Temp.css b/B01_Dashboard/B01_Dashboard_UI_Style_Temp.css index acaea18a..cd5e66df 100644 --- a/B01_Dashboard/B01_Dashboard_UI_Style_Temp.css +++ b/B01_Dashboard/B01_Dashboard_UI_Style_Temp.css @@ -5,17 +5,11 @@ * 진행률 막대만 정의한다. 색·간격은 theme.css 변수만 사용한다. * ========================================================================== */ -.b01-temp__hint { - margin: 0 0 var(--spacing-16); - font-size: 12px; - color: var(--color-muted-text, var(--color-primary-text)); -} - -.b01-temp__empty { - padding: var(--spacing-16); - text-align: center; - font-size: 13px; - color: var(--color-muted-text, var(--color-primary-text)); +/* 제목 + 보관 기간 태그를 한 묶음으로 — 공용 섹션 헤더의 왼쪽 칸에 들어간다. */ +.b01-temp__section-title { + display: flex; + align-items: center; + gap: var(--spacing-8); } .b01-temp__list { diff --git a/B01_Dashboard/B01_Dashboard_UI_TempUpload.ts b/B01_Dashboard/B01_Dashboard_UI_TempUpload.ts index 5d584873..a5841609 100644 --- a/B01_Dashboard/B01_Dashboard_UI_TempUpload.ts +++ b/B01_Dashboard/B01_Dashboard_UI_TempUpload.ts @@ -11,7 +11,7 @@ * ========================================================================== */ import { UPLOAD_CHUNK_SIZE_MB } from "@config/config_frontend"; -import { createButton, showToast } from "@ui/ui_template_elements"; +import { createButton, createTag, showToast } from "@ui/ui_template_elements"; import { section, table, text } from "@ui/ui_template_general_blocks"; import { createTempBatch, @@ -73,13 +73,12 @@ export function buildTempUploadSection(): HTMLElement { const panel = document.createElement("div"); panel.className = "b01-temp"; - const hint = document.createElement("p"); - hint.className = "b01-temp__hint"; - hint.textContent = L("B01_Temp_Hint"); + // 보관 기간은 제목 옆 태그로 알린다(서버가 준 값으로 목록 조회 때 갱신). + const retentionTag = createTag(`${30}${L("B01_Temp_Hint_Days")}`, "neutral"); const listHost = document.createElement("div"); listHost.className = "b01-temp__list"; - panel.append(hint, listHost); + panel.append(listHost); /** 업로드 중인 파일 — batch_id별 작업표. 서버 목록과 합쳐 행을 그린다. */ const tasks = new Map(); @@ -245,14 +244,12 @@ export function buildTempUploadSection(): HTMLElement { async function refresh(): Promise { try { const response = await fetchTempBatches(); - hint.textContent = `${L("B01_Temp_Hint")} (${response.retention_days}${L("B01_Temp_Hint_Days")})`; + retentionTag.textContent = `${response.retention_days}${L("B01_Temp_Hint_Days")}`; progressNodes.clear(); listHost.replaceChildren(); if (response.batches.length === 0) { - const empty = document.createElement("p"); - empty.className = "b01-temp__empty"; - empty.textContent = L("B01_Temp_Empty"); - listHost.append(empty); + // 빈 상태 문구·서식은 프로젝트 컨테이너와 같게 공용 표 블록을 그대로 쓴다. + listHost.append(table([], [])); return; } for (const batch of response.batches) listHost.append(renderGroup(batch)); @@ -432,7 +429,16 @@ export function buildTempUploadSection(): HTMLElement { void refresh(); - return section(L("B01_Temp_Section"), panel, true, [ + const root = section(L("B01_Temp_Section"), panel, true, [ createButton({ label: "+", onClick: openCreateModal }), ]); + // 공용 섹션 헤더는 [제목 | 액션] 2단이라, 보관 기간 태그를 제목과 한 묶음으로 감싼다. + const heading = root.querySelector("h3"); + if (heading) { + const titleWrap = document.createElement("div"); + titleWrap.className = "b01-temp__section-title"; + heading.replaceWith(titleWrap); + titleWrap.append(heading, retentionTag); + } + return root; } diff --git a/ui_template/ui_template_locale_b1.ts b/ui_template/ui_template_locale_b1.ts index 7d5cb06f..75ee1b7c 100644 --- a/ui_template/ui_template_locale_b1.ts +++ b/ui_template/ui_template_locale_b1.ts @@ -81,7 +81,6 @@ export const ui_locales_b1 = { B01_Temp_Field_Name: ["보관 이름", "Storage name"], B01_Temp_Field_Name_Placeholder: ["예: 2026년 3공구 측량자료", "e.g. 2026 Section 3 survey"], B01_Temp_Field_Files: ["파일 선택 (계획노선·라이다·좌표계·래스터)", "Select files"], - B01_Temp_Btn_Upload: ["보관함에 올리기", "Upload to storage"], B01_Temp_Btn_Pick: ["파일 선택", "Choose files"], B01_Temp_Btn_Add: ["파일 추가", "Add files"], B01_Temp_Modal_Create: ["임시 자료 등록", "New stored set"], @@ -102,12 +101,8 @@ export const ui_locales_b1 = { ], B01_Temp_File_Delete_Success: ["파일을 삭제했습니다.", "File deleted."], B01_Temp_File_Delete_Failed: ["파일 삭제에 실패했습니다.", "Failed to delete the file."], - B01_Temp_Hint: [ - "프로젝트를 만들기 전에 자료를 먼저 올려 둘 수 있습니다. 나중에 프로젝트 파일 입력 화면에서 불러오면 됩니다.", - "Upload files before creating a project, then pull them in from the project file input page.", - ], + /* 보관 기간은 섹션 제목 옆 태그로만 알린다(안내 문단 폐기, 2026-08-08). */ B01_Temp_Hint_Days: ["일 보관", " days retained"], - B01_Temp_Empty: ["보관 중인 자료가 없습니다.", "No stored files yet."], B01_Temp_Status_Uploading: ["업로드 중", "Uploading"], B01_Temp_Status_Ready: ["사용 가능", "Ready"], B01_Temp_Status_Linked: ["프로젝트 연결됨", "Linked"],