Runners table fits at 1100px, labels under the name, one actions menu
Browse files at this commit297bb1b21c089b981c564c5f5f2d3fcc9b1383f9Parent: 0503713- style
- runners table fits at 1100px, labels under the name, one actions menu
4 changed files +246 -93
- crates/forge-web/assets/nav.js +36 -0
- crates/forge-web/src/i18n/admin.rs +0 -4
- crates/forge-web/src/pages/admin_runners.rs +38 -28
- style/main.scss +172 -61
crates/forge-web/assets/nav.jsmodified+36 -0
| @@ -1351,9 +1351,45 @@ | |||
| 1351 | if (cancel) { | 1351 | if (cancel) { |
| 1352 | var det = cancel.closest('details'); | 1352 | var det = cancel.closest('details'); |
| 1353 | if (det) { det.open = false; } | 1353 | if (det) { det.open = false; } |
| 1354 | + var owner = det && det.closest('details.row-menu'); | ||
| 1355 | + if (owner) { owner.open = false; } | ||
| 1356 | + } | ||
| 1357 | + // Row action menus: one open at a time, closed by a click anywhere outside. | ||
| 1358 | + var menu = t.closest('details.row-menu'); | ||
| 1359 | + document.querySelectorAll('details.row-menu[open]').forEach(function (d) { | ||
| 1360 | + if (d !== menu) { d.open = false; } | ||
| 1361 | + }); | ||
| 1362 | + }, false); | ||
| 1363 | + | ||
| 1364 | + // Escape closes an open confirm popover first, then the menu (focus returns to its button). The | ||
| 1365 | + // arrow keys move between the menu's items. | ||
| 1366 | + document.addEventListener('keydown', function (e) { | ||
| 1367 | + var menu = document.querySelector('details.row-menu[open]'); | ||
| 1368 | + if (!menu) { return; } | ||
| 1369 | + if (e.key === 'Escape') { | ||
| 1370 | + var inner = menu.querySelector('details.confirm-inline[open]'); | ||
| 1371 | + if (inner) { inner.open = false; var sm = inner.querySelector('summary'); if (sm) { sm.focus(); } } | ||
| 1372 | + else { menu.open = false; menu.querySelector('summary').focus(); } | ||
| 1373 | + e.preventDefault(); | ||
| 1374 | + } else if ((e.key === 'ArrowDown' || e.key === 'ArrowUp') && !menu.querySelector('details.confirm-inline[open]')) { | ||
| 1375 | + var items = Array.prototype.slice.call(menu.querySelectorAll('.row-menu-panel > form > button, .row-menu-panel > button:not(:disabled), .row-menu-panel > .confirm-inline > summary')); | ||
| 1376 | + if (!items.length) { return; } | ||
| 1377 | + var at = items.indexOf(document.activeElement); | ||
| 1378 | + var next = e.key === 'ArrowDown' ? (at + 1) % items.length : (at <= 0 ? items.length - 1 : at - 1); | ||
| 1379 | + items[next].focus(); | ||
| 1380 | + e.preventDefault(); | ||
| 1354 | } | 1381 | } |
| 1355 | }, false); | 1382 | }, false); |
| 1356 | 1383 | ||
| 1384 | + // Opening a menu puts focus on its first item, so the keyboard continues from there. | ||
| 1385 | + document.addEventListener('toggle', function (e) { | ||
| 1386 | + var d = e.target; | ||
| 1387 | + if (d && d.matches && d.matches('details.row-menu') && d.open) { | ||
| 1388 | + var first = d.querySelector('.row-menu-panel > form > button, .row-menu-panel > button:not(:disabled), .row-menu-panel > .confirm-inline > summary'); | ||
| 1389 | + if (first) { first.focus(); } | ||
| 1390 | + } | ||
| 1391 | + }, true); | ||
| 1392 | + | ||
| 1357 | // "Copy log": fetches the job's log.txt once and puts the whole text on the clipboard. The button is | 1393 | // "Copy log": fetches the job's log.txt once and puts the whole text on the clipboard. The button is |
| 1358 | // disabled meanwhile, so a big log is not fetched twice; its label shows the outcome, then returns. | 1394 | // disabled meanwhile, so a big log is not fetched twice; its label shows the outcome, then returns. |
| 1359 | function copyText(text) { | 1395 | function copyText(text) { |
crates/forge-web/src/i18n/admin.rsmodified+0 -4
| @@ -157,7 +157,6 @@ pub enum K { | |||
| 157 | TableDuration, | 157 | TableDuration, |
| 158 | TableError, | 158 | TableError, |
| 159 | TableKind, | 159 | TableKind, |
| 160 | - TableLabels, | ||
| 161 | TableLastError, | 160 | TableLastError, |
| 162 | TableName, | 161 | TableName, |
| 163 | TableQueued, | 162 | TableQueued, |
| @@ -548,8 +547,6 @@ pub fn t(lang: Lang, key: K) -> &'static str { | |||
| 548 | (TableError, Tr) => "Hata", | 547 | (TableError, Tr) => "Hata", |
| 549 | (TableKind, En) => "Kind", | 548 | (TableKind, En) => "Kind", |
| 550 | (TableKind, Tr) => "Tür", | 549 | (TableKind, Tr) => "Tür", |
| 551 | - (TableLabels, En) => "Labels", | ||
| 552 | - (TableLabels, Tr) => "Etiketler", | ||
| 553 | (TableLastError, En) => "Last error", | 550 | (TableLastError, En) => "Last error", |
| 554 | (TableLastError, Tr) => "Son hata", | 551 | (TableLastError, Tr) => "Son hata", |
| 555 | (TableName, En) => "Name", | 552 | (TableName, En) => "Name", |
| @@ -946,7 +943,6 @@ mod tests { | |||
| 946 | K::TableDuration, | 943 | K::TableDuration, |
| 947 | K::TableError, | 944 | K::TableError, |
| 948 | K::TableKind, | 945 | K::TableKind, |
| 949 | - K::TableLabels, | ||
| 950 | K::TableLastError, | 946 | K::TableLastError, |
| 951 | K::TableName, | 947 | K::TableName, |
| 952 | K::TableQueued, | 948 | K::TableQueued, |
crates/forge-web/src/pages/admin_runners.rsmodified+38 -28
| @@ -294,43 +294,42 @@ async fn runners_view( | |||
| 294 | if rows.is_empty() { | 294 | if rows.is_empty() { |
| 295 | <p class="muted">(g::t(lang, K::NoRunnersYet))</p> | 295 | <p class="muted">(g::t(lang, K::NoRunnersYet))</p> |
| 296 | } else { | 296 | } else { |
| 297 | - <div class="table-wrap"> | 297 | + <div class="table-wrap runners-wrap"> |
| 298 | <table class="table runners"> | 298 | <table class="table runners"> |
| 299 | <thead> | 299 | <thead> |
| 300 | <tr> | 300 | <tr> |
| 301 | <th class="runner-name">(g::t(lang, K::TableName))</th> | 301 | <th class="runner-name">(g::t(lang, K::TableName))</th> |
| 302 | - <th class="runner-labels">(g::t(lang, K::TableLabels))</th> | ||
| 303 | <th class="runner-conc">(s(lang, "Concurrency", "Eşzamanlılık"))</th> | 302 | <th class="runner-conc">(s(lang, "Concurrency", "Eşzamanlılık"))</th> |
| 304 | <th class="runner-running">(s(lang, "Running", "Çalışan"))</th> | 303 | <th class="runner-running">(s(lang, "Running", "Çalışan"))</th> |
| 305 | <th class="runner-build">(s(lang, "Version", "Sürüm"))</th> | 304 | <th class="runner-build">(s(lang, "Version", "Sürüm"))</th> |
| 306 | <th class="runner-seen">(g::t(lang, K::LastSeen))</th> | 305 | <th class="runner-seen">(g::t(lang, K::LastSeen))</th> |
| 307 | <th class="runner-state">(g::t(lang, K::TableState))</th> | 306 | <th class="runner-state">(g::t(lang, K::TableState))</th> |
| 308 | - <th class="runner-actions"></th> | 307 | + <th class="runner-actions"><span class="sr-only">(s(lang, "Actions", "İşlemler"))</span></th> |
| 309 | </tr> | 308 | </tr> |
| 310 | </thead> | 309 | </thead> |
| 311 | <tbody> | 310 | <tbody> |
| 312 | for row in rows.iter() { | 311 | for row in rows.iter() { |
| 313 | <tr> | 312 | <tr> |
| 314 | - <td class="runner-name"><a href=(row.detail_href.as_str())><strong>(row.name.as_str())</strong></a></td> | 313 | + <td class="runner-name"> |
| 315 | - <td class="runner-labels"> | 314 | + <a href=(row.detail_href.as_str())><strong>(row.name.as_str())</strong></a> |
| 316 | <span class="runner-label-list"> | 315 | <span class="runner-label-list"> |
| 317 | for label in row.labels.iter() { | 316 | for label in row.labels.iter() { |
| 318 | <span class="runner-label">(label.as_str())</span> | 317 | <span class="runner-label">(label.as_str())</span> |
| 319 | } | 318 | } |
| 320 | </span> | 319 | </span> |
| 321 | </td> | 320 | </td> |
| 322 | - <td class="runner-conc"> | 321 | + <td class="runner-conc" data-label=(s(lang, "Concurrency", "Eşzamanlılık"))> |
| 323 | concurrency_form(lang: lang, csrf: csrf.as_str(), action: row.config_action.as_str(), key: "concurrency", value: row.concurrency.as_str(), source: row.concurrency_source, has_override: row.has_override, back: "list") | 322 | concurrency_form(lang: lang, csrf: csrf.as_str(), action: row.config_action.as_str(), key: "concurrency", value: row.concurrency.as_str(), source: row.concurrency_source, has_override: row.has_override, back: "list") |
| 324 | </td> | 323 | </td> |
| 325 | - <td class="runner-running small">(row.running.to_string())</td> | 324 | + <td class="runner-running small" data-label=(s(lang, "Running", "Çalışan"))>(row.running.to_string())</td> |
| 326 | - <td class="runner-build small" title=(row.build.as_str())> | 325 | + <td class="runner-build small" data-label=(s(lang, "Version", "Sürüm")) title=(row.build.as_str())> |
| 327 | if !row.build_short.is_empty() { | 326 | if !row.build_short.is_empty() { |
| 328 | <code>(row.build_short.as_str())</code> | 327 | <code>(row.build_short.as_str())</code> |
| 329 | } | 328 | } |
| 330 | <span class=(format!("ci-state {}", row.build_class))>(row.build_label)</span> | 329 | <span class=(format!("ci-state {}", row.build_class))>(row.build_label)</span> |
| 331 | </td> | 330 | </td> |
| 332 | - <td class="runner-seen small" title=(row.last_seen_full.as_str())>(row.last_seen.as_str())</td> | 331 | + <td class="runner-seen small" data-label=(g::t(lang, K::LastSeen)) title=(row.last_seen_full.as_str())>(row.last_seen.as_str())</td> |
| 333 | - <td class="runner-state"> | 332 | + <td class="runner-state" data-label=(g::t(lang, K::TableState))> |
| 334 | if row.disabled { | 333 | if row.disabled { |
| 335 | <span class="ci-state runner-disabled">(g::t(lang, K::Disabled))</span> | 334 | <span class="ci-state runner-disabled">(g::t(lang, K::Disabled))</span> |
| 336 | } else { | 335 | } else { |
| @@ -341,19 +340,22 @@ async fn runners_view( | |||
| 341 | } | 340 | } |
| 342 | </td> | 341 | </td> |
| 343 | <td class="runner-actions"> | 342 | <td class="runner-actions"> |
| 344 | - <div class="runner-action-row"> | 343 | + <details class="row-menu"> |
| 345 | - if row.disabled { | 344 | + <summary class="button row-menu-btn" aria-label=(s(lang, "Actions", "İşlemler")) aria-haspopup="menu">"⋯"</summary> |
| 346 | - <form method="post" action=(row.toggle_action.as_str()) class="inline-form"> | 345 | + <div class="row-menu-panel" role="menu"> |
| 347 | - <input type="hidden" name="csrf" value=(csrf.as_str())> | 346 | + if row.disabled { |
| 348 | - <input type="hidden" name="disabled" value="0"> | 347 | + <form method="post" action=(row.toggle_action.as_str()) class="inline-form"> |
| 349 | - <button type="submit">(g::t(lang, K::Enable))</button> | 348 | + <input type="hidden" name="csrf" value=(csrf.as_str())> |
| 350 | - </form> | 349 | + <input type="hidden" name="disabled" value="0"> |
| 351 | - } else { | 350 | + <button type="submit">(g::t(lang, K::Enable))</button> |
| 352 | - confirm_post(lang: lang, csrf: csrf.as_str(), action: row.toggle_action.as_str(), label: g::t(lang, K::Disable), message: disable_message(lang, row.name.as_str()), confirm: s(lang, "Yes, disable", "Evet, devre dışı bırak"), danger: false, fields: vec![("disabled", "1")]) | 351 | + </form> |
| 353 | - } | 352 | + } else { |
| 354 | - restart_control(lang: lang, csrf: csrf.as_str(), action: row.restart_action.as_str(), back: "list", can_restart: row.can_restart, pending: row.restart_pending) | 353 | + confirm_post(lang: lang, csrf: csrf.as_str(), action: row.toggle_action.as_str(), label: g::t(lang, K::Disable), message: disable_message(lang, row.name.as_str()), confirm: s(lang, "Yes, disable", "Evet, devre dışı bırak"), danger: false, fields: vec![("disabled", "1")]) |
| 355 | - confirm_post(lang: lang, csrf: csrf.as_str(), action: row.delete_action.as_str(), label: i18n::t(lang, Key::Delete), message: delete_message(lang, row.name.as_str()), confirm: s(lang, "Yes, delete", "Evet, sil"), danger: true, fields: vec![]) | 354 | + } |
| 356 | - </div> | 355 | + restart_control(lang: lang, csrf: csrf.as_str(), action: row.restart_action.as_str(), back: "list", can_restart: row.can_restart, pending: row.restart_pending) |
| 356 | + confirm_post(lang: lang, csrf: csrf.as_str(), action: row.delete_action.as_str(), label: i18n::t(lang, Key::Delete), message: delete_message(lang, row.name.as_str()), confirm: s(lang, "Yes, delete", "Evet, sil"), danger: true, fields: vec![]) | ||
| 357 | + </div> | ||
| 358 | + </details> | ||
| 357 | </td> | 359 | </td> |
| 358 | </tr> | 360 | </tr> |
| 359 | } | 361 | } |
| @@ -405,6 +407,17 @@ async fn confirm_post( | |||
| 405 | }) | 407 | }) |
| 406 | } | 408 | } |
| 407 | 409 | ||
| 410 | +/// The tooltip of the concurrency input: where the shown value comes from. | ||
| 411 | +fn source_title(lang: Lang, source: &str) -> String { | ||
| 412 | + match (source, lang) { | ||
| 413 | + ("", _) => String::new(), | ||
| 414 | + ("UI", Lang::Tr) => "Değer arayüzden ayarlandı".to_owned(), | ||
| 415 | + ("UI", _) => "Value set in the UI".to_owned(), | ||
| 416 | + (other, Lang::Tr) => format!("Değer {other} dosyasından"), | ||
| 417 | + (other, _) => format!("Value from {other}"), | ||
| 418 | + } | ||
| 419 | +} | ||
| 420 | + | ||
| 408 | fn delete_message(lang: Lang, name: &str) -> String { | 421 | fn delete_message(lang: Lang, name: &str) -> String { |
| 409 | match lang { | 422 | match lang { |
| 410 | Lang::Tr => format!("{name} silinsin mi? Makinenin sonrasında yeniden kaydolması gerekir."), | 423 | Lang::Tr => format!("{name} silinsin mi? Makinenin sonrasında yeniden kaydolması gerekir."), |
| @@ -472,13 +485,10 @@ async fn concurrency_form( | |||
| 472 | <input type="hidden" name="csrf" value=(csrf)> | 485 | <input type="hidden" name="csrf" value=(csrf)> |
| 473 | <input type="hidden" name="key" value=(key)> | 486 | <input type="hidden" name="key" value=(key)> |
| 474 | <input type="hidden" name="back" value=(back)> | 487 | <input type="hidden" name="back" value=(back)> |
| 475 | - <input type="number" name="value" value=(value) min="1" max="64" step="1" inputmode="numeric" required="required" aria-label=(s(lang, "Concurrency", "Eşzamanlılık"))> | 488 | + <input type="number" name="value" value=(value) min="1" max="64" step="1" inputmode="numeric" required="required" aria-label=(s(lang, "Concurrency", "Eşzamanlılık")) title=(source_title(lang, source))> |
| 476 | <button type="submit">(s(lang, "Save", "Kaydet"))</button> | 489 | <button type="submit">(s(lang, "Save", "Kaydet"))</button> |
| 477 | if has_override { | 490 | if has_override { |
| 478 | - <button type="submit" name="reset" value="1" formnovalidate="formnovalidate" title=(s(lang, "Use the runner.toml value", "runner.toml değerini kullan")) aria-label=(s(lang, "Use the runner.toml value", "runner.toml değerini kullan"))>(s(lang, "Reset", "Sıfırla"))</button> | 491 | + <button type="submit" name="reset" value="1" formnovalidate="formnovalidate" title=(s(lang, "Use the runner.toml value", "runner.toml değerini kullan")) aria-label=(s(lang, "Use the runner.toml value", "runner.toml değerini kullan"))>"↺"</button> |
| 479 | - } | ||
| 480 | - if !source.is_empty() { | ||
| 481 | - <span class="muted small runner-source">(source)</span> | ||
| 482 | } | 492 | } |
| 483 | </form> | 493 | </form> |
| 484 | }) | 494 | }) |
style/main.scssmodified+172 -61
| @@ -4240,11 +4240,20 @@ $ansi-colours: ( | |||
| 4240 | } | 4240 | } |
| 4241 | } | 4241 | } |
| 4242 | 4242 | ||
| 4243 | -// Admin runners table: every column sizes to its content except Name and Labels, which share the | 4243 | +// Admin runners table: Name takes the slack and carries the label chips under it; every other column |
| 4244 | -// slack in fixed proportions so a long label list wraps instead of pushing the rest to the right. | 4244 | +// sizes to its content so the table fits without sideways scroll. All text is left aligned and th |
| 4245 | -// All text is left aligned and th and td share the base padding, so a header sits over its cell. | 4245 | +// and td share one padding, so a header sits over its cell. The row actions live in a menu; its |
| 4246 | -// Cells are single lines centered on one axis; the actions sit flush right. State reuses `.ci-state`. | 4246 | +// panel is absolutely positioned, so the wrapper must not clip it. State reuses `.ci-state`. |
| 4247 | +.table-wrap.runners-wrap { | ||
| 4248 | + overflow: visible; | ||
| 4249 | +} | ||
| 4250 | + | ||
| 4247 | .table.runners { | 4251 | .table.runners { |
| 4252 | + th, | ||
| 4253 | + td { | ||
| 4254 | + padding-right: 8px; | ||
| 4255 | + } | ||
| 4256 | + | ||
| 4248 | th.runner-conc, | 4257 | th.runner-conc, |
| 4249 | td.runner-conc, | 4258 | td.runner-conc, |
| 4250 | th.runner-running, | 4259 | th.runner-running, |
| @@ -4254,7 +4263,9 @@ $ansi-colours: ( | |||
| 4254 | th.runner-seen, | 4263 | th.runner-seen, |
| 4255 | td.runner-seen, | 4264 | td.runner-seen, |
| 4256 | th.runner-state, | 4265 | th.runner-state, |
| 4257 | - td.runner-state { | 4266 | + td.runner-state, |
| 4267 | + th.runner-actions, | ||
| 4268 | + td.runner-actions { | ||
| 4258 | width: 1%; | 4269 | width: 1%; |
| 4259 | white-space: nowrap; | 4270 | white-space: nowrap; |
| 4260 | } | 4271 | } |
| @@ -4265,40 +4276,169 @@ $ansi-colours: ( | |||
| 4265 | 4276 | ||
| 4266 | th.runner-actions, | 4277 | th.runner-actions, |
| 4267 | td.runner-actions { | 4278 | td.runner-actions { |
| 4268 | - width: 1%; | ||
| 4269 | padding-right: 0; | 4279 | padding-right: 0; |
| 4270 | text-align: right; | 4280 | text-align: right; |
| 4271 | - white-space: nowrap; | ||
| 4272 | } | 4281 | } |
| 4273 | 4282 | ||
| 4274 | - td.runner-labels { | 4283 | + td.runner-name { |
| 4275 | - width: 20%; | ||
| 4276 | min-width: 8rem; | 4284 | min-width: 8rem; |
| 4285 | + overflow-wrap: anywhere; | ||
| 4286 | + | ||
| 4287 | + .runner-label-list { | ||
| 4288 | + margin-top: 4px; | ||
| 4289 | + } | ||
| 4277 | } | 4290 | } |
| 4278 | 4291 | ||
| 4279 | - th, | 4292 | + td.runner-build > *, |
| 4280 | - td { | 4293 | + td.runner-state > * { |
| 4281 | - padding-right: 10px; | 4294 | + vertical-align: middle; |
| 4282 | } | 4295 | } |
| 4296 | +} | ||
| 4283 | 4297 | ||
| 4284 | - th.runner-actions, | 4298 | +// The row actions menu: a "..." button that opens a small panel of the actions. Each item is a plain |
| 4285 | - td.runner-actions { | 4299 | +// button or a `confirm-inline` summary; the confirm popover is fixed, so the panel does not clip it. |
| 4286 | - padding-right: 0; | 4300 | +.row-menu { |
| 4301 | + display: inline-block; | ||
| 4302 | + position: relative; | ||
| 4303 | + text-align: left; | ||
| 4304 | + | ||
| 4305 | + > summary { | ||
| 4306 | + list-style: none; | ||
| 4307 | + cursor: pointer; | ||
| 4308 | + | ||
| 4309 | + &::-webkit-details-marker { | ||
| 4310 | + display: none; | ||
| 4311 | + } | ||
| 4287 | } | 4312 | } |
| 4288 | 4313 | ||
| 4289 | - td.runner-name { | 4314 | + .row-menu-btn { |
| 4290 | - min-width: 6rem; | 4315 | + box-sizing: border-box; |
| 4291 | - max-width: 11rem; | 4316 | + min-width: var(--control-h); |
| 4292 | - overflow-wrap: anywhere; | 4317 | + height: var(--control-h); |
| 4318 | + padding: 0 8px; | ||
| 4319 | + font-size: 1.125rem; | ||
| 4320 | + line-height: 1; | ||
| 4293 | } | 4321 | } |
| 4294 | 4322 | ||
| 4295 | - td.runner-build > *, | 4323 | + .row-menu-panel { |
| 4296 | - td.runner-state > * { | 4324 | + position: absolute; |
| 4297 | - vertical-align: middle; | 4325 | + top: calc(100% + 4px); |
| 4326 | + right: 0; | ||
| 4327 | + z-index: 40; | ||
| 4328 | + display: flex; | ||
| 4329 | + flex-direction: column; | ||
| 4330 | + min-width: 11rem; | ||
| 4331 | + padding: 4px; | ||
| 4332 | + background: var(--surface); | ||
| 4333 | + border: 1px solid var(--border-strong); | ||
| 4334 | + border-radius: var(--radius-lg); | ||
| 4335 | + box-shadow: var(--shadow); | ||
| 4298 | } | 4336 | } |
| 4299 | 4337 | ||
| 4300 | - form.runner-conc-form { | 4338 | + .row-menu-panel form.inline-form, |
| 4301 | - flex-wrap: nowrap; | 4339 | + .row-menu-panel .confirm-inline { |
| 4340 | + display: block; | ||
| 4341 | + margin: 0; | ||
| 4342 | + } | ||
| 4343 | + | ||
| 4344 | + .row-menu-panel > form > button, | ||
| 4345 | + .row-menu-panel > button, | ||
| 4346 | + .row-menu-panel > .confirm-inline > summary.button { | ||
| 4347 | + display: flex; | ||
| 4348 | + align-items: center; | ||
| 4349 | + box-sizing: border-box; | ||
| 4350 | + width: 100%; | ||
| 4351 | + height: 34px; | ||
| 4352 | + margin: 0; | ||
| 4353 | + padding: 0 10px; | ||
| 4354 | + border: 0; | ||
| 4355 | + border-radius: var(--radius-md); | ||
| 4356 | + background: none; | ||
| 4357 | + box-shadow: none; | ||
| 4358 | + text-align: left; | ||
| 4359 | + font-weight: 400; | ||
| 4360 | + | ||
| 4361 | + &:hover:not(:disabled), | ||
| 4362 | + &:focus-visible { | ||
| 4363 | + background: var(--code-bg); | ||
| 4364 | + } | ||
| 4365 | + | ||
| 4366 | + &.danger { | ||
| 4367 | + color: var(--danger); | ||
| 4368 | + } | ||
| 4369 | + } | ||
| 4370 | + | ||
| 4371 | + .row-menu-panel > button:disabled { | ||
| 4372 | + color: var(--muted); | ||
| 4373 | + cursor: default; | ||
| 4374 | + } | ||
| 4375 | + | ||
| 4376 | + .row-menu-panel > .muted { | ||
| 4377 | + padding: 0 10px; | ||
| 4378 | + line-height: 34px; | ||
| 4379 | + } | ||
| 4380 | +} | ||
| 4381 | + | ||
| 4382 | +// Phone: each runner is a card, every cell a label and value row, the menu at the card's end. | ||
| 4383 | +@media (max-width: 720px) { | ||
| 4384 | + .table.runners { | ||
| 4385 | + display: block; | ||
| 4386 | + | ||
| 4387 | + thead { | ||
| 4388 | + display: none; | ||
| 4389 | + } | ||
| 4390 | + | ||
| 4391 | + tbody, | ||
| 4392 | + tr { | ||
| 4393 | + display: block; | ||
| 4394 | + } | ||
| 4395 | + | ||
| 4396 | + tr { | ||
| 4397 | + padding: 12px 0; | ||
| 4398 | + border-bottom: 1px solid var(--border); | ||
| 4399 | + } | ||
| 4400 | + | ||
| 4401 | + th, | ||
| 4402 | + td, | ||
| 4403 | + td[class] { | ||
| 4404 | + display: block; | ||
| 4405 | + width: auto; | ||
| 4406 | + padding: 0; | ||
| 4407 | + border: 0; | ||
| 4408 | + } | ||
| 4409 | + | ||
| 4410 | + tr { | ||
| 4411 | + position: relative; | ||
| 4412 | + } | ||
| 4413 | + | ||
| 4414 | + td.runner-name { | ||
| 4415 | + padding-bottom: 8px; | ||
| 4416 | + } | ||
| 4417 | + | ||
| 4418 | + td[data-label] { | ||
| 4419 | + display: flex; | ||
| 4420 | + align-items: center; | ||
| 4421 | + justify-content: space-between; | ||
| 4422 | + gap: 12px; | ||
| 4423 | + min-height: 36px; | ||
| 4424 | + | ||
| 4425 | + &::before { | ||
| 4426 | + content: attr(data-label); | ||
| 4427 | + color: var(--muted); | ||
| 4428 | + font-size: 0.78125rem; | ||
| 4429 | + } | ||
| 4430 | + } | ||
| 4431 | + | ||
| 4432 | + td.runner-name { | ||
| 4433 | + padding-right: 48px; | ||
| 4434 | + } | ||
| 4435 | + | ||
| 4436 | + // The menu sits in the card's top right corner, beside the name. | ||
| 4437 | + td.runner-actions { | ||
| 4438 | + position: absolute; | ||
| 4439 | + top: 12px; | ||
| 4440 | + right: 0; | ||
| 4441 | + } | ||
| 4302 | } | 4442 | } |
| 4303 | } | 4443 | } |
| 4304 | 4444 | ||
| @@ -4320,17 +4460,17 @@ $ansi-colours: ( | |||
| 4320 | white-space: nowrap; | 4460 | white-space: nowrap; |
| 4321 | } | 4461 | } |
| 4322 | 4462 | ||
| 4323 | -// Runner concurrency and config forms: a compact input, its buttons and the muted source tag on one | 4463 | +// Runner concurrency form: a compact input, Save and, while an override is set, a small reset icon, |
| 4324 | -// line. `form.` outranks the later plain `.inline-form { display: inline }`. | 4464 | +// all on one line. The value's source is the input's tooltip, so nothing else widens the cell. |
| 4325 | form.runner-conc-form { | 4465 | form.runner-conc-form { |
| 4326 | display: flex; | 4466 | display: flex; |
| 4327 | - flex-wrap: wrap; | 4467 | + flex-wrap: nowrap; |
| 4328 | align-items: center; | 4468 | align-items: center; |
| 4329 | - gap: 4px 8px; | 4469 | + gap: 6px; |
| 4330 | margin: 0; | 4470 | margin: 0; |
| 4331 | 4471 | ||
| 4332 | input[type="number"] { | 4472 | input[type="number"] { |
| 4333 | - width: 4.5rem; | 4473 | + width: 3.75rem; |
| 4334 | min-width: 0; | 4474 | min-width: 0; |
| 4335 | text-align: left; | 4475 | text-align: left; |
| 4336 | } | 4476 | } |
| @@ -4343,9 +4483,9 @@ form.runner-conc-form { | |||
| 4343 | margin: 0; | 4483 | margin: 0; |
| 4344 | } | 4484 | } |
| 4345 | 4485 | ||
| 4346 | - .runner-source { | 4486 | + button[name="reset"] { |
| 4347 | - flex: none; | 4487 | + min-width: var(--control-h); |
| 4348 | - white-space: nowrap; | 4488 | + padding: 0; |
| 4349 | } | 4489 | } |
| 4350 | } | 4490 | } |
| 4351 | 4491 | ||
| @@ -4369,35 +4509,6 @@ form.runner-conc-form { | |||
| 4369 | color: var(--muted); | 4509 | color: var(--muted); |
| 4370 | } | 4510 | } |
| 4371 | 4511 | ||
| 4372 | -.runner-action-row { | ||
| 4373 | - display: flex; | ||
| 4374 | - justify-content: flex-end; | ||
| 4375 | - align-items: center; | ||
| 4376 | - gap: 8px; | ||
| 4377 | - | ||
| 4378 | - form { | ||
| 4379 | - display: flex; | ||
| 4380 | - margin: 0; | ||
| 4381 | - } | ||
| 4382 | - | ||
| 4383 | - .confirm-inline { | ||
| 4384 | - display: flex; | ||
| 4385 | - } | ||
| 4386 | - | ||
| 4387 | - button, | ||
| 4388 | - summary.button { | ||
| 4389 | - box-sizing: border-box; | ||
| 4390 | - min-width: 4.25rem; | ||
| 4391 | - height: var(--control-h); | ||
| 4392 | - margin: 0; | ||
| 4393 | - padding-inline: 12px; | ||
| 4394 | - } | ||
| 4395 | - | ||
| 4396 | - // The popover buttons keep their natural width. | ||
| 4397 | - .confirm-pop button { | ||
| 4398 | - min-width: 0; | ||
| 4399 | - } | ||
| 4400 | -} | ||
| 4401 | 4512 | ||
| 4402 | // CI: runs list and run detail. The split view has the runs on the left and the selected run on the | 4513 | // CI: runs list and run detail. The split view has the runs on the left and the selected run on the |
| 4403 | // right. Bars and the timeline are SVG, so their sizes are in viewBox units and need no inline style. | 4514 | // right. Bars and the timeline are SVG, so their sizes are in viewBox units and need no inline style. |