From dee041b8966121c7db0aab16ccf08ee9d70f9336 Mon Sep 17 00:00:00 2001 From: Harenome Ranaivoarivony-Razanajato Date: Wed, 18 Nov 2026 15:50:44 +0100 Subject: [PATCH] feat(builder): draw the Where step's machines and backends with sprite icons --- app/static/builder/command-builder.css | 1 + app/static/builder/command-builder.js | 5 +++-- app/templates/base.html | 4 ++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/app/static/builder/command-builder.css b/app/static/builder/command-builder.css index e3350f93..8fd7695d 100644 --- a/app/static/builder/command-builder.css +++ b/app/static/builder/command-builder.css @@ -246,6 +246,7 @@ /* the name keeps the tile's width; why one cannot be used goes under it, so a row's tiles stay one height */ #nullius-builder .std-backends .nb-tile { flex-direction: column; align-items: stretch; justify-content: center; gap: 0; padding: 10px 12px; } #nullius-builder .std-backends .nb-mark { width: 20px; height: 20px; } +#nullius-builder .std-backends .nb-mark svg { width: 20px; height: 20px; } #nullius-builder .std-backends .nb-tile-note { font-size: 11px; padding-left: 30px; } #nullius-builder .std-boat-sizes { grid-template-columns: repeat(4, minmax(0, 160px)); grid-auto-rows: auto; } #nullius-builder .std-boat-sizes .nb-tile { flex-direction: column; align-items: stretch; gap: 2px; } diff --git a/app/static/builder/command-builder.js b/app/static/builder/command-builder.js index 9efc2e29..7ad4dca6 100644 --- a/app/static/builder/command-builder.js +++ b/app/static/builder/command-builder.js @@ -469,7 +469,7 @@ const boatWhy = (list.includes('local') ? here.boat : here.boatKey) || ''; const agentRun = b && b.family === 'agent' && selected.some(o => !o.control && !o.setup); const machine = (v, t, sub) => machineTile('std-where', v, t, sub, list.includes(v)); - const how = (v, t, sub, why) => tile({attr: 'std-backend', key: v, on: backend === v && !why, disabled: !!why, why, note: why ? 'Not usable here' : '', mark: v === 'local' ? '$' : v === 'boat' ? '' : '▣', title: t, tip: sub}); + const how = (v, t, sub, why) => tile({attr: 'std-backend', key: v, on: backend === v && !why, disabled: !!why, why, note: why ? 'Not usable here' : '', mark: v === 'local' ? icon('terminal') : v === 'boat' ? '' : icon('container'), title: t, tip: sub}); const dockerOnly = Object.entries((b || {}).environments || {}).filter(([, e]) => !e.local_ok).map(([n]) => n); const web = agentRun && Object.values((b || {}).environments || {}).some(e => e.network); // an agent's public web proxy return '

Where does it run?

' @@ -613,7 +613,8 @@ + (t.line ? `${esc(t.line)}` : '') + (t.note ? `${esc(t.note)}` : '') + (t.meta || t.foot ? `${t.meta ? `${esc(t.meta)}` : ''}${t.foot || ''}` : '') + ''; // a machine to run on: this one or a host, its connection state filled in by Test connection - const machineTile = (attr, v, t, sub, on) => tile({attr, key: v, on, mark: v === 'local' ? '⌂' : '⇄', title: t, tip: sub, + const icon = name => ``; + const machineTile = (attr, v, t, sub, on) => tile({attr, key: v, on, mark: icon(v === 'local' ? 'machine' : 'network'), title: t, tip: sub, foot: v !== 'local' ? `` : ''}); const picker = (tiles, fams, noun = 'benchmark') => { const pick = pickOf(), cats = [...new Set(tiles.map(t => t.cat).filter(Boolean))].sort(); diff --git a/app/templates/base.html b/app/templates/base.html index d2511789..21cda119 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -52,6 +52,10 @@ + + + +