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:
@@ -14,6 +14,7 @@
|
|||||||
* ========================================================================== */
|
* ========================================================================== */
|
||||||
|
|
||||||
import { openModal } from "@ui/ui_template_modal";
|
import { openModal } from "@ui/ui_template_modal";
|
||||||
|
import { createCheckbox } from "@ui/ui_template_checkbox";
|
||||||
import { showToast } from "@ui/ui_template_elements";
|
import { showToast } from "@ui/ui_template_elements";
|
||||||
import type {
|
import type {
|
||||||
RouteInitialCriteria,
|
RouteInitialCriteria,
|
||||||
@@ -218,11 +219,10 @@ export function openRecommendModal(params: RecommendParams): void {
|
|||||||
</div>
|
</div>
|
||||||
<span class="b05-routerec__sum" data-weight-sum></span>
|
<span class="b05-routerec__sum" data-weight-sum></span>
|
||||||
</div>
|
</div>
|
||||||
<label class="b05-routerec__profile-opt" data-profile-opt
|
<div class="b05-routerec__profile-opt" data-profile-opt
|
||||||
title="켬 = 후보마다 균형 종단을 세워 토공 점수에 넣음 · 끔 = 원지반만 보고 점수를 냄(더 빠름)">
|
title="켬 = 후보마다 균형 종단을 세워 토공 점수에 넣음 · 끔 = 원지반만 보고 점수를 냄(더 빠름)">
|
||||||
<input type="checkbox" data-with-profile /> 종단 반영
|
|
||||||
<small>끄면 원지반만 · 이 창 안에서만</small>
|
<small>끄면 원지반만 · 이 창 안에서만</small>
|
||||||
</label>
|
</div>
|
||||||
<div class="b05-routerec__criteria">
|
<div class="b05-routerec__criteria">
|
||||||
${CRITERIA_KEYS.map(
|
${CRITERIA_KEYS.map(
|
||||||
(key) => `<label title="${CRITERIA_FIELD[key].title}">${CRITERIA_FIELD[key].label}
|
(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 stateEl = q<HTMLElement>("[data-state]");
|
||||||
const line = (name: string): HTMLElement => q<HTMLElement>(`[data-line="${name}"]`);
|
const line = (name: string): HTMLElement => q<HTMLElement>(`[data-line="${name}"]`);
|
||||||
const criteriaInputs = body.querySelectorAll<HTMLInputElement>("[data-criteria]");
|
const criteriaInputs = body.querySelectorAll<HTMLInputElement>("[data-criteria]");
|
||||||
const profileBox = q<HTMLInputElement>("[data-with-profile]");
|
const profileCheck = createCheckbox("종단 반영", {
|
||||||
profileBox.checked = params.profileMemory.withProfile;
|
checked: params.profileMemory.withProfile,
|
||||||
|
});
|
||||||
|
profileCheck.input.dataset.withProfile = "";
|
||||||
|
q<HTMLElement>("[data-profile-opt]").prepend(profileCheck.root);
|
||||||
|
const profileBox = profileCheck.input;
|
||||||
bindRecommendHelp(body);
|
bindRecommendHelp(body);
|
||||||
|
|
||||||
criteriaInputs.forEach((input) => {
|
criteriaInputs.forEach((input) => {
|
||||||
|
|||||||
@@ -121,12 +121,6 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--spacing-8);
|
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 {
|
.b05-routerec__profile-opt small {
|
||||||
|
|||||||
Reference in New Issue
Block a user