refactor(B05): 노선 추천 「종단 반영」 체크를 공용 체크박스로

- 기본 체크박스 → ui_template_checkbox(createCheckbox) · 동작 · 기본값(켬) 그대로
- 쓸모없어진 체크 전용 CSS 정리

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016PSXsvyDxjNmufteN5bqmt
This commit is contained in:
2026-10-06 23:17:51 +09:00
co-authored by Claude Sonnet 5.5
parent 26d9e468e3
commit 5a8436c131
2 changed files with 9 additions and 11 deletions
@@ -14,6 +14,7 @@
* ========================================================================== */
import { openModal } from "@ui/ui_template_modal";
import { createCheckbox } from "@ui/ui_template_checkbox";
import { showToast } from "@ui/ui_template_elements";
import type {
RouteInitialCriteria,
@@ -218,11 +219,10 @@ export function openRecommendModal(params: RecommendParams): void {
</div>
<span class="b05-routerec__sum" data-weight-sum></span>
</div>
<label class="b05-routerec__profile-opt" data-profile-opt
<div class="b05-routerec__profile-opt" data-profile-opt
title="켬 = 후보마다 균형 종단을 세워 토공 점수에 넣음 · 끔 = 원지반만 보고 점수를 냄(더 빠름)">
<input type="checkbox" data-with-profile /> 종단 반영
<small>끄면 원지반만 · 이 창 안에서만</small>
</label>
</div>
<div class="b05-routerec__criteria">
${CRITERIA_KEYS.map(
(key) => `<label title="${CRITERIA_FIELD[key].title}">${CRITERIA_FIELD[key].label}
@@ -267,8 +267,12 @@ export function openRecommendModal(params: RecommendParams): void {
const stateEl = q<HTMLElement>("[data-state]");
const line = (name: string): HTMLElement => q<HTMLElement>(`[data-line="${name}"]`);
const criteriaInputs = body.querySelectorAll<HTMLInputElement>("[data-criteria]");
const profileBox = q<HTMLInputElement>("[data-with-profile]");
profileBox.checked = params.profileMemory.withProfile;
const profileCheck = createCheckbox("종단 반영", {
checked: params.profileMemory.withProfile,
});
profileCheck.input.dataset.withProfile = "";
q<HTMLElement>("[data-profile-opt]").prepend(profileCheck.root);
const profileBox = profileCheck.input;
bindRecommendHelp(body);
criteriaInputs.forEach((input) => {
@@ -121,12 +121,6 @@
display: flex;
align-items: center;
gap: var(--spacing-8);
color: var(--color-text-body);
cursor: pointer;
}
.b05-routerec__profile-opt input {
accent-color: var(--color-primary);
}
.b05-routerec__profile-opt small {