feat(733-3): 서고 중복 찾기 틀 — 서버 길(목록 · 합치기 · 되돌림) · 화면 창 · 나무 메뉴 (등록 전)

- 새 M02_Library_Same_Router.py — GET {kind}-same · POST merge · POST undo (main.py 등록 · 시험은 다음 걸음)
- 새 M02_MasterTemplete_Library_Same.ts · .css — 묶음 표 · 남김 고르기 · 합치기 물음 · 합친 것 되돌림
- 서고 나무 뿌리 메뉴 [중복 찾기]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-02 13:39:47 +09:00
co-authored by Claude Opus 5.5
parent 8c5ef34365
commit 6cf57dc289
4 changed files with 697 additions and 0 deletions
@@ -37,6 +37,7 @@ import {
type PrecomboTree,
} from "./M02_MasterTemplete_Api_Fetch";
import { nameDialog } from "./M02_MasterTemplete_Library_List";
import { openLibrarySame, sameLabel } from "./M02_MasterTemplete_Library_Same";
import type { Root } from "./M02_MasterTemplete_Layer";
import { tc } from "./M02_MasterTemplete_Labor_Text";
import { askText } from "./M02_MasterTemplete_TreePanel_Dialogs";
@@ -307,8 +308,14 @@ export function buildLibrarySection(opt: LibraryOptions): LibraryHandle {
...(got
? [item(L("M02_TreePaste").replace("{n}", String(got.refs.length)), () => void paste(path))]
: []),
...(path.length ? [] : [item(sameLabel(), () => same())]),
];
};
/** [중복 찾기](733-3) — 그 층 같은 내용 묶음 · 합치기 · 되돌림 */
const same = (): void => {
const at = opt.scope();
openLibrarySame({ kind, layer: at.layer, owner: at.owner, changed: () => void refresh() });
};
/** 오른쪽 클릭 — 고른 것 안의 줄이면 고른 것 전부(복사 · 지우기) · 아니면 그 줄 하나 */
const menuFor = (id: string, single: () => TreeMenuItem[]): TreeMenuItem[] => {
if (!picked.has(id)) setPicked(new Set([id]), id);