feat: optimize must-have controls and commander catalog

This commit is contained in:
matt 2025-10-07 15:56:57 -07:00
parent b7bfc4ca09
commit 3877890889
23 changed files with 1150 additions and 87 deletions

View file

@ -1,3 +1,9 @@
<div id="include-exclude-summary" data-summary>
{% set pending_state = must_have_state if must_have_state is defined else None %}
{% set pending_includes = pending_state.includes if pending_state and pending_state.includes is not none else [] %}
{% set pending_excludes = pending_state.excludes if pending_state and pending_state.excludes is not none else [] %}
{% set has_pending = (pending_includes|length > 0) or (pending_excludes|length > 0) %}
{% if summary and summary.include_exclude_summary %}
{% set ie_summary = summary.include_exclude_summary %}
{% set has_data = (ie_summary.include_cards|length > 0) or (ie_summary.exclude_cards|length > 0) or (ie_summary.include_added|length > 0) or (ie_summary.excluded_removed|length > 0) %}
@ -192,4 +198,45 @@
}
</style>
{% endif %}
{% elif has_pending %}
<section style="margin-top:1rem;">
<h5>Must-Have Selections</h5>
<div class="impact-panel" style="border:1px solid var(--border); border-radius:8px; padding:.6rem; background:#0f1115;">
<div class="muted" style="font-size:12px; margin-bottom:.5rem;">These card lists will apply to the next build run.</div>
<div style="display:flex; flex-direction:column; gap:.75rem;">
<div>
<div class="muted" style="font-weight:600; color:#4ade80; margin-bottom:.35rem;">✓ Must Include ({{ pending_includes|length }})</div>
{% if pending_includes|length %}
<div class="ie-chips" style="display:flex; gap:.35rem; flex-wrap:wrap;">
{% for card in pending_includes %}
<span class="chip" style="background:#dcfce7; color:#166534; border:1px solid #bbf7d0;" data-card-name="{{ card }}">{{ card }}</span>
{% endfor %}
</div>
{% else %}
<div class="muted" style="font-size:12px;">No include cards selected.</div>
{% endif %}
</div>
<div>
<div class="muted" style="font-weight:600; color:#ef4444; margin-bottom:.35rem;">✗ Must Exclude ({{ pending_excludes|length }})</div>
{% if pending_excludes|length %}
<div class="ie-chips" style="display:flex; gap:.35rem; flex-wrap:wrap;">
{% for card in pending_excludes %}
<span class="chip" style="background:#fee2e2; color:#dc2626; border:1px solid #fecaca;" data-card-name="{{ card }}">{{ card }}</span>
{% endfor %}
</div>
{% else %}
<div class="muted" style="font-size:12px;">No exclude cards selected.</div>
{% endif %}
</div>
</div>
</div>
</section>
{% else %}
{% if show_must_have_buttons %}
<section style="margin-top:1rem;">
<h5>Must-Have Selections</h5>
<div class="muted" style="font-size:12px;">Use the ✓/✗ toggles on each card to mark must-have preferences.</div>
</section>
{% endif %}
{% endif %}
</div>