diff --git a/crates/im-core/src/events.rs b/crates/im-core/src/events.rs index 9eb494e..30b432d 100644 --- a/crates/im-core/src/events.rs +++ b/crates/im-core/src/events.rs @@ -41,6 +41,10 @@ pub async fn log(store: &Store, kind: &str, actor: Option<&str>, detail: Option< pub struct EventFilter { pub kind: Option, pub actor: Option, + /// Free text against detail, actor and kind — ASCII case-folded + /// substring, no wildcards, like izlek's board search but in SQL (the + /// fold must live in the predicate or the keyset pages lie). + pub q: Option, /// Half-open day range `[from, to)`; both ends UTC stamps. pub day: Option<(time::OffsetDateTime, time::OffsetDateTime)>, } @@ -85,6 +89,13 @@ fn filter_sql(filter: &EventFilter, params: &mut Vec) -> String { params.push(store::stamp(*from).expect("rfc3339 of range start").into()); params.push(store::stamp(*to).expect("rfc3339 of range end").into()); } + if let Some(q) = &filter.q { + sql += " AND (lower(coalesce(detail, '')) LIKE ? OR lower(coalesce(actor, '')) LIKE ? OR lower(kind) LIKE ?)"; + let needle = q.to_lowercase(); + params.push(format!("%{needle}%").into()); + params.push(format!("%{needle}%").into()); + params.push(format!("%{needle}%").into()); + } sql } @@ -260,6 +271,22 @@ mod tests { assert_eq!(events.len(), 2); assert_eq!(events[0].kind, "login_fail"); assert_eq!(events[1].actor.as_deref(), Some("ann@example.com")); + // Search: substring hits detail, actor and kind; a miss admits nothing. + for (q, want) in [("password", 1), ("ann@", 1), ("login", 2), ("zzz", 0)] { + let hits = list_filtered( + &store, + 10, + &EventPage::Newest, + Dir::Newest, + &EventFilter { + q: Some(q.to_string()), + ..Default::default() + }, + ) + .await + .unwrap(); + assert_eq!(hits.len(), want, "search {q:?}"); + } } #[tokio::test] diff --git a/crates/im-web/assets/main.css b/crates/im-web/assets/main.css index e6d3b22..8db3396 100644 --- a/crates/im-web/assets/main.css +++ b/crates/im-web/assets/main.css @@ -1,3 +1,4 @@ +@charset "UTF-8"; [data-ui=ledger] .auth-title { font-family: var(--font-display); font-size: 22px; @@ -1103,3 +1104,83 @@ input[type=checkbox] { flex-wrap: wrap; } } +.dd-native { + display: none; +} + +.dd-trigger { + display: flex; + align-items: center; + font: inherit; + text-align: left; + cursor: pointer; +} +.dd-trigger::after { + content: "▾"; + margin-left: auto; + padding-left: 8px; + color: var(--muted); + font-size: 11px; +} + +.dd-panel { + position: fixed; + z-index: 60; + max-height: 260px; + overflow-y: auto; + background: var(--surface); + border: 1px solid var(--border-strong); + border-radius: var(--radius); + box-shadow: var(--shadow-2); + padding: 8px; + display: none; +} +.dd-panel.dd-open { + display: block; +} + +.dd-option { + display: block; + width: 100%; + padding: 6px 10px; + border: none; + border-radius: var(--radius-sm); + background: none; + font: inherit; + font-size: 13px; + text-align: left; + color: var(--ink); + white-space: nowrap; + cursor: pointer; + transition: background-color var(--dur-fast) var(--ease); +} +.dd-option:hover, .dd-option:focus, .dd-option.dd-option-active { + background: var(--row-hover); + outline: none; +} + +.dd-option-selected { + background: var(--accent-tint); + color: var(--accent-ink); +} + +.dd-option-hidden { + display: none; +} + +.dd-search { + display: block; + width: 100%; + margin-bottom: 6px; + padding: 8px 10px; + border: none; + border-bottom: 1px solid var(--border); + background: none; + font: inherit; + font-size: 13px; + color: var(--ink); +} + +.logs-filters .logs-q { + flex: 2 1 200px; +} diff --git a/crates/im-web/src/admin.rs b/crates/im-web/src/admin.rs index 240b161..37a0d32 100644 --- a/crates/im-web/src/admin.rs +++ b/crates/im-web/src/admin.rs @@ -661,6 +661,9 @@ async fn logs_section(cx: &Cx, lang: i18n::Lang) -> Result Result Result + {body} {foot} @@ -834,6 +842,8 @@ async fn logs_section(cx: &Cx, lang: i18n::Lang) -> Result`'s popup follows the browser's chrome, not the design — only +//! Chromium's `::picker(select)` themes it, Firefox and WebKit never see it. +//! So every `select.auth-input` is progressively enhanced: the native +//! element stays in the DOM hidden (its `name` and value still post +//! unchanged) while a trigger button and a portaled, fixed-position panel +//! take over the look. A pick writes the native select and dispatches a +//! bubbling `change`, which is what the soft-nav's `data-autosubmit` +//! listener turns into a filter submit — zero extra wiring. +//! +//! Unlike izlek's, this port needs no node-ownership registry: im's soft +//! swap rebuilds `` wholesale, client-made nodes die with it, and the +//! fresh select is simply enhanced again — `enhanceAll` runs on every +//! evaluation and through `window.__imDdEnhance` after every adopt. + +use topcoat::Result; +use topcoat::context::Cx; +use topcoat::view::{Unescaped, view}; + +pub async fn dropdown_script(cx: &Cx) -> Result { + const JS: &str = "\ + (function () {\ + function enhanceAll() { document.querySelectorAll('select.auth-input').forEach(enhance); }\ + window.__imDdEnhance = enhanceAll;\ + if (window.__imDd) { enhanceAll(); return; }\ + window.__imDd = true;\ + function opts(select) { return Array.prototype.slice.call(select.options); }\ + function closeAll() {\ + document.querySelectorAll('.dd-panel.dd-open').forEach(function (panel) {\ + panel.classList.remove('dd-open');\ + if (panel.__ddTrigger) { panel.__ddTrigger.setAttribute('aria-expanded', 'false'); }\ + });\ + }\ + function place(panel, trigger) {\ + var r = trigger.getBoundingClientRect();\ + var h = panel.offsetHeight;\ + var w = panel.offsetWidth;\ + var top = r.bottom + 4;\ + if (top + h > window.innerHeight && r.top - h - 4 >= 0) { top = r.top - h - 4; }\ + top = Math.max(4, Math.min(top, window.innerHeight - h - 4));\ + var left = Math.max(4, Math.min(r.left, window.innerWidth - w - 4));\ + panel.style.left = left + 'px';\ + panel.style.top = top + 'px';\ + panel.style.minWidth = r.width + 'px';\ + }\ + function visibleRows(panel) { return Array.prototype.slice.call(panel.querySelectorAll('.dd-option:not(.dd-option-hidden)')); }\ + function activate(panel, row) {\ + panel.querySelectorAll('.dd-option-active').forEach(function (r) { r.classList.remove('dd-option-active'); });\ + if (!row) { return; }\ + row.classList.add('dd-option-active');\ + if (panel.__ddSearch) { row.scrollIntoView({ block: 'nearest' }); } else { row.focus(); }\ + }\ + function isTypeKey(e) { return e.key && e.key.length === 1 && !e.ctrlKey && !e.altKey && !e.metaKey; }\ + function typeIntoSearch(search, e) {\ + search.focus();\ + search.value += e.key;\ + search.dispatchEvent(new Event('input', { bubbles: true }));\ + }\ + function filterRows(panel, query) {\ + var qTr = query.toLocaleLowerCase('tr');\ + var qEn = query.toLowerCase();\ + panel.querySelectorAll('.dd-option').forEach(function (r) {\ + var t = r.textContent;\ + var miss = t.toLocaleLowerCase('tr').indexOf(qTr) === -1 && t.toLowerCase().indexOf(qEn) === -1;\ + r.classList.toggle('dd-option-hidden', qEn !== '' && miss);\ + });\ + var vis = visibleRows(panel);\ + activate(panel, panel.querySelector('.dd-option-selected:not(.dd-option-hidden)') || vis[0]);\ + }\ + function pick(select, trigger, panel, row) {\ + select.value = row.dataset.value;\ + panel.querySelectorAll('.dd-option').forEach(function (r) {\ + r.classList.toggle('dd-option-selected', r === row);\ + r.setAttribute('aria-selected', r === row ? 'true' : 'false');\ + });\ + trigger.textContent = row.textContent;\ + panel.classList.remove('dd-open');\ + trigger.setAttribute('aria-expanded', 'false');\ + trigger.focus();\ + select.dispatchEvent(new Event('change', { bubbles: true }));\ + }\ + function openPanel(select, trigger, panel) {\ + closeAll();\ + var search = panel.__ddSearch;\ + if (search) {\ + search.value = '';\ + panel.querySelectorAll('.dd-option').forEach(function (r) { r.classList.remove('dd-option-hidden'); });\ + }\ + panel.classList.add('dd-open');\ + place(panel, trigger);\ + trigger.setAttribute('aria-expanded', 'true');\ + activate(panel, panel.querySelector('.dd-option-selected') || panel.querySelector('.dd-option'));\ + if (search) { search.focus(); }\ + }\ + function fillRows(panel, select) {\ + panel.querySelectorAll('.dd-option').forEach(function (r) { r.remove(); });\ + opts(select).forEach(function (opt) {\ + var row = document.createElement('button');\ + row.type = 'button';\ + row.className = 'dd-option' + (opt.selected ? ' dd-option-selected' : '');\ + row.textContent = opt.textContent;\ + row.dataset.value = opt.value;\ + row.setAttribute('role', 'option');\ + row.setAttribute('aria-selected', opt.selected ? 'true' : 'false');\ + panel.appendChild(row);\ + });\ + }\ + function rowsMatch(panel, select) {\ + var rows = panel.querySelectorAll('.dd-option');\ + var all = opts(select);\ + if (rows.length !== all.length) { return false; }\ + for (var i = 0; i < all.length; i++) {\ + if (rows[i].dataset.value !== all[i].value) { return false; }\ + if (rows[i].textContent !== all[i].textContent) { return false; }\ + }\ + return true;\ + }\ + function resync(select) {\ + var trigger = select.__ddTrigger, panel = select.__ddPanel;\ + if (!trigger || !panel) { return; }\ + select.classList.add('dd-native');\ + if (panel.classList.contains('dd-open')) { return; }\ + if (!rowsMatch(panel, select)) { fillRows(panel, select); }\ + var current = select.options[select.selectedIndex];\ + var label = current ? current.textContent : '';\ + if (trigger.textContent !== label) { trigger.textContent = label; }\ + panel.querySelectorAll('.dd-option').forEach(function (r) {\ + var on = !!current && r.dataset.value === current.value;\ + r.classList.toggle('dd-option-selected', on);\ + r.setAttribute('aria-selected', on ? 'true' : 'false');\ + });\ + }\ + function enhance(select) {\ + if (select.dataset.ddDone) { resync(select); return; }\ + select.dataset.ddDone = '1';\ + var trigger = document.createElement('button');\ + trigger.type = 'button';\ + trigger.className = select.className + ' dd-trigger';\ + var current = select.options[select.selectedIndex];\ + trigger.textContent = current ? current.textContent : '';\ + trigger.setAttribute('aria-haspopup', 'listbox');\ + trigger.setAttribute('aria-expanded', 'false');\ + select.parentNode.insertBefore(trigger, select);\ + select.classList.add('dd-native');\ + var panel = document.createElement('div');\ + panel.className = 'dd-panel';\ + panel.setAttribute('role', 'listbox');\ + panel.__ddTrigger = trigger;\ + trigger.__ddPanel = panel;\ + trigger.__ddSelect = select;\ + select.__ddTrigger = trigger;\ + select.__ddPanel = panel;\ + var allOpts = opts(select);\ + var search = null;\ + if (allOpts.length > 7 || select.hasAttribute('data-search')) {\ + search = document.createElement('input');\ + search.type = 'text';\ + search.className = 'dd-search';\ + panel.appendChild(search);\ + panel.__ddSearch = search;\ + }\ + fillRows(panel, select);\ + document.body.appendChild(panel);\ + trigger.addEventListener('click', function (e) {\ + e.stopPropagation();\ + if (panel.classList.contains('dd-open')) { closeAll(); } else { openPanel(select, trigger, panel); }\ + });\ + trigger.addEventListener('keydown', function (e) {\ + if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\ + e.preventDefault();\ + if (!panel.classList.contains('dd-open')) { openPanel(select, trigger, panel); return; }\ + var vis = visibleRows(panel);\ + var idx = vis.indexOf(panel.querySelector('.dd-option-active')) + (e.key === 'ArrowDown' ? 1 : -1);\ + if (idx >= 0 && idx < vis.length) { activate(panel, vis[idx]); }\ + } else if (e.key === 'Enter' && panel.classList.contains('dd-open')) {\ + e.preventDefault();\ + var active = panel.querySelector('.dd-option-active');\ + if (active) { pick(select, trigger, panel, active); }\ + } else if (search && isTypeKey(e)) {\ + e.preventDefault();\ + if (!panel.classList.contains('dd-open')) { openPanel(select, trigger, panel); }\ + typeIntoSearch(search, e);\ + }\ + });\ + if (search) {\ + search.addEventListener('input', function () { filterRows(panel, search.value); });\ + }\ + panel.addEventListener('keydown', function (e) {\ + if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\ + e.preventDefault();\ + var vis = visibleRows(panel);\ + var idx = vis.indexOf(panel.querySelector('.dd-option-active')) + (e.key === 'ArrowDown' ? 1 : -1);\ + if (idx >= 0 && idx < vis.length) { activate(panel, vis[idx]); }\ + } else if (e.key === 'Enter') {\ + e.preventDefault();\ + var vis = visibleRows(panel);\ + var active = panel.querySelector('.dd-option-active') || (vis.length === 1 ? vis[0] : null);\ + if (active) { pick(select, trigger, panel, active); }\ + } else if (search && e.target !== search && isTypeKey(e)) {\ + e.preventDefault();\ + typeIntoSearch(search, e);\ + }\ + });\ + panel.addEventListener('click', function (e) {\ + e.stopPropagation();\ + var row = e.target.closest('.dd-option');\ + if (row) { pick(select, trigger, panel, row); }\ + });\ + }\ + document.addEventListener('keydown', function (e) {\ + if (e.key !== 'Escape') { return; }\ + var panel = document.querySelector('.dd-panel.dd-open');\ + if (!panel) { return; }\ + var trigger = panel.__ddTrigger;\ + closeAll();\ + if (trigger) { trigger.focus(); }\ + });\ + document.addEventListener('click', function (e) {\ + var el = e.target;\ + if (!el || !el.closest) { return; }\ + if (el.closest('.dd-panel') || el.closest('.dd-trigger')) { return; }\ + if (el.closest('a, button, input:not([type=hidden]), textarea')) { return; }\ + var box = el.nodeType === 1 ? el : el.parentNode;\ + for (var depth = 0; depth < 3 && box && box.querySelectorAll; depth++) {\ + var found = box.querySelectorAll('.dd-trigger');\ + if (found.length === 1 && found[0].parentNode === box && found[0].__ddPanel) {\ + var t = found[0];\ + e.stopPropagation();\ + e.preventDefault();\ + if (t.__ddPanel.classList.contains('dd-open')) { closeAll(); }\ + else { openPanel(t.__ddSelect, t, t.__ddPanel); }\ + return;\ + }\ + box = box.parentNode;\ + }\ + }, true);\ + document.addEventListener('click', closeAll);\ + window.addEventListener('scroll', function (e) {\ + var t = e.target;\ + if (t && t.nodeType === 1 && t.classList.contains('dd-panel')) { return; }\ + closeAll();\ + }, true);\ + enhanceAll();\ + })();"; + view! { cx => } +} diff --git a/crates/im-web/src/i18n.rs b/crates/im-web/src/i18n.rs index 1ac2918..f378c58 100644 --- a/crates/im-web/src/i18n.rs +++ b/crates/im-web/src/i18n.rs @@ -181,6 +181,7 @@ pub enum Key { OlderLink, LogsEmpty, OrderLabel, + SearchLabel, // Landing password pane. AccountPasswordNote, @@ -546,6 +547,8 @@ pub fn t(lang: Lang, key: Key) -> &'static str { (LogsEmpty, En) => "Nothing matches.", (OrderLabel, En) => "Order", (OrderLabel, Tr) => "Sıra", + (SearchLabel, En) => "Search", + (SearchLabel, Tr) => "Ara", (LogsEmpty, Tr) => "Eşleşen kayıt yok.", (AccountPasswordNote, En) => "Changing it signs every other device out — this one stays.", diff --git a/crates/im-web/src/layout.rs b/crates/im-web/src/layout.rs index 75c1890..b2777bf 100644 --- a/crates/im-web/src/layout.rs +++ b/crates/im-web/src/layout.rs @@ -199,6 +199,57 @@ pub async fn soft_nav_script(cx: &Cx) -> Result { var nav = 0; function step() { nav += 1; return nav; } + // Field preservation, izlek's model: only a dirty or focused field is + // worth saving, and the caret offsets come along — a live search typing + // through a refresh keeps both focus and cursor. + function keyOf(el) { + var form = el.form ? (el.form.getAttribute('action') || '') : ''; + return form + '|' + (el.name || '') + '|' + (el.type || '') + '|' + (el.tagName || ''); + } + function editable(el) { + return el.type !== 'hidden' && el.type !== 'password' && el.type !== 'file'; + } + function captureFields() { + var active = document.activeElement, out = []; + document.querySelectorAll('input, textarea, select').forEach(function (el) { + if (!editable(el)) { return; } + var moved; + if (el.type === 'checkbox' || el.type === 'radio') { moved = el.checked !== el.defaultChecked; } + else if (el.tagName === 'SELECT') { + var def = -1; + for (var j = 0; j < el.options.length; j++) { if (el.options[j].defaultSelected) { def = j; break; } } + if (def < 0) { def = 0; } + moved = el.selectedIndex !== def; + } else { moved = el.value !== el.defaultValue; } + var focused = el === active; + if (!moved && !focused) { return; } + var start = -1, end = -1; + try { if (el.selectionStart != null) { start = el.selectionStart; end = el.selectionEnd; } } catch (err) { } + out.push({ k: keyOf(el), v: el.value, c: el.checked, i: el.selectedIndex, f: focused, s: start, e: end }); + }); + return out; + } + function restoreFields(saved) { + if (!saved || !saved.length) { return; } + var fields = document.querySelectorAll('input, textarea, select'); + saved.forEach(function (was) { + var el = null; + for (var i = 0; i < fields.length; i++) { + if (keyOf(fields[i]) === was.k) { el = fields[i]; break; } + } + if (!el) { return; } + if (el.type === 'checkbox' || el.type === 'radio') { el.checked = was.c; } + else if (el.tagName === 'SELECT') { el.selectedIndex = was.i; } + else { el.value = was.v; } + if (was.f) { + try { + el.focus(); + if (was.s >= 0 && el.setSelectionRange) { el.setSelectionRange(was.s, was.e); } + } catch (err) { } + } + }); + } + function adopt(doc, preserve) { document.title = doc.title; var root = doc.documentElement; @@ -206,14 +257,7 @@ pub async fn soft_nav_script(cx: &Cx) -> Result { if (root.hasAttribute(a)) { document.documentElement.setAttribute(a, root.getAttribute(a)); } else { document.documentElement.removeAttribute(a); } }); - var fields = null; - if (preserve) { - fields = {}; - document.querySelectorAll('input[name], select[name], textarea[name]').forEach(function (f) { - if (f.type === 'password' || f.type === 'file' || f.type === 'hidden') { return; } - fields[f.name] = f.value; - }); - } + var keep = preserve ? captureFields() : null; document.body.replaceChildren(); Array.from(doc.body.childNodes).forEach(function (n) { document.body.appendChild(document.importNode(n, true)); }); document.querySelectorAll('script').forEach(function (old) { @@ -221,11 +265,8 @@ pub async fn soft_nav_script(cx: &Cx) -> Result { s.textContent = old.textContent; old.replaceWith(s); }); - if (fields) { - document.querySelectorAll('input[name], select[name], textarea[name]').forEach(function (f) { - if (Object.prototype.hasOwnProperty.call(fields, f.name)) { f.value = fields[f.name]; } - }); - } + if (window.__imDdEnhance) { window.__imDdEnhance(); } + if (keep) { restoreFields(keep); } } function swap(html, url, fresh, push) { @@ -285,9 +326,41 @@ pub async fn soft_nav_script(cx: &Cx) -> Result { c.form.requestSubmit(); }); + // izlek's __izQuery: a filtered view asked for in place — the URL swaps + // under replaceState (no history entry per keystroke), fields and caret + // come through the adopt. + window.__imQuery = function (url) { + var mark = step(); + fetch(url, { headers: { accept: 'text/html' } }) + .then(function (r) { return r.text().then(function (text) { return { text: text, url: r.url }; }); }) + .then(function (res) { + if (mark !== nav) { return; } + var doc = new DOMParser().parseFromString(res.text, 'text/html'); + if (!doc.body) { return; } + var x = window.scrollX, y = window.scrollY; + adopt(doc, true); + history.replaceState(null, '', res.url); + window.scrollTo(x, y); + }) + .catch(function () {}); + }; + + // The logs search box: two hundred still milliseconds after the last key, + // the whole filter form rides the query — kind, actor, dates, direction + // and q together. + var searchTimer = null; + document.addEventListener('input', function (e) { + var el = e.target; + if (!el || el.name !== 'q' || !el.closest || !el.closest('.logs-filters')) { return; } + if (searchTimer) { clearTimeout(searchTimer); } + searchTimer = setTimeout(function () { + searchTimer = null; + if (!el.form) { return; } + window.__imQuery((el.form.getAttribute('action') || location.pathname) + '?' + new URLSearchParams(new FormData(el.form)).toString()); + }, 200); + }); + window.__imRefresh = function () { - var active = document.activeElement; - if (active && /^(INPUT|SELECT|TEXTAREA)$/.test(active.tagName)) { return; } fetch(location.href, { headers: { accept: 'text/html' } }) .then(function (r) { return r.text(); }) .then(function (html) { @@ -356,6 +429,7 @@ pub async fn shell(cx: &Cx, title: &str, viewer: Option<&User>, stage: Result) - (soft_nav_script(cx).await?) if viewer.is_some() { (live_script(cx).await?) + (crate::dropdown::dropdown_script(cx).await?) } diff --git a/crates/im-web/src/main.rs b/crates/im-web/src/main.rs index 771655e..038d344 100644 --- a/crates/im-web/src/main.rs +++ b/crates/im-web/src/main.rs @@ -13,6 +13,7 @@ use topcoat::router::{BodyLimit, Router, RouterBuilderDiscoverExt, route}; mod admin; mod auth; mod config; +mod dropdown; mod i18n; mod layout; mod live; diff --git a/style/main.scss b/style/main.scss index e2cb6ed..53df8d6 100644 --- a/style/main.scss +++ b/style/main.scss @@ -1132,3 +1132,86 @@ input[type="checkbox"] { accent-color: var(--accent); } .admin-shell { padding: 16px 12px 32px; } .admin-invite { flex-wrap: wrap; } } + +// --- Themed dropdown (izlek's dropdown, on im's tokens) -------------------- +// The native select hides but keeps posting; the trigger wears its classes +// (auth-input included), so the closed control already matches the design. + +.dd-native { display: none; } + +.dd-trigger { + display: flex; + align-items: center; + font: inherit; + text-align: left; + cursor: pointer; + + &::after { + content: "▾"; + margin-left: auto; + padding-left: 8px; + color: var(--muted); + font-size: 11px; + } +} + +.dd-panel { + position: fixed; + z-index: 60; + max-height: 260px; + overflow-y: auto; + background: var(--surface); + border: 1px solid var(--border-strong); + border-radius: var(--radius); + box-shadow: var(--shadow-2); + padding: 8px; + display: none; + + &.dd-open { display: block; } +} + +.dd-option { + display: block; + width: 100%; + padding: 6px 10px; + border: none; + border-radius: var(--radius-sm); + background: none; + font: inherit; + font-size: 13px; + text-align: left; + color: var(--ink); + white-space: nowrap; + cursor: pointer; + transition: background-color var(--dur-fast) var(--ease); + + &:hover, + &:focus, + &.dd-option-active { + background: var(--row-hover); + outline: none; + } +} + +.dd-option-selected { + background: var(--accent-tint); + color: var(--accent-ink); +} + +.dd-option-hidden { display: none; } + +.dd-search { + display: block; + width: 100%; + margin-bottom: 6px; + padding: 8px 10px; + border: none; + border-bottom: 1px solid var(--border); + background: none; + font: inherit; + font-size: 13px; + color: var(--ink); +} + +// The search box in the logs filter row takes the room the selects leave. +.logs-filters .logs-q { flex: 2 1 200px; }