diff --git a/app/static/app.css b/app/static/app.css index 0543665..f86dcb8 100644 --- a/app/static/app.css +++ b/app/static/app.css @@ -617,12 +617,6 @@ kbd { min-height: 2.6rem; padding: .2rem .5rem; border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); } -/* One agent is not a choice, so it is its name, not a select of one. */ -#rail p.agent-pick { - padding: .45rem .6rem; line-height: 1.35; overflow-wrap: anywhere; - background: color-mix(in srgb, var(--accent) 10%, transparent); - box-shadow: inset 3px 0 0 var(--accent); border-radius: 3px; -} .rail-viewing .rail-note { margin-top: 0; } /* A link in a heading ("agents", "clear") is a word, not a second heading. */ #rail h3 .linky { text-transform: none; letter-spacing: 0; font-weight: 400; } diff --git a/app/static/roles.js b/app/static/roles.js index 3a1f1de..34a16b8 100644 --- a/app/static/roles.js +++ b/app/static/roles.js @@ -410,16 +410,15 @@ $("#rail-toggle").setAttribute("aria-expanded", String(state.railOpen)); } - /* Viewing as: a select with two or more agents, the name with one, and + /* Viewing as: a select of the enabled agents, also when there is one, and with none a sentence and the way to make one. Nothing until the agents are in, so a page with agents never says it has none. */ function renderAgent() { const agents = state.agents; const select = $("#agent"); - select.hidden = agents.length < 2; - $("#agent-one").hidden = agents.length !== 1; + select.hidden = !agents.length; $("#agent-none").hidden = !state.agentsLoaded || agents.length > 0; - if (agents.length > 1) { + if (agents.length) { // Rebuilt only when the agents changed, since the rail is drawn again on // every filter and a rebuild shuts a select that is open. const key = agents.map((a) => `${a.id}:${a.name}`).join("\n"); @@ -430,8 +429,6 @@ select.value = String(state.filter.agent); // A long name is cut at the rail's edge; the whole of it is a hover away. select.title = select.selectedOptions[0]?.text || ""; - } else if (agents.length === 1) { - $("#agent-one").textContent = agents[0].name; } else if (state.agentsLoaded) { $("#agent-none").innerHTML = `No search agent is enabled, so nothing is ranked. Search agents sets one up.`; diff --git a/app/templates/roles.html b/app/templates/roles.html index e1f3483..44a67d7 100644 --- a/app/templates/roles.html +++ b/app/templates/roles.html @@ -40,11 +40,11 @@