Admin server settings are one line a setting (name, control, notes) on eleven short pages that each fit the screen, with Restart server in the head
Browse files at this commit41ee476e8b139791f96c0d623a9e02b8dfd7b76eParent: fd174b4All checks have passed
Show checks
ci/buildSucceededDetails
- style
- admin server settings are one line a setting (name, control, notes) on eleven short pages that each fit the screen, with Restart server in the head
- tabs and rails no longer shift when you pick another, since the current one keeps its neighbours' weight
- CI draws passed in green, failed in red and running in the accent everywhere: run and job ticks, step strips, state pills, a runner's jobs, the head's run dots and the commit history bars
- the history caption says what height and colour mean
- selects are 280px like every field, with the chevron at their end
- Appearance's background chips show each base's tint, and both colour rows put their sliders and hex on one edge
- the top bar's avatar, wordmark, path and Ctrl K share one middle line, and Log out lines up with the menu's other rows
- repo settings is one rail list with no second row of tabs
- the file view has one switch for Rendered, Source and Blame, the same on every view, before its actions
- the branch picker is the standard small pill and the files rail starts on the sheet's edge
- Health puts its verdict in the head and Storage beside Services so it fits the screen
- the branch rule form uses the field kit with each note beside its box
- a comment's reactions, Edit and Delete share one row
- every pager is one row of Newer, the page and Older on the sheet's inset 🐛 fix: a runner's log is as tall as the window instead of a 16px strip
- the run timeline's chart shows again, at the page's text size, and a job's last line starts on the left
- a running run's title names the step that is running, not one that failed
- a closed confirm no longer leaves an empty gap in a row of actions
- the passed state pill is green instead of the accent
- admin user search says it covers organizations too
28 changed files +899 -398
- crates/forge-web-base/src/i18n/repo_admin.rs +4 -4
- crates/forge-web/build.rs +29 -4
- crates/forge-web/src/pages/admin_health.rs +20 -13
- crates/forge-web/src/pages/admin_runners.rs +14 -5
- crates/forge-web/src/pages/admin_server.rs +189 -167
- crates/forge-web/src/pages/admin_users.rs +1 -1
- crates/forge-web/src/pages/blame.rs +14 -1
- crates/forge-web/src/pages/blob.rs +23 -14
- crates/forge-web/src/pages/ci_job.rs +1 -1
- crates/forge-web/src/pages/ci_runs.rs +21 -13
- crates/forge-web/src/pages/commits.rs +1 -1
- crates/forge-web/src/pages/discussions.rs +1 -1
- crates/forge-web/src/pages/issues_list.rs +1 -1
- crates/forge-web/src/pages/palette.rs +8 -10
- crates/forge-web/src/pages/pulls_list.rs +1 -1
- crates/forge-web/src/pages/repo_settings.rs +67 -67
- crates/forge-web/src/pages/repo_side.rs +2 -1
- crates/forge-web/src/views/timeline.rs +3 -2
- docs/ui-language.md +3 -2
- style/_admin_rows.scss +6 -2
- style/_ci_estimate.scss +34 -16
- style/_min_admin.scss +0 -9
- style/_one.scss +197 -30
- style/_one_admin.scss +120 -29
- style/_one_ci.scss +108 -0
- style/_one_threads.scss +21 -0
- style/_timeline.scss +7 -1
- style/main.scss +3 -2
crates/forge-web-base/src/i18n/repo_admin.rsmodified+4 -4
| @@ -174,10 +174,10 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 174 | 174 | (AlreadyOwner, En) => "The repository already belongs to that user.", |
| 175 | 175 | (AlreadyOwner, Tr) => "Depo zaten bu kullanıcıya ait.", |
| 176 | 176 | (ApprovalsHelp, En) => { |
| 177 | - "Approvals count only from reviewers with Write access or higher, using each reviewer's latest review." | |
| 177 | + "How many a pull needs, 0 to 20. They count only from reviewers with Write access or higher, using each reviewer's latest review." | |
| 178 | 178 | } |
| 179 | 179 | (ApprovalsHelp, Tr) => { |
| 180 | - "Onaylar yalnızca yazma veya daha yüksek erişimi olan inceleyicilerden, her inceleyicinin en son incelemesine göre sayılır." | |
| 180 | + "Bir çekme isteğinin gereken onay sayısı, 0 ile 20 arası. Onaylar yalnızca yazma veya daha yüksek erişimi olan inceleyicilerden, her inceleyicinin en son incelemesine göre sayılır." | |
| 181 | 181 | } |
| 182 | 182 | (ApprovalsRange, En) => "required approvals must be a whole number from 0 to 20", |
| 183 | 183 | (ApprovalsRange, Tr) => "Gerekli onay sayısı 0 ile 20 arasında bir tam sayı olmalıdır.", |
| @@ -403,8 +403,8 @@ pub fn t(lang: Lang, key: K) -> &'static str { | ||
| 403 | 403 | (RequireUpToDate, Tr) => { |
| 404 | 404 | "Çekme isteğinin kaynak dalı, hedef dalın en son hâlini içermelidir" |
| 405 | 405 | } |
| 406 | - (RequiredApprovals, En) => "Required approvals (0 to 20)", | |
| 407 | - (RequiredApprovals, Tr) => "Gerekli onay sayısı (0 ile 20 arası)", | |
| 406 | + (RequiredApprovals, En) => "Approvals", | |
| 407 | + (RequiredApprovals, Tr) => "Onaylar", | |
| 408 | 408 | (RestrictPushDesc, En) => "Direct pushes are limited to repo admins.", |
| 409 | 409 | (RestrictPushTitle, En) => "Only accept changes through pull requests", |
| 410 | 410 | (Role, En) => "Role", |
crates/forge-web/build.rsmodified+29 -4
| @@ -122,9 +122,34 @@ fn base_rules(css: &mut String, base: &Base) { | ||
| 122 | 122 | ); |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | +/// A base's tint made plain enough to see on a chip: the hue of its muted text, with its | |
| 126 | +/// saturation raised five times (at most 55%) at a middle lightness. The neutrals themselves are | |
| 127 | +/// too close to grey to tell apart at 30px. | |
| 128 | +fn base_tint(hex: &str) -> String { | |
| 129 | + let channel = |i: usize| u8::from_str_radix(&hex[i..i + 2], 16).unwrap_or(0) as f64 / 255.0; | |
| 130 | + let (r, g, b) = (channel(1), channel(3), channel(5)); | |
| 131 | + let (max, min) = (r.max(g).max(b), r.min(g).min(b)); | |
| 132 | + let l = (max + min) / 2.0; | |
| 133 | + let d = max - min; | |
| 134 | + let (h, s) = if d == 0.0 { | |
| 135 | + (0.0, 0.0) | |
| 136 | + } else { | |
| 137 | + let s = d / (1.0 - (2.0 * l - 1.0).abs()); | |
| 138 | + let h = if max == r { | |
| 139 | + ((g - b) / d).rem_euclid(6.0) | |
| 140 | + } else if max == g { | |
| 141 | + (b - r) / d + 2.0 | |
| 142 | + } else { | |
| 143 | + (r - g) / d + 4.0 | |
| 144 | + }; | |
| 145 | + (h * 60.0, s) | |
| 146 | + }; | |
| 147 | + format!("hsl({:.0} {:.0}% 52%)", h, (s * 5.0).min(0.55) * 100.0) | |
| 148 | +} | |
| 149 | + | |
| 125 | 150 | /// The swatch chips for the settings picker. They show fixed colours, so they do not depend on |
| 126 | -/// the current theme: an accent chip is the accent itself, a base chip is its background and text | |
| 127 | -/// split diagonally. | |
| 151 | +/// the current theme: an accent chip is the accent itself, a base chip is its background and its | |
| 152 | +/// tint split diagonally. | |
| 128 | 153 | fn swatch_rules(css: &mut String) { |
| 129 | 154 | for palette in PALETTES { |
| 130 | 155 | css.push_str(&format!( |
| @@ -139,11 +164,11 @@ fn swatch_rules(css: &mut String) { | ||
| 139 | 164 | for base in BASES { |
| 140 | 165 | css.push_str(&format!( |
| 141 | 166 | ".base-swatch[data-base-light-swatch=\"{}\"] {{ background: linear-gradient(135deg, {} 0 50%, {} 50% 100%); }}\n", |
| 142 | - base.id, base.light.bg, base.light.text | |
| 167 | + base.id, base.light.bg, base_tint(base.light.muted) | |
| 143 | 168 | )); |
| 144 | 169 | css.push_str(&format!( |
| 145 | 170 | ".base-swatch[data-base-dark-swatch=\"{}\"] {{ background: linear-gradient(135deg, {} 0 50%, {} 50% 100%); }}\n", |
| 146 | - base.id, base.dark.bg, base.dark.text | |
| 171 | + base.id, base.dark.bg, base_tint(base.dark.muted) | |
| 147 | 172 | )); |
| 148 | 173 | } |
| 149 | 174 | } |
crates/forge-web/src/pages/admin_health.rsmodified+20 -13
| @@ -496,19 +496,24 @@ async fn health_view( | ||
| 496 | 496 | } = health; |
| 497 | 497 | // An active alert needs attention as much as a failing service does. |
| 498 | 498 | let attention = attention + count; |
| 499 | - let summary_dot = if attention > 0 { Dot::Bad } else { Dot::Ok }; | |
| 499 | + // The verdict leads the head's line, with its dot, so the page says how things are first. | |
| 500 | 500 | let summary = if attention > 0 { |
| 501 | - needs_attention(lang, attention) | |
| 501 | + SubPart { | |
| 502 | + text: needs_attention(lang, attention), | |
| 503 | + href: None, | |
| 504 | + class: "b health-sum bad", | |
| 505 | + } | |
| 502 | 506 | } else { |
| 503 | - at(lang, A::Fine).to_owned() | |
| 507 | + SubPart { | |
| 508 | + text: at(lang, A::Fine).to_owned(), | |
| 509 | + href: None, | |
| 510 | + class: "b health-sum ok", | |
| 511 | + } | |
| 504 | 512 | }; |
| 513 | + let sub = vec![summary, SubPart::text(at(lang, A::HealthIntro))]; | |
| 505 | 514 | Ok(view! { |
| 506 | - head(title: at(lang, A::Health), sub: vec![SubPart::text(at(lang, A::HealthIntro))], live: Some("/admin/health/events")) | |
| 507 | - <p class="state"> | |
| 508 | - <span class=(format!("health-dot {}", summary_dot.class()))></span> | |
| 509 | - " " (summary) | |
| 510 | - </p> | |
| 511 | - <div class="sheet"> | |
| 515 | + head(title: at(lang, A::Health), sub: sub, live: Some("/admin/health/events")) | |
| 516 | + <div class="sheet health-sheet"> | |
| 512 | 517 | if count > 0 { |
| 513 | 518 | <section class="sec" role="alert"> |
| 514 | 519 | <h2>(alert_text::banner_heading(lang, count))</h2> |
| @@ -539,11 +544,13 @@ async fn health_view( | ||
| 539 | 544 | for f in facts.into_iter() { |
| 540 | 545 | <div class="line" data-kb-row=""> |
| 541 | 546 | <span class="name">(f.label)</span> |
| 542 | - <span class=(format!("val {}", f.dot.value_class()))>(f.value.as_str())</span> | |
| 547 | + <span class="val"> | |
| 548 | + <span class=(f.dot.value_class())>(f.value.as_str())</span> | |
| 549 | + if !f.detail.is_empty() { | |
| 550 | + " · " <span class="health-path">(f.detail.as_str())</span> | |
| 551 | + } | |
| 552 | + </span> | |
| 543 | 553 | </div> |
| 544 | - if !f.detail.is_empty() { | |
| 545 | - <p class="hint health-path">(f.detail.as_str())</p> | |
| 546 | - } | |
| 547 | 554 | } |
| 548 | 555 | <p class="hint">(meta.as_str())</p> |
| 549 | 556 | </section> |
crates/forge-web/src/pages/admin_runners.rsmodified+14 -5
| @@ -1140,8 +1140,9 @@ struct RunnerJobRow { | ||
| 1140 | 1140 | /// `#` and the run's number. |
| 1141 | 1141 | run_text: String, |
| 1142 | 1142 | state_text: String, |
| 1143 | - /// `ci-state ci-<state>`, the class the runs list colours the state with. | |
| 1144 | - state_class: String, | |
| 1143 | + /// The classes of the tick the CI list colours a job's state with: `tick` and `ok`, `bad`, `live` | |
| 1144 | + /// or `skip`, or `tick` alone for a waiting job. | |
| 1145 | + state_class: &'static str, | |
| 1145 | 1146 | /// The run time so far for a running job, the whole run time for a finished one. `-` when unknown. |
| 1146 | 1147 | duration: String, |
| 1147 | 1148 | /// The time from queued to started. `-` when it never started. |
| @@ -1162,7 +1163,13 @@ fn runner_job_row(lang: Lang, job: &RunnerJob) -> RunnerJobRow { | ||
| 1162 | 1163 | repo, |
| 1163 | 1164 | run_text: format!("#{}", job.run_number), |
| 1164 | 1165 | state_text: state_text(lang, j.state.as_str()), |
| 1165 | - state_class: format!("ci-state ci-{}", j.state.as_str()), | |
| 1166 | + state_class: match j.state { | |
| 1167 | + JobState::Success => "tick ok", | |
| 1168 | + JobState::Failure | JobState::Error => "tick bad", | |
| 1169 | + JobState::Running => "tick live", | |
| 1170 | + JobState::Cancelled | JobState::Skipped => "tick skip", | |
| 1171 | + JobState::Blocked | JobState::Queued => "tick", | |
| 1172 | + }, | |
| 1166 | 1173 | duration: or_dash(duration_text( |
| 1167 | 1174 | lang, |
| 1168 | 1175 | j.started_at.as_deref(), |
| @@ -1743,7 +1750,7 @@ async fn runner_detail_view( | ||
| 1743 | 1750 | <p class="hint">(s(lang, "Not running any job.", "Hiçbir iş çalıştırmıyor."))</p> |
| 1744 | 1751 | } |
| 1745 | 1752 | for job in running_jobs.iter() { |
| 1746 | - <div class="line"><span class="name">(job.name.as_str())</span><span class="val">(job.repo.as_str())</span><span class="val"><a href=(job.run_href.as_str())>(job.run_text.as_str())</a></span><span class="val">(job.duration.as_str()) " · " (s(lang, "waited", "bekleme")) " " (job.waited.as_str())</span></div> | |
| 1753 | + <div class="line"><span class=(job.state_class) title=(job.state_text.as_str()) aria-label=(job.state_text.as_str())></span><span class="name">(job.name.as_str())</span><span class="val">(job.repo.as_str())</span><span class="val"><a href=(job.run_href.as_str())>(job.run_text.as_str())</a></span><span class="val">(job.duration.as_str()) " · " (s(lang, "waited", "bekleme")) " " (job.waited.as_str())</span></div> | |
| 1747 | 1754 | } |
| 1748 | 1755 | </section> |
| 1749 | 1756 | <section class="sec"> |
| @@ -1751,9 +1758,11 @@ async fn runner_detail_view( | ||
| 1751 | 1758 | if recent_jobs.is_empty() { |
| 1752 | 1759 | <p class="hint">(s(lang, "No finished jobs yet.", "Henüz biten iş yok."))</p> |
| 1753 | 1760 | } |
| 1761 | + <div class="runner-recent"> | |
| 1754 | 1762 | for job in recent_jobs.iter() { |
| 1755 | - <div class="line"><span class="name">(job.name.as_str())</span><span class="val">(job.repo.as_str())</span><span class="val"><a href=(job.run_href.as_str())>(job.run_text.as_str())</a></span><span class="val"><span class=(job.state_class.as_str())>(job.state_text.as_str())</span></span><span class="val">(job.duration.as_str()) " · " (s(lang, "waited", "bekleme")) " " (job.waited.as_str())</span><span class="val"><time data-rel="true" datetime=(job.finished_at.as_str())>(job.finished_ago.as_str())</time></span></div> | |
| 1763 | + <div class="line"><span class=(job.state_class) title=(job.state_text.as_str()) aria-label=(job.state_text.as_str())></span><span class="name">(job.name.as_str())</span><span class="val">(job.repo.as_str())</span><span class="val"><a href=(job.run_href.as_str())>(job.run_text.as_str())</a></span><span class="val">(job.duration.as_str()) " · " (s(lang, "waited", "bekleme")) " " (job.waited.as_str())</span><span class="val"><time data-rel="true" datetime=(job.finished_at.as_str())>(job.finished_ago.as_str())</time></span></div> | |
| 1756 | 1764 | } |
| 1765 | + </div> | |
| 1757 | 1766 | </section> |
| 1758 | 1767 | } |
| 1759 | 1768 | </div> |
crates/forge-web/src/pages/admin_server.rsmodified+189 -167
| @@ -38,7 +38,7 @@ use crate::pages::ci_runs::{changed_event, events_response}; | ||
| 38 | 38 | use crate::pages::passkeys::s; |
| 39 | 39 | use crate::self_update; |
| 40 | 40 | use crate::state::AppState; |
| 41 | -use crate::views::parts::{RailItem, SubPart, confirm_act, head, rail, reveal}; | |
| 41 | +use crate::views::parts::{RailItem, SubPart, confirm_act, head, rail}; | |
| 42 | 42 | use crate::views::{enc, shell}; |
| 43 | 43 | |
| 44 | 44 | #[query_params(error = bad_request)] |
| @@ -86,8 +86,6 @@ struct OptionRow { | ||
| 86 | 86 | /// One field, already formatted for the template. A secret's value is never in here. |
| 87 | 87 | struct Row { |
| 88 | 88 | key: &'static str, |
| 89 | - /// The category the setting belongs to, for a search result's link. | |
| 90 | - group: Group, | |
| 91 | 89 | label: &'static str, |
| 92 | 90 | help: &'static str, |
| 93 | 91 | kind_label: &'static str, |
| @@ -108,24 +106,118 @@ struct Row { | ||
| 108 | 106 | is_select: bool, |
| 109 | 107 | is_secret: bool, |
| 110 | 108 | fixed: bool, |
| 111 | - /// A value the config file sets: it reads as a line and opens in place to change. | |
| 112 | - file_line: bool, | |
| 113 | - /// A short control: two of them in a row share a `.field-pair`. | |
| 114 | - short: bool, | |
| 115 | 109 | } |
| 116 | 110 | |
| 117 | -pub(crate) fn tab_label(lang: Lang, group: Group) -> &'static str { | |
| 118 | - g::t( | |
| 119 | - lang, | |
| 120 | - match group { | |
| 121 | - Group::General => K::SrvTabGeneral, | |
| 122 | - Group::Limits => K::SrvTabLimits, | |
| 123 | - Group::Storage => K::SrvTabStorage, | |
| 124 | - Group::Backups => K::SrvTabBackups, | |
| 125 | - Group::Integrations => K::SrvTabIntegrations, | |
| 126 | - Group::Alerts => K::SrvTabAlerts, | |
| 127 | - }, | |
| 128 | - ) | |
| 111 | +/// One page of settings: a part of a category small enough to read without scrolling. Saving posts | |
| 112 | +/// the page's slug; the save covers the page's category, and only the page's switches are read as | |
| 113 | +/// off when absent. | |
| 114 | +pub(crate) struct SrvPage { | |
| 115 | + pub(crate) slug: &'static str, | |
| 116 | + group: Group, | |
| 117 | + en: &'static str, | |
| 118 | + tr: &'static str, | |
| 119 | + keys: &'static [&'static str], | |
| 120 | +} | |
| 121 | + | |
| 122 | +impl SrvPage { | |
| 123 | + pub(crate) fn label(&self, lang: Lang) -> &'static str { | |
| 124 | + s(lang, self.en, self.tr) | |
| 125 | + } | |
| 126 | +} | |
| 127 | + | |
| 128 | +/// The pages in rail order. Every setting is on exactly one page. | |
| 129 | +pub(crate) const PAGES: &[SrvPage] = &[ | |
| 130 | + SrvPage { | |
| 131 | + slug: "general", | |
| 132 | + group: Group::General, | |
| 133 | + en: "General", | |
| 134 | + tr: "Genel", | |
| 135 | + keys: &["registration", "orgs.creation", "trusted_proxies", "banner.message", "banner.level", "banner.expires"], | |
| 136 | + }, | |
| 137 | + SrvPage { | |
| 138 | + slug: "addresses", | |
| 139 | + group: Group::General, | |
| 140 | + en: "Addresses", | |
| 141 | + tr: "Adresler", | |
| 142 | + keys: &["base_url", "user_content_base_url", "ssh_public_host", "ssh_public_port", "listen", "user_content_listen", "ssh_listen", "database", "data_dir"], | |
| 143 | + }, | |
| 144 | + SrvPage { | |
| 145 | + slug: "limits", | |
| 146 | + group: Group::Limits, | |
| 147 | + en: "CI", | |
| 148 | + tr: "CI", | |
| 149 | + keys: &["ci.enabled", "ci.registration_token_hours", "ci.max_log_mb", "ci.max_artifact_mb", "ci.max_artifacts_per_job", "ci.max_job_artifacts_mb"], | |
| 150 | + }, | |
| 151 | + SrvPage { | |
| 152 | + slug: "retention", | |
| 153 | + group: Group::Limits, | |
| 154 | + en: "Retention and uploads", | |
| 155 | + tr: "Saklama ve yüklemeler", | |
| 156 | + keys: &["ci.log_retention_days", "ci.artifact_retention_days", "ci.artifact_keep_runs", "ci.artifact_max_total_mb", "lfs.max_object_mb", "releases.max_asset_mb"], | |
| 157 | + }, | |
| 158 | + SrvPage { | |
| 159 | + slug: "storage", | |
| 160 | + group: Group::Storage, | |
| 161 | + en: "Storage", | |
| 162 | + tr: "Depolama", | |
| 163 | + keys: &["storage.backend", "storage.r2.account_id", "storage.r2.bucket", "storage.r2.jurisdiction", "storage.r2.prefix", "storage.r2.access_key_id", "storage.r2.secret_access_key_file"], | |
| 164 | + }, | |
| 165 | + SrvPage { | |
| 166 | + slug: "s3", | |
| 167 | + group: Group::Storage, | |
| 168 | + en: "S3 storage", | |
| 169 | + tr: "S3 depolama", | |
| 170 | + keys: &["storage.s3.bucket", "storage.s3.region", "storage.s3.endpoint", "storage.s3.prefix", "storage.s3.access_key_id", "storage.s3.secret_access_key_file", "storage.s3.allow_http", "storage.s3.virtual_hosted_style"], | |
| 171 | + }, | |
| 172 | + SrvPage { | |
| 173 | + slug: "backups", | |
| 174 | + group: Group::Backups, | |
| 175 | + en: "Backups", | |
| 176 | + tr: "Yedekler", | |
| 177 | + keys: &["backup.dir", "backup.interval_hours", "backup.keep", "backup.fsck_interval_days", "backup.healthcheck_url"], | |
| 178 | + }, | |
| 179 | + SrvPage { | |
| 180 | + slug: "replication", | |
| 181 | + group: Group::Backups, | |
| 182 | + en: "Replication", | |
| 183 | + tr: "Çoğaltma", | |
| 184 | + keys: &["replication.target", "replication.ssh_port", "replication.identity_file", "replication.known_hosts_file", "replication.db_snapshot_minutes", "replication.reconcile_minutes", "replication.healthcheck_url"], | |
| 185 | + }, | |
| 186 | + SrvPage { | |
| 187 | + slug: "integrations", | |
| 188 | + group: Group::Integrations, | |
| 189 | + en: "Integrations", | |
| 190 | + tr: "Entegrasyonlar", | |
| 191 | + keys: &["mail.transport", "webhooks.allow_http", "webhooks.allowed_hosts", "advisories.enabled", "advisories.ecosystems", "advisories.refresh_hours"], | |
| 192 | + }, | |
| 193 | + SrvPage { | |
| 194 | + slug: "self-update", | |
| 195 | + group: Group::Integrations, | |
| 196 | + en: "Self-update", | |
| 197 | + tr: "Kendini güncelleme", | |
| 198 | + keys: &["self_update.enabled", "self_update.repo", "self_update.branch", "self_update.job", "self_update.artifact"], | |
| 199 | + }, | |
| 200 | + SrvPage { | |
| 201 | + slug: "alerts", | |
| 202 | + group: Group::Alerts, | |
| 203 | + en: "Alerts", | |
| 204 | + tr: "Uyarılar", | |
| 205 | + // Each threshold sits under the alert it tunes. | |
| 206 | + keys: &["alerts.enabled", "alerts.email", "alerts.on_runner_offline", "alerts.runner_offline_minutes", "alerts.on_disk", "alerts.disk_free_percent", "alerts.disk_free_gib", "alerts.on_backup", "alerts.on_ci_killed", "alerts.on_self_update", "alerts.on_replication"], | |
| 207 | + }, | |
| 208 | +]; | |
| 209 | + | |
| 210 | +/// The page named by `slug`. An old category slug opens that category's first page. | |
| 211 | +pub(crate) fn page_by_slug(slug: &str) -> Option<&'static SrvPage> { | |
| 212 | + PAGES.iter().find(|page| page.slug == slug) | |
| 213 | +} | |
| 214 | + | |
| 215 | +/// The page that holds the setting `key`. | |
| 216 | +pub(crate) fn page_of(key: &str) -> &'static SrvPage { | |
| 217 | + PAGES | |
| 218 | + .iter() | |
| 219 | + .find(|page| page.keys.contains(&key)) | |
| 220 | + .unwrap_or(&PAGES[0]) | |
| 129 | 221 | } |
| 130 | 222 | |
| 131 | 223 | /// The words for a choice's stored value. Values that are names (smtp, s3, eu) read as they are. |
| @@ -172,7 +264,6 @@ fn row(lang: Lang, view: &FieldView) -> Row { | ||
| 172 | 264 | let is_bool = field.ty == Ty::Bool && editable; |
| 173 | 265 | let is_number = matches!(field.ty, Ty::Uint(..)) && editable; |
| 174 | 266 | let is_select = matches!(field.ty, Ty::Choice(_)) && editable; |
| 175 | - let file_line = editable && view.source == Source::File; | |
| 176 | 267 | let secret_state = if view.secret_set { |
| 177 | 268 | g::t(lang, K::SrvSecretSet) |
| 178 | 269 | } else { |
| @@ -200,7 +291,6 @@ fn row(lang: Lang, view: &FieldView) -> Row { | ||
| 200 | 291 | }; |
| 201 | 292 | Row { |
| 202 | 293 | key: field.key, |
| 203 | - group: field.group, | |
| 204 | 294 | label, |
| 205 | 295 | help, |
| 206 | 296 | kind_label, |
| @@ -224,34 +314,17 @@ fn row(lang: Lang, view: &FieldView) -> Row { | ||
| 224 | 314 | is_select, |
| 225 | 315 | is_secret, |
| 226 | 316 | fixed: !editable, |
| 227 | - file_line, | |
| 228 | - short: editable && !file_line && !is_secret && (is_number || is_select), | |
| 229 | 317 | } |
| 230 | 318 | } |
| 231 | 319 | |
| 232 | -/// Groups the rows into blocks. Two short controls in a row share one `.field-pair`. | |
| 233 | -fn into_blocks(rows: Vec<Row>) -> Vec<Vec<Row>> { | |
| 234 | - let mut blocks: Vec<Vec<Row>> = Vec::new(); | |
| 235 | - for row in rows { | |
| 236 | - let joins = row.short && blocks.last().is_some_and(|b| b.len() == 1 && b[0].short); | |
| 237 | - if joins { | |
| 238 | - if let Some(last) = blocks.last_mut() { | |
| 239 | - last.push(row); | |
| 240 | - } | |
| 241 | - } else { | |
| 242 | - blocks.push(vec![row]); | |
| 243 | - } | |
| 244 | - } | |
| 245 | - blocks | |
| 246 | -} | |
| 247 | - | |
| 248 | -async fn rows_for(state: &AppState, lang: Lang, group: Group) -> forge_core::Result<Vec<Row>> { | |
| 320 | +/// The rows of one page, in the page's order. | |
| 321 | +async fn rows_for(state: &AppState, lang: Lang, page: &SrvPage) -> forge_core::Result<Vec<Row>> { | |
| 249 | 322 | let overrides = state.store.server_overrides().await?; |
| 250 | - Ok(state | |
| 251 | - .settings | |
| 252 | - .views(&overrides) | |
| 323 | + let views = state.settings.views(&overrides); | |
| 324 | + Ok(page | |
| 325 | + .keys | |
| 253 | 326 | .iter() |
| 254 | - .filter(|view| view.field.group == group) | |
| 327 | + .filter_map(|key| views.iter().find(|view| view.field.key == *key)) | |
| 255 | 328 | .map(|view| row(lang, view)) |
| 256 | 329 | .collect()) |
| 257 | 330 | } |
| @@ -272,7 +345,8 @@ async fn search_hits(state: &AppState, lang: Lang, needle: &str) -> forge_core:: | ||
| 272 | 345 | .collect()) |
| 273 | 346 | } |
| 274 | 347 | |
| 275 | -/// One setting. A value the config file sets reads as a line, and opens in place to change. | |
| 348 | +/// One setting on one line: its name, then its control (or its value when it cannot be changed | |
| 349 | +/// here), then what to know about it. Every control is the same width, so the notes line up. | |
| 276 | 350 | #[component] |
| 277 | 351 | async fn srv_row(lang: Lang, row: &Row) -> Result<impl View> { |
| 278 | 352 | let id = format!("srv-{}", row.key); |
| @@ -280,96 +354,62 @@ async fn srv_row(lang: Lang, row: &Row) -> Result<impl View> { | ||
| 280 | 354 | Ok(view! { |
| 281 | 355 | <div class="srv-row" id=(id.as_str())> |
| 282 | 356 | if row.fixed { |
| 283 | - <div class="line"> | |
| 284 | - <span class="name">(row.label)</span> | |
| 285 | - <span class="val">(row.value_text.as_str())</span> | |
| 286 | - </div> | |
| 287 | - srv_hints(lang: lang, row: row) | |
| 288 | - } else if row.file_line { | |
| 289 | - <div class="line"> | |
| 290 | - <span class="name">(row.label)</span> | |
| 291 | - <span class="val">(row.value_text.as_str())</span> | |
| 292 | - </div> | |
| 293 | - reveal(label: s(lang, "Set here", "Burada ayarla"), | |
| 294 | - srv_control(lang: lang, row: row, input: input.as_str()) | |
| 295 | - ) | |
| 357 | + <span class="srv-name">(row.label)</span> | |
| 358 | + <span class="srv-value">(row.value_text.as_str())</span> | |
| 296 | 359 | } else { |
| 297 | - srv_control(lang: lang, row: row, input: input.as_str()) | |
| 298 | - } | |
| 299 | - </div> | |
| 300 | - }) | |
| 301 | -} | |
| 302 | - | |
| 303 | -/// The control of one setting, labelled for the viewer, with its hints under it. A switch carries | |
| 304 | -/// its own label, and its hints sit under the switch. | |
| 305 | -#[component] | |
| 306 | -async fn srv_control(lang: Lang, row: &Row, input: &str) -> Result<impl View> { | |
| 307 | - Ok(view! { | |
| 308 | - <div class="srv-control"> | |
| 309 | - if row.is_bool { | |
| 310 | - <label class="switch"> | |
| 311 | - <input type="checkbox" id=(input) name=(row.key) value="true" checked=(row.checked)> | |
| 312 | - <span>(row.label)</span> | |
| 313 | - </label> | |
| 314 | - srv_hints(lang: lang, row: row) | |
| 315 | - } else { | |
| 316 | - <div class="field"> | |
| 317 | - <label for=(input)>(row.label)</label> | |
| 318 | - if row.is_select { | |
| 319 | - <select id=(input) name=(row.key)> | |
| 360 | + <label class="srv-name" for=(input.as_str())>(row.label)</label> | |
| 361 | + <span class="srv-value"> | |
| 362 | + if row.is_bool { | |
| 363 | + <input type="checkbox" id=(input.as_str()) name=(row.key) value="true" checked=(row.checked)> | |
| 364 | + } else if row.is_select { | |
| 365 | + <select id=(input.as_str()) name=(row.key)> | |
| 320 | 366 | for option in row.options.iter() { |
| 321 | 367 | <option value=(option.value.as_str()) selected=(option.selected)>(option.label.as_str())</option> |
| 322 | 368 | } |
| 323 | 369 | </select> |
| 324 | - } else if row.is_number && row.max.parse::<u64>().is_ok_and(|max| max <= 100) { | |
| 325 | - // A small range steps with − and +, like the runner's Max. | |
| 326 | - <div class="runner-pill"> | |
| 327 | - <button type="button" class="runner-step" data-step="-1" aria-label=(s(lang, "Fewer", "Azalt"))>"−"</button> | |
| 328 | - <input type="number" id=(input) name=(row.key) value=(row.value.as_str()) min=(row.min.as_str()) max=(row.max.as_str()) step="1" inputmode="numeric"> | |
| 329 | - <button type="button" class="runner-step" data-step="1" aria-label=(s(lang, "More", "Artır"))>"+"</button> | |
| 330 | - </div> | |
| 331 | 370 | } else if row.is_number { |
| 332 | - <input type="number" id=(input) name=(row.key) value=(row.value.as_str()) min=(row.min.as_str()) max=(row.max.as_str())> | |
| 371 | + <input type="number" id=(input.as_str()) name=(row.key) value=(row.value.as_str()) min=(row.min.as_str()) max=(row.max.as_str()) inputmode="numeric"> | |
| 333 | 372 | } else if row.is_secret { |
| 334 | - <input type="password" id=(input) name=(row.key) autocomplete="new-password" maxlength="1024"> | |
| 373 | + <input type="password" id=(input.as_str()) name=(row.key) autocomplete="new-password" maxlength="1024" placeholder=(row.secret_state)> | |
| 335 | 374 | } else { |
| 336 | - <input type="text" id=(input) name=(row.key) value=(row.value.as_str()) maxlength="1024" autocomplete="off"> | |
| 375 | + <input type="text" id=(input.as_str()) name=(row.key) value=(row.value.as_str()) maxlength="1024" autocomplete="off"> | |
| 337 | 376 | } |
| 338 | - srv_hints(lang: lang, row: row) | |
| 339 | - </div> | |
| 377 | + </span> | |
| 340 | 378 | } |
| 379 | + srv_hints(lang: lang, row: row) | |
| 341 | 380 | </div> |
| 342 | 381 | }) |
| 343 | 382 | } |
| 344 | 383 | |
| 345 | -/// What a setting says under its control: its help, its kind, a secret's rule and its override. | |
| 384 | +/// What a setting says after its control, one sentence after another: its help, its kind, a | |
| 385 | +/// secret's rule and its override. | |
| 346 | 386 | #[component] |
| 347 | 387 | async fn srv_hints(lang: Lang, row: &Row) -> Result<impl View> { |
| 348 | 388 | Ok(view! { |
| 349 | - <div class="srv-hints"> | |
| 389 | + <span class="srv-hints"> | |
| 350 | 390 | if !row.help.is_empty() { |
| 351 | - <p class="hint">(row.help)</p> | |
| 391 | + <span class="hint">(row.help)</span> | |
| 352 | 392 | } |
| 353 | 393 | if row.is_secret { |
| 354 | - <p class="hint">(row.secret_state) ". " (g::t(lang, K::SrvSecretHint))</p> | |
| 394 | + <span class="hint">(g::t(lang, K::SrvSecretHint))</span> | |
| 355 | 395 | } |
| 356 | 396 | if !row.kind_label.is_empty() { |
| 357 | - <p class="hint">(row.kind_label)</p> | |
| 397 | + <span class="hint">(row.kind_label)</span> | |
| 358 | 398 | } |
| 359 | 399 | if row.pending { |
| 360 | - <p class="hint">(g::t(lang, K::SrvRestartNeeded))</p> | |
| 400 | + <span class="hint">(g::t(lang, K::SrvRestartNeeded))</span> | |
| 361 | 401 | } |
| 362 | 402 | if row.has_override { |
| 363 | - <p class="hint"> | |
| 403 | + <span class="hint"> | |
| 364 | 404 | (s(lang, "Set here.", "Burada ayarlandı.")) |
| 365 | 405 | if row.show_file_value { |
| 366 | 406 | " " (g::t(lang, K::SrvFileValue)) ": " <code>(row.file_value.as_str())</code> |
| 367 | 407 | } |
| 368 | 408 | " " |
| 369 | 409 | <button type="submit" class="act" form="srv-reset" name="key" value=(row.key)>(g::t(lang, K::SrvResetToFile))</button> |
| 370 | - </p> | |
| 410 | + </span> | |
| 371 | 411 | } |
| 372 | - </div> | |
| 412 | + </span> | |
| 373 | 413 | }) |
| 374 | 414 | } |
| 375 | 415 | |
| @@ -377,16 +417,15 @@ async fn srv_hints(lang: Lang, row: &Row) -> Result<impl View> { | ||
| 377 | 417 | async fn server_view( |
| 378 | 418 | lang: Lang, |
| 379 | 419 | csrf: String, |
| 380 | - group: Group, | |
| 420 | + page: &'static SrvPage, | |
| 381 | 421 | rows: Vec<Row>, |
| 382 | 422 | q: String, |
| 383 | 423 | search: Option<Vec<Row>>, |
| 384 | 424 | notice: Option<String>, |
| 385 | 425 | restart: Restart, |
| 386 | 426 | ) -> Result<impl View> { |
| 387 | - let tab = group.slug(); | |
| 427 | + let tab = page.slug; | |
| 388 | 428 | let any_editable = rows.iter().any(|r| !r.fixed); |
| 389 | - let blocks = into_blocks(rows); | |
| 390 | 429 | let search_label = s(lang, "Search server settings", "Sunucu ayarlarında ara"); |
| 391 | 430 | // A pending restart names the boot id it waits for: the stream then sends at once when a new |
| 392 | 431 | // process answers, and the page re-renders. |
| @@ -397,13 +436,13 @@ async fn server_view( | ||
| 397 | 436 | ), |
| 398 | 437 | _ => "/admin/server/events".to_owned(), |
| 399 | 438 | }; |
| 400 | - let items: Vec<RailItem> = Group::ALL | |
| 401 | - .into_iter() | |
| 402 | - .map(|g_tab| RailItem { | |
| 403 | - name: tab_label(lang, g_tab).to_owned(), | |
| 439 | + let items: Vec<RailItem> = PAGES | |
| 440 | + .iter() | |
| 441 | + .map(|item| RailItem { | |
| 442 | + name: item.label(lang).to_owned(), | |
| 404 | 443 | val: String::new(), |
| 405 | - href: format!("/admin/server?cat={}", g_tab.slug()), | |
| 406 | - current: g_tab == group, | |
| 444 | + href: format!("/admin/server?cat={}", item.slug), | |
| 445 | + current: search.is_none() && item.slug == page.slug, | |
| 407 | 446 | }) |
| 408 | 447 | .collect(); |
| 409 | 448 | let sub = vec![ |
| @@ -414,8 +453,14 @@ async fn server_view( | ||
| 414 | 453 | forge_ci::build::display() |
| 415 | 454 | )), |
| 416 | 455 | ]; |
| 456 | + let restart_label = s(lang, "Restart server", "Sunucuyu yeniden başlat"); | |
| 457 | + let restart_note = s(lang, "Restart the server now? Requests in flight finish first, and the site is unavailable for a few seconds. Settings marked restart needed take effect, and so does a newly installed binary. Needs a supervisor such as systemd to start it again.", "Sunucu şimdi yeniden başlatılsın mı? Süren istekler önce biter, site birkaç saniye kullanılamaz. \"Yeniden başlatma gerekli\" işaretli ayarlar ve yeni kurulan ikili devreye girer. Yeniden başlatmak için systemd gibi bir gözetmen gerekir."); | |
| 417 | 458 | Ok(view! { |
| 418 | - head(title: g::t(lang, K::ServerSettings), sub: sub) | |
| 459 | + head(title: g::t(lang, K::ServerSettings), sub: sub, | |
| 460 | + if restart != Restart::Pending { | |
| 461 | + confirm_act(lang: lang, label: restart_label, action: "/admin/server/restart", csrf: csrf.as_str(), fields: vec![("tab".to_owned(), tab.to_owned())], note: Some(restart_note.to_owned())) | |
| 462 | + } | |
| 463 | + ) | |
| 419 | 464 | <div data-live=(live.as_str())> |
| 420 | 465 | if restart == Restart::Pending { |
| 421 | 466 | <p class="state" role="status" aria-live="polite"><strong>(s(lang, "Restarting...", "Yeniden başlatılıyor..."))</strong> " " (s(lang, "This page comes back by itself when the server is up again.", "Sunucu tekrar ayağa kalkınca bu sayfa kendiliğinden geri gelir."))</p> |
| @@ -433,7 +478,7 @@ async fn server_view( | ||
| 433 | 478 | <input id="server-search" type="search" name="q" value=(q.as_str()) placeholder=(search_label) data-live-search="" autocomplete="off"> |
| 434 | 479 | </form> |
| 435 | 480 | ) |
| 436 | - <div class="sheet"> | |
| 481 | + <div class="sheet srv-sheet"> | |
| 437 | 482 | if let Some(hits) = search { |
| 438 | 483 | <section class="sec"> |
| 439 | 484 | <h2>(s(lang, "Results", "Sonuçlar"))</h2> |
| @@ -441,53 +486,30 @@ async fn server_view( | ||
| 441 | 486 | <p class="state">(s(lang, "No setting matches.", "Eşleşen ayar yok."))</p> |
| 442 | 487 | } |
| 443 | 488 | for hit in hits.iter() { |
| 444 | - <a class="line" href=(format!("/admin/server?cat={}#srv-{}", hit.group.slug(), hit.key))> | |
| 489 | + <a class="line" href=(format!("/admin/server?cat={}#srv-{}", page_of(hit.key).slug, hit.key))> | |
| 445 | 490 | <span class="name">(hit.label)</span> |
| 446 | - <span class="val">(tab_label(lang, hit.group))</span> | |
| 491 | + <span class="val">(page_of(hit.key).label(lang))</span> | |
| 447 | 492 | </a> |
| 448 | 493 | } |
| 449 | 494 | </section> |
| 450 | 495 | } else { |
| 451 | - <section class="sec"> | |
| 452 | - <h2>(tab_label(lang, group))</h2> | |
| 453 | - <form method="post" action="/admin/server" class="fields"> | |
| 454 | - <input type="hidden" name="csrf" value=(csrf.as_str())> | |
| 455 | - <input type="hidden" name="tab" value=(tab)> | |
| 456 | - for block in blocks.iter() { | |
| 457 | - if block.len() > 1 { | |
| 458 | - <div class="field-pair"> | |
| 459 | - for r in block.iter() { | |
| 460 | - srv_row(lang: lang, row: r) | |
| 461 | - } | |
| 462 | - </div> | |
| 463 | - } else { | |
| 464 | - for r in block.iter() { | |
| 465 | - srv_row(lang: lang, row: r) | |
| 466 | - } | |
| 467 | - } | |
| 468 | - } | |
| 469 | - if any_editable { | |
| 496 | + <form method="post" action="/admin/server" class="srv-form"> | |
| 497 | + <input type="hidden" name="csrf" value=(csrf.as_str())> | |
| 498 | + <input type="hidden" name="tab" value=(tab)> | |
| 499 | + for r in rows.iter() { | |
| 500 | + srv_row(lang: lang, row: r) | |
| 501 | + } | |
| 502 | + if any_editable { | |
| 503 | + <div class="acts srv-save"> | |
| 470 | 504 | <button type="submit" class="primary">(i18n::t(lang, Key::Save))</button> |
| 471 | - } | |
| 472 | - </form> | |
| 473 | - </section> | |
| 505 | + </div> | |
| 506 | + } | |
| 507 | + </form> | |
| 474 | 508 | } |
| 475 | 509 | <form id="srv-reset" method="post" action="/admin/server/reset"> |
| 476 | 510 | <input type="hidden" name="csrf" value=(csrf.as_str())> |
| 477 | 511 | <input type="hidden" name="tab" value=(tab)> |
| 478 | 512 | </form> |
| 479 | - <section class="sec"> | |
| 480 | - <h2>(s(lang, "Restart server", "Sunucuyu yeniden başlat"))</h2> | |
| 481 | - <p class="hint">(s(lang, "Stops gracefully and starts again, so a newly installed binary and every setting marked restart needed take effect. Needs a supervisor such as systemd to start it again.", "Düzgünce durdurup yeniden başlatır; böylece yeni kurulan ikili ve \"yeniden başlatma gerekli\" işaretli her ayar devreye girer. Yeniden başlatmak için systemd gibi bir gözetmen gerekir."))</p> | |
| 482 | - if restart == Restart::Pending { | |
| 483 | - <p class="state">(s(lang, "A restart is in progress.", "Yeniden başlatma sürüyor."))</p> | |
| 484 | - } | |
| 485 | - if restart != Restart::Pending { | |
| 486 | - <div class="acts"> | |
| 487 | - confirm_act(lang: lang, label: s(lang, "Restart server", "Sunucuyu yeniden başlat"), action: "/admin/server/restart", csrf: csrf.as_str(), fields: vec![("tab".to_owned(), tab.to_owned())], note: Some(s(lang, "Restart the server now? Requests in flight finish first, and the site is unavailable for a few seconds.", "Sunucu şimdi yeniden başlatılsın mı? Süren istekler önce biter, site birkaç saniye kullanılamaz.").to_owned())) | |
| 488 | - </div> | |
| 489 | - } | |
| 490 | - </section> | |
| 491 | 513 | </div> |
| 492 | 514 | </div> |
| 493 | 515 | </div> |
| @@ -500,23 +522,23 @@ async fn server_page(cx: &Cx) -> Result<impl View> { | ||
| 500 | 522 | let query = query_params::<ServerQuery>(cx)?; |
| 501 | 523 | let state = app_context::<AppState>(cx); |
| 502 | 524 | let lang = i18n::lang(cx, Some(&viewer.0)); |
| 503 | - let group = query | |
| 525 | + let page = query | |
| 504 | 526 | .cat |
| 505 | 527 | .as_deref() |
| 506 | 528 | .or(query.tab.as_deref()) |
| 507 | - .and_then(Group::parse) | |
| 508 | - .unwrap_or(Group::General); | |
| 529 | + .and_then(page_by_slug) | |
| 530 | + .unwrap_or(&PAGES[0]); | |
| 509 | 531 | let q = query.q.clone().unwrap_or_default(); |
| 510 | 532 | let needle = q.trim().to_lowercase(); |
| 511 | 533 | let (rows, search) = if needle.is_empty() { |
| 512 | - (rows_for(state, lang, group).await?, None) | |
| 534 | + (rows_for(state, lang, page).await?, None) | |
| 513 | 535 | } else { |
| 514 | 536 | (Vec::new(), Some(search_hits(state, lang, &needle).await?)) |
| 515 | 537 | }; |
| 516 | 538 | let csrf = viewer.1.csrf_token.clone(); |
| 517 | 539 | let title = g::t(lang, K::ServerSettings); |
| 518 | 540 | Ok(view! { |
| 519 | - shell(title: title, viewer: Some(&viewer), server_view(lang: lang, csrf: csrf, group: group, rows: rows, q: q, search: search, notice: query.notice.clone(), restart: restart_state(query.restarting.as_deref()))) | |
| 541 | + shell(title: title, viewer: Some(&viewer), server_view(lang: lang, csrf: csrf, page: page, rows: rows, q: q, search: search, notice: query.notice.clone(), restart: restart_state(query.restarting.as_deref()))) | |
| 520 | 542 | }) |
| 521 | 543 | } |
| 522 | 544 | |
| @@ -528,15 +550,15 @@ async fn server_save(cx: &Cx, Form(mut form): Form<HashMap<String, String>>) -> | ||
| 528 | 550 | } |
| 529 | 551 | let lang = i18n::lang(cx, Some(&viewer.0)); |
| 530 | 552 | let state = app_context::<AppState>(cx); |
| 531 | - let group = form | |
| 553 | + let page = form | |
| 532 | 554 | .get("tab") |
| 533 | - .and_then(|t| Group::parse(t)) | |
| 534 | - .unwrap_or(Group::General); | |
| 535 | - // An unchecked box is absent from the post. | |
| 536 | - for field in ss::FIELDS | |
| 537 | - .iter() | |
| 538 | - .filter(|f| f.group == group && f.ty == Ty::Bool && f.kind != Kind::ReadOnly) | |
| 539 | - { | |
| 555 | + .and_then(|t| page_by_slug(t)) | |
| 556 | + .unwrap_or(&PAGES[0]); | |
| 557 | + let group = page.group; | |
| 558 | + // An unchecked box is absent from the post. Only the page's own switches were on the form. | |
| 559 | + for field in ss::FIELDS.iter().filter(|f| { | |
| 560 | + page.keys.contains(&f.key) && f.ty == Ty::Bool && f.kind != Kind::ReadOnly | |
| 561 | + }) { | |
| 540 | 562 | form.entry(field.key.to_owned()) |
| 541 | 563 | .or_insert_with(|| "false".to_owned()); |
| 542 | 564 | } |
| @@ -550,7 +572,7 @@ async fn server_save(cx: &Cx, Form(mut form): Form<HashMap<String, String>>) -> | ||
| 550 | 572 | }; |
| 551 | 573 | Err(see_other(format!( |
| 552 | 574 | "/admin/server?cat={}¬ice={}", |
| 553 | - group.slug(), | |
| 575 | + page.slug, | |
| 554 | 576 | enc(¬ice) |
| 555 | 577 | )) |
| 556 | 578 | .into()) |
| @@ -874,10 +896,10 @@ mod tests { | ||
| 874 | 896 | assert_eq!(fx.state.live().ci.max_log_mb, 16); |
| 875 | 897 | |
| 876 | 898 | // A read-only field is shown but cannot be posted. |
| 877 | - let page = admin_get(&fx, "/admin/server?tab=general").await; | |
| 899 | + let page = admin_get(&fx, "/admin/server?tab=addresses").await; | |
| 878 | 900 | assert!(page.contains("127.0.0.1:7660")); |
| 879 | 901 | assert!(!page.contains("name=\"listen\"")); |
| 880 | - save(&fx, "general", "listen=0.0.0.0%3A1").await; | |
| 902 | + save(&fx, "addresses", "listen=0.0.0.0%3A1").await; | |
| 881 | 903 | assert!(fx.state.store.server_overrides().await.unwrap().is_empty()); |
| 882 | 904 | |
| 883 | 905 | // Out-of-range, wrong-kind and unknown-storage values are rejected, and nothing is stored. |
| @@ -945,7 +967,7 @@ mod tests { | ||
| 945 | 967 | let fx = fixture().await; |
| 946 | 968 | |
| 947 | 969 | // A restart field is stored, the live value stays, and the page says so. |
| 948 | - save(&fx, "general", "base_url=https%3A%2F%2Fnew.example").await; | |
| 970 | + save(&fx, "addresses", "base_url=https%3A%2F%2Fnew.example").await; | |
| 949 | 971 | assert_eq!( |
| 950 | 972 | fx.state |
| 951 | 973 | .store |
| @@ -957,7 +979,7 @@ mod tests { | ||
| 957 | 979 | Some("https://new.example") |
| 958 | 980 | ); |
| 959 | 981 | assert_eq!(fx.state.live().base_url, "https://forge.test/"); |
| 960 | - let page = admin_get(&fx, "/admin/server?tab=general").await; | |
| 982 | + let page = admin_get(&fx, "/admin/server?tab=addresses").await; | |
| 961 | 983 | assert!(page.contains("restart needed")); |
| 962 | 984 | assert!(page.contains("https://new.example")); |
| 963 | 985 |
crates/forge-web/src/pages/admin_users.rsmodified+1 -1
| @@ -208,7 +208,7 @@ async fn users_view( | ||
| 208 | 208 | let (links, prev, next) = pager_links(page, pages, |n| users_href(&q, kind, n)); |
| 209 | 209 | let empty = rows.is_empty(); |
| 210 | 210 | let open = error.is_some(); |
| 211 | - let search_label = s(lang, "Search users", "Kullanıcılarda ara"); | |
| 211 | + let search_label = s(lang, "Search users and organizations", "Kullanıcı ve kuruluşlarda ara"); | |
| 212 | 212 | let filter_label = s(lang, "Filter", "Filtre"); |
| 213 | 213 | let all_label = format!("{} {}", s(lang, "All", "Tümü"), all_count); |
| 214 | 214 | let people_label = format!( |
crates/forge-web/src/pages/blame.rsmodified+14 -1
| @@ -197,6 +197,16 @@ async fn blame_page(cx: &Cx) -> Result<impl View> { | ||
| 197 | 197 | "blob", |
| 198 | 198 | &format!("{ref_name}/{file}"), |
| 199 | 199 | ); |
| 200 | + // Blame sits beside the file's source: a markdown file's plain view, any other file's own page. | |
| 201 | + let markdown = matches!( | |
| 202 | + file_name.rsplit_once('.').map(|(_, ext)| ext.to_ascii_lowercase()).as_deref(), | |
| 203 | + Some("md" | "markdown") | |
| 204 | + ); | |
| 205 | + let source_href = if markdown { | |
| 206 | + format!("{blob_href}?plain=1") | |
| 207 | + } else { | |
| 208 | + blob_href.clone() | |
| 209 | + }; | |
| 200 | 210 | let history = repo_href( |
| 201 | 211 | &repo.owner_name, |
| 202 | 212 | &repo.name, |
| @@ -227,7 +237,10 @@ async fn blame_page(cx: &Cx) -> Result<impl View> { | ||
| 227 | 237 | <div class="sheet-tools"> |
| 228 | 238 | <strong>(file_name)</strong> |
| 229 | 239 | <span class="mono">(size)</span> |
| 230 | - <a class="act" href=(blob_href.as_str())>(b::t(lang, b::K::BlameBackToFile))</a> | |
| 240 | + <nav class="sub" aria-label=(crate::pages::passkeys::s(lang, "View", "Görünüm"))> | |
| 241 | + <a href=(source_href.as_str())>(crate::i18n::code::t(lang, crate::i18n::code::K::SourceToggle))</a> | |
| 242 | + <a href="" aria-current="page">(b::t(lang, b::K::BlameLink))</a> | |
| 243 | + </nav> | |
| 231 | 244 | <a class="act" href=(history.as_str())>(g::t(lang, K::HistoryLink))</a> |
| 232 | 245 | </div> |
| 233 | 246 | <section class="file" data-lines=""> |
crates/forge-web/src/pages/blob.rsmodified+23 -14
| @@ -237,13 +237,6 @@ async fn blob_page(cx: &Cx) -> Result<impl View> { | ||
| 237 | 237 | "commits", |
| 238 | 238 | &format!("{ref_name}/{file}"), |
| 239 | 239 | ); |
| 240 | - let toggle = if !is_markdown { | |
| 241 | - None | |
| 242 | - } else if plain { | |
| 243 | - Some((g::t(lang, K::Rendered), base.clone())) | |
| 244 | - } else { | |
| 245 | - Some((g::t(lang, K::SourceToggle), format!("{base}?plain=1"))) | |
| 246 | - }; | |
| 247 | 240 | let blame = repo_href( |
| 248 | 241 | &repo.owner_name, |
| 249 | 242 | &repo.name, |
| @@ -264,6 +257,19 @@ async fn blob_page(cx: &Cx) -> Result<impl View> { | ||
| 264 | 257 | |
| 265 | 258 | let kind = viewer.kind; |
| 266 | 259 | let is_text = kind == "text"; |
| 260 | + // The ways to read the file, one switch with the current one marked, the same on every view of | |
| 261 | + // it: Rendered and Source for markdown, Source alone otherwise, and Blame for any text. | |
| 262 | + let mut views: Vec<(&'static str, String, bool)> = Vec::new(); | |
| 263 | + if is_markdown { | |
| 264 | + views.push((g::t(lang, K::Rendered), base.clone(), !plain)); | |
| 265 | + views.push((g::t(lang, K::SourceToggle), format!("{base}?plain=1"), plain)); | |
| 266 | + } else if is_text { | |
| 267 | + views.push((g::t(lang, K::SourceToggle), base.clone(), true)); | |
| 268 | + } | |
| 269 | + let can_blame = is_text || is_markdown; | |
| 270 | + if can_blame { | |
| 271 | + views.push((b::t(lang, b::K::BlameLink), blame.clone(), false)); | |
| 272 | + } | |
| 267 | 273 | let note = viewer.note; |
| 268 | 274 | let html = viewer.html; |
| 269 | 275 | let lines = viewer.lines; |
| @@ -337,17 +343,20 @@ async fn blob_page(cx: &Cx) -> Result<impl View> { | ||
| 337 | 343 | <div class="sheet-tools"> |
| 338 | 344 | <strong>(file_name.clone())</strong> |
| 339 | 345 | <span class="mono">(size_line)</span> |
| 340 | - if let Some((label, href)) = toggle { | |
| 341 | - <a class="act" href=(href)>(label)</a> | |
| 342 | - } | |
| 343 | - if is_text { | |
| 344 | - <a class="act" href=(blame.as_str())>(b::t(lang, b::K::BlameLink))</a> | |
| 345 | - <button type="button" class="act" data-copy-permalink="" title=(b::t(lang, b::K::PermalinkHint)) | |
| 346 | - data-copied=(b::t(lang, b::K::PermalinkCopied))>(b::t(lang, b::K::CopyPermalink))</button> | |
| 346 | + if views.len() > 1 { | |
| 347 | + <nav class="sub" aria-label=(s(lang, "View", "Görünüm"))> | |
| 348 | + for (label, href, on) in views.into_iter() { | |
| 349 | + <a href=(href) aria-current=(on.then_some("page"))>(label)</a> | |
| 350 | + } | |
| 351 | + </nav> | |
| 347 | 352 | } |
| 348 | 353 | <a class="act" href=(history)>(g::t(lang, K::HistoryLink))</a> |
| 349 | 354 | <a class="act" href=(raw.clone())>(g::t(lang, K::RawLink))</a> |
| 350 | 355 | <a class="act" href=(download_href) download=(download_name)>(g::t(lang, K::DownloadLink))</a> |
| 356 | + if can_blame { | |
| 357 | + <button type="button" class="act" data-copy-permalink="" title=(b::t(lang, b::K::PermalinkHint)) | |
| 358 | + data-copied=(b::t(lang, b::K::PermalinkCopied))>(b::t(lang, b::K::CopyPermalink))</button> | |
| 359 | + } | |
| 351 | 360 | </div> |
| 352 | 361 | <section class="file" data-lines="" data-permalink=(permalink.as_str())> |
| 353 | 362 | if kind == "image" { |
crates/forge-web/src/pages/ci_job.rsmodified+1 -1
| @@ -512,7 +512,7 @@ async fn job_body( | ||
| 512 | 512 | </div> |
| 513 | 513 | } |
| 514 | 514 | <div class="sec ci-dock"> |
| 515 | - <p class="hint">(crate::pages::passkeys::s(lang, "bar height is lines changed", "çubuk yüksekliği değişen satır sayısıdır"))</p> | |
| 515 | + <p class="hint">(crate::pages::passkeys::s(lang, "a bar's height is its lines changed, its colour its CI result", "çubuğun yüksekliği değişen satır sayısı, rengi CI sonucudur"))</p> | |
| 516 | 516 | <div class="dock-history"> |
| 517 | 517 | history_strip(lang: lang, owner: owner, repo: repo, bars: bars) |
| 518 | 518 | </div> |
crates/forge-web/src/pages/ci_runs.rsmodified+21 -13
| @@ -1452,7 +1452,7 @@ fn job_steps( | ||
| 1452 | 1452 | StepState::Cancelled => "ci-sp-off", |
| 1453 | 1453 | }, |
| 1454 | 1454 | seg: match state { |
| 1455 | - StepState::Passed => "", | |
| 1455 | + StepState::Passed => "ok", | |
| 1456 | 1456 | StepState::Running => "live", |
| 1457 | 1457 | StepState::Failed => "bad", |
| 1458 | 1458 | StepState::Cancelled => "skip", |
| @@ -1742,7 +1742,7 @@ async fn runs_split( | ||
| 1742 | 1742 | RunState::Running => "live", |
| 1743 | 1743 | RunState::Cancelled => "skip", |
| 1744 | 1744 | RunState::Queued | RunState::WaitingApproval => "wait", |
| 1745 | - _ => "done", | |
| 1745 | + RunState::Success => "ok", | |
| 1746 | 1746 | }, |
| 1747 | 1747 | href: row_href(run.number), |
| 1748 | 1748 | // The list page alone draws no run, so it marks none. |
| @@ -2007,7 +2007,7 @@ async fn run_detail( | ||
| 2007 | 2007 | tick: match job.state { |
| 2008 | 2008 | JobState::Failure | JobState::Error => "bad", |
| 2009 | 2009 | JobState::Running => "live", |
| 2010 | - JobState::Success => "done", | |
| 2010 | + JobState::Success => "ok", | |
| 2011 | 2011 | _ => "", |
| 2012 | 2012 | }, |
| 2013 | 2013 | detail: job.image.clone(), |
| @@ -2088,14 +2088,22 @@ async fn run_detail( | ||
| 2088 | 2088 | let (headline, headline_class) = run_headline( |
| 2089 | 2089 | lang, |
| 2090 | 2090 | run.state, |
| 2091 | - // The step that failed or runs says more than its job does. | |
| 2092 | - picked.map_or("", |index| { | |
| 2093 | - let job = &lines[index]; | |
| 2094 | - job.steps | |
| 2091 | + // The step that failed or runs says more than its job does. A running run names what runs | |
| 2092 | + // now, whichever job is shown: a job that failed earlier in it is not what is running. | |
| 2093 | + if run.state == RunState::Running { | |
| 2094 | + lines | |
| 2095 | 2095 | .iter() |
| 2096 | - .find(|step| matches!(step.seg, "bad" | "live")) | |
| 2097 | - .map_or(job.name.as_str(), |step| step.name.as_str()) | |
| 2098 | - }), | |
| 2096 | + .find_map(|job| job.steps.iter().find(|step| step.seg == "live")) | |
| 2097 | + .map_or("", |step| step.name.as_str()) | |
| 2098 | + } else { | |
| 2099 | + picked.map_or("", |index| { | |
| 2100 | + let job = &lines[index]; | |
| 2101 | + job.steps | |
| 2102 | + .iter() | |
| 2103 | + .find(|step| step.seg == "bad") | |
| 2104 | + .map_or(job.name.as_str(), |step| step.name.as_str()) | |
| 2105 | + }) | |
| 2106 | + }, | |
| 2099 | 2107 | &duration_text(lang, Some(run.created_at.as_str()), run.finished_at.as_deref()), |
| 2100 | 2108 | ); |
| 2101 | 2109 | Ok(RunDetail { |
| @@ -2275,7 +2283,7 @@ async fn runs_sheet(lang: Lang, list: &ListView) -> Result<impl View> { | ||
| 2275 | 2283 | if let Some(href) = newer_href { |
| 2276 | 2284 | <a href=(href.as_str())>(g::t(lang, K::Newer))</a> |
| 2277 | 2285 | } |
| 2278 | - <span class="muted small">(page_label.as_str())</span> | |
| 2286 | + <span>(page_label.as_str())</span> | |
| 2279 | 2287 | if let Some(href) = older_href { |
| 2280 | 2288 | <a href=(href.as_str())>(g::t(lang, K::Older))</a> |
| 2281 | 2289 | } |
| @@ -2450,7 +2458,7 @@ async fn run_head(lang: Lang, run: &RunDetail, all_href: Option<String>) -> Resu | ||
| 2450 | 2458 | } |
| 2451 | 2459 | </div> |
| 2452 | 2460 | <p class="head-sub"> |
| 2453 | - <span class="b" data-run=(run.number)>(run.title.as_str())</span> | |
| 2461 | + <span class="b" data-run=(run.number) title=(run.title.as_str())>(run.title.as_str())</span> | |
| 2454 | 2462 | <span class="sep" aria-hidden="true">"·"</span> |
| 2455 | 2463 | <span>(run.trigger.as_str()) " \u{b7} " (run.branch.as_str())</span> |
| 2456 | 2464 | <span class="sep" aria-hidden="true">"·"</span> |
| @@ -2668,7 +2676,7 @@ async fn run_log( | ||
| 2668 | 2676 | run_timeline(lang: lang, run: run) |
| 2669 | 2677 | run_artifacts(lang: lang, run: run) |
| 2670 | 2678 | <div class="sec ci-dock"> |
| 2671 | - <p class="hint">(crate::pages::passkeys::s(lang, "bar height is lines changed", "çubuk yüksekliği değişen satır sayısıdır"))</p> | |
| 2679 | + <p class="hint">(crate::pages::passkeys::s(lang, "a bar's height is its lines changed, its colour its CI result", "çubuğun yüksekliği değişen satır sayısı, rengi CI sonucudur"))</p> | |
| 2672 | 2680 | <div class="dock-history"> |
| 2673 | 2681 | history_strip(lang: lang, owner: owner, repo: repo, bars: bars) |
| 2674 | 2682 | </div> |
crates/forge-web/src/pages/commits.rsmodified+1 -1
| @@ -402,7 +402,7 @@ async fn commits_page(cx: &Cx) -> Result<impl View> { | ||
| 402 | 402 | } |
| 403 | 403 | } |
| 404 | 404 | if has_newer || has_older { |
| 405 | - <nav class="sub"> | |
| 405 | + <nav class="pager"> | |
| 406 | 406 | if has_newer { |
| 407 | 407 | <a href=(newer_href.as_str())>(g::t(lang, K::NewerLink))</a> |
| 408 | 408 | } |
crates/forge-web/src/pages/discussions.rsmodified+1 -1
| @@ -347,7 +347,7 @@ async fn discussions_list_page(cx: &Cx) -> Result<impl View> { | ||
| 347 | 347 | } |
| 348 | 348 | } |
| 349 | 349 | if has_newer || has_older { |
| 350 | - <nav class="sub"> | |
| 350 | + <nav class="pager"> | |
| 351 | 351 | if has_newer { |
| 352 | 352 | <a href=(newer_href.as_str())>(newer_label)</a> |
| 353 | 353 | } |
crates/forge-web/src/pages/issues_list.rsmodified+1 -1
| @@ -658,7 +658,7 @@ async fn issues_list_page(cx: &Cx) -> Result<impl View> { | ||
| 658 | 658 | } |
| 659 | 659 | } |
| 660 | 660 | if has_newer || has_older { |
| 661 | - <nav class="sub"> | |
| 661 | + <nav class="pager"> | |
| 662 | 662 | if has_newer { |
| 663 | 663 | <a href=(newer_href.as_str())>(g::t(lang, K::Newer))</a> |
| 664 | 664 | } |
crates/forge-web/src/pages/palette.rsmodified+8 -10
| @@ -16,7 +16,7 @@ | ||
| 16 | 16 | |
| 17 | 17 | use std::collections::HashSet; |
| 18 | 18 | |
| 19 | -use forge_core::server_settings::{FIELDS, Group}; | |
| 19 | +use forge_core::server_settings::FIELDS; | |
| 20 | 20 | use forge_core::store::orgs::OrgMemberRole; |
| 21 | 21 | use http::header::{CACHE_CONTROL, CONTENT_TYPE, X_CONTENT_TYPE_OPTIONS}; |
| 22 | 22 | use serde_json::{Value, json}; |
| @@ -30,7 +30,7 @@ use crate::i18n::code::{self, K as CK}; | ||
| 30 | 30 | use crate::i18n::orgs::{self as g, K}; |
| 31 | 31 | use crate::i18n::repo_admin::{self as ra, K as RK}; |
| 32 | 32 | use crate::i18n::{self, Lang}; |
| 33 | -use crate::pages::admin_server::tab_label; | |
| 33 | +use crate::pages::admin_server::{PAGES, page_of}; | |
| 34 | 34 | use crate::pages::org_new::may_create_org; |
| 35 | 35 | use crate::pages::passkeys::s; |
| 36 | 36 | use crate::state::AppState; |
| @@ -453,9 +453,9 @@ async fn palette(cx: &Cx) -> Result<Response> { | ||
| 453 | 453 | "page", |
| 454 | 454 | ); |
| 455 | 455 | let server = crate::i18n::admin::t(lang, crate::i18n::admin::K::ServerSettings); |
| 456 | - for group in Group::ALL { | |
| 457 | - let label = format!("{server} \u{b7} {}", tab_label(lang, group)); | |
| 458 | - let href = format!("/admin/server?tab={}", group.slug()); | |
| 456 | + for page in PAGES { | |
| 457 | + let label = format!("{server} \u{b7} {}", page.label(lang)); | |
| 458 | + let href = format!("/admin/server?cat={}", page.slug); | |
| 459 | 459 | push(&mut items, &mut seen, &label, &href, "page"); |
| 460 | 460 | } |
| 461 | 461 | for field in FIELDS { |
| @@ -463,11 +463,9 @@ async fn palette(cx: &Cx) -> Result<Response> { | ||
| 463 | 463 | (Lang::Tr, Some((tr, _))) => tr, |
| 464 | 464 | _ => field.label, |
| 465 | 465 | }; |
| 466 | - let label = format!( | |
| 467 | - "{server} \u{b7} {} \u{b7} {name}", | |
| 468 | - tab_label(lang, field.group) | |
| 469 | - ); | |
| 470 | - let href = format!("/admin/server?tab={}#srv-{}", field.group.slug(), field.key); | |
| 466 | + let page = page_of(field.key); | |
| 467 | + let label = format!("{server} \u{b7} {} \u{b7} {name}", page.label(lang)); | |
| 468 | + let href = format!("/admin/server?cat={}#srv-{}", page.slug, field.key); | |
| 471 | 469 | let terms = [field.key, field.label]; |
| 472 | 470 | push_terms(&mut items, &mut seen, &label, &href, "page", &terms); |
| 473 | 471 | } |
crates/forge-web/src/pages/pulls_list.rsmodified+1 -1
| @@ -384,7 +384,7 @@ async fn pulls_list_page(cx: &Cx) -> Result<impl View> { | ||
| 384 | 384 | } |
| 385 | 385 | } |
| 386 | 386 | if has_newer || has_older { |
| 387 | - <nav class="sub"> | |
| 387 | + <nav class="pager"> | |
| 388 | 388 | if has_newer { |
| 389 | 389 | <a href=(newer_href.as_str())>(g::t(lang, K::Newer))</a> |
| 390 | 390 | } |
crates/forge-web/src/pages/repo_settings.rsmodified+67 -67
| @@ -303,10 +303,9 @@ async fn danger_zone( | ||
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | /// The settings frame: the rail of settings pages beside the sheet holding the page's own content |
| 306 | -/// (its children). Every settings page shows the same rail. `current` names the page shown | |
| 307 | -/// (`general`, `branches`, `webhooks`, ...) and marks its rail item. On the General page the sections | |
| 308 | -/// (`branches`, `discussions`, `danger`) are tabs above the frame; the danger tab only for a viewer | |
| 309 | -/// who may delete the repo (`can_delete`). | |
| 306 | +/// (its children). Every settings page shows the same rail, one list of every page. `current` names | |
| 307 | +/// the page shown (`general`, `branches`, `webhooks`, ...) and marks its rail item. Danger zone is | |
| 308 | +/// listed only for a viewer who may delete the repo (`can_delete`). | |
| 310 | 309 | #[component] |
| 311 | 310 | pub async fn settings_frame( |
| 312 | 311 | lang: Lang, |
| @@ -315,7 +314,6 @@ pub async fn settings_frame( | ||
| 315 | 314 | can_delete: bool, |
| 316 | 315 | #[default] child: Child<'_>, |
| 317 | 316 | ) -> Result<impl View> { |
| 318 | - let general_on = matches!(current, "general" | "branches" | "discussions" | "danger"); | |
| 319 | 317 | let discussions_label = crate::i18n::community::t(lang, crate::i18n::community::K::Discussions); |
| 320 | 318 | let item = |name: &str, href: String, on: bool| RailItem { |
| 321 | 319 | name: name.to_owned(), |
| @@ -323,26 +321,21 @@ pub async fn settings_frame( | ||
| 323 | 321 | href, |
| 324 | 322 | current: on, |
| 325 | 323 | }; |
| 326 | - let items = vec![ | |
| 327 | - item(g::t(lang, K::General), format!("/{title}/settings"), general_on), | |
| 324 | + let mut items = vec![ | |
| 325 | + item(g::t(lang, K::General), format!("/{title}/settings"), current == "general"), | |
| 328 | 326 | item(g::t(lang, K::Collaborators), format!("/{title}/settings/collaborators"), current == "collaborators"), |
| 329 | - item(g::t(lang, K::RenameTransferNav), format!("/{title}/settings/rename"), current == "rename"), | |
| 327 | + item(g::t(lang, K::BranchProtection), format!("/{title}/settings?section=branches"), current == "branches"), | |
| 328 | + item(discussions_label, format!("/{title}/settings?section=discussions"), current == "discussions"), | |
| 330 | 329 | item(g::t(lang, K::Webhooks), format!("/{title}/settings/hooks"), current == "webhooks"), |
| 331 | 330 | item(g::t(lang, K::Mirrors), format!("/{title}/settings/mirrors"), current == "mirrors"), |
| 332 | 331 | item(g::t(lang, K::Secrets), format!("/{title}/settings/secrets"), current == "secrets"), |
| 333 | 332 | item(crate::i18n::code::t(lang, crate::i18n::code::K::TabWiki), format!("/{title}/settings/wiki"), current == "wiki"), |
| 333 | + item(g::t(lang, K::RenameTransferNav), format!("/{title}/settings/rename"), current == "rename"), | |
| 334 | 334 | ]; |
| 335 | + if can_delete { | |
| 336 | + items.push(item(g::t(lang, K::DangerZone), format!("/{title}/settings?section=danger"), current == "danger")); | |
| 337 | + } | |
| 335 | 338 | Ok(view! { |
| 336 | - if general_on { | |
| 337 | - <nav class="tabs" aria-label=(g::t(lang, K::SettingsNavLabel))> | |
| 338 | - <a href=(format!("/{title}/settings")) aria-current=((current == "general").then_some("page"))>(g::t(lang, K::General))</a> | |
| 339 | - <a href=(format!("/{title}/settings?section=branches")) aria-current=((current == "branches").then_some("page"))>(g::t(lang, K::BranchProtection))</a> | |
| 340 | - <a href=(format!("/{title}/settings?section=discussions")) aria-current=((current == "discussions").then_some("page"))>(discussions_label)</a> | |
| 341 | - if can_delete { | |
| 342 | - <a href=(format!("/{title}/settings?section=danger")) aria-current=((current == "danger").then_some("page"))>(g::t(lang, K::DangerZone))</a> | |
| 343 | - } | |
| 344 | - </nav> | |
| 345 | - } | |
| 346 | 339 | <div class="work"> |
| 347 | 340 | rail(label: g::t(lang, K::SettingsNavLabel), items: items) |
| 348 | 341 | <div class="sheet"> |
| @@ -636,65 +629,72 @@ async fn branch_rule_form( | ||
| 636 | 629 | <input id=(pattern_id.as_str()) type="text" name="pattern" value=(pattern.as_str()) autocomplete="off" spellcheck="false" required=(true)> |
| 637 | 630 | <p class="hint">(g::t(lang, K::PatternHelpA))<code>"*"</code>(g::t(lang, K::PatternHelpB))<code>"**"</code>(g::t(lang, K::PatternHelpC))<code>"/"</code>(g::t(lang, K::PatternHelpD))</p> |
| 638 | 631 | </div> |
| 639 | - <fieldset class="rule-group"> | |
| 640 | - <legend>(g::t(lang, K::SectionPushes))</legend> | |
| 641 | - <label class="switch"> | |
| 642 | - <input type="checkbox" name="allow_force_push" value="on" checked=(allow_force_push)> | |
| 643 | - <span>(g::t(lang, K::AllowForcePush))</span> | |
| 644 | - </label> | |
| 645 | - <p class="hint">(g::t(lang, K::ForcePushDesc))</p> | |
| 646 | - <label class="switch"> | |
| 647 | - <input type="checkbox" name="allow_deletion" value="on" checked=(allow_deletion)> | |
| 648 | - <span>(g::t(lang, K::AllowDeletion))</span> | |
| 649 | - </label> | |
| 650 | - <p class="hint">(g::t(lang, K::DeletionDesc))</p> | |
| 651 | - <label class="switch"> | |
| 652 | - <input type="checkbox" name="restrict_push" value="on" checked=(restrict_push)> | |
| 653 | - <span>(g::t(lang, K::RestrictPushTitle))</span> | |
| 654 | - </label> | |
| 655 | - <p class="hint">(g::t(lang, K::RestrictPushDesc))</p> | |
| 656 | - </fieldset> | |
| 657 | - <fieldset class="rule-group"> | |
| 658 | - <legend>(g::t(lang, K::SectionMerging))</legend> | |
| 659 | - <div class="field"> | |
| 660 | - <label for=(approvals_id.as_str())>(g::t(lang, K::RequiredApprovals))</label> | |
| 661 | - <div class="runner-pill"> | |
| 662 | - <button type="button" class="runner-step" data-step="-1" aria-label=(passkeys::s(lang, "Fewer", "Azalt"))>"−"</button> | |
| 663 | - <input id=(approvals_id.as_str()) type="number" name="required_approvals" min="0" max="20" step="1" inputmode="numeric" value=(required_approvals.as_str())> | |
| 664 | - <button type="button" class="runner-step" data-step="1" aria-label=(passkeys::s(lang, "More", "Artır"))>"+"</button> | |
| 632 | + // Each group is a field: its name in the label column, its boxes in the control column, each | |
| 633 | + // box with its note beside it. | |
| 634 | + <div class="field"> | |
| 635 | + <span class="field-label">(g::t(lang, K::SectionPushes))</span> | |
| 636 | + <div class="checks"> | |
| 637 | + <div class="check-row"> | |
| 638 | + <label class="switch"> | |
| 639 | + <input type="checkbox" name="allow_force_push" value="on" checked=(allow_force_push)> | |
| 640 | + <span>(g::t(lang, K::AllowForcePush))</span> | |
| 641 | + </label> | |
| 642 | + <span class="hint">(g::t(lang, K::ForcePushDesc))</span> | |
| 643 | + </div> | |
| 644 | + <div class="check-row"> | |
| 645 | + <label class="switch"> | |
| 646 | + <input type="checkbox" name="allow_deletion" value="on" checked=(allow_deletion)> | |
| 647 | + <span>(g::t(lang, K::AllowDeletion))</span> | |
| 648 | + </label> | |
| 649 | + <span class="hint">(g::t(lang, K::DeletionDesc))</span> | |
| 650 | + </div> | |
| 651 | + <div class="check-row"> | |
| 652 | + <label class="switch"> | |
| 653 | + <input type="checkbox" name="restrict_push" value="on" checked=(restrict_push)> | |
| 654 | + <span>(g::t(lang, K::RestrictPushTitle))</span> | |
| 655 | + </label> | |
| 656 | + <span class="hint">(g::t(lang, K::RestrictPushDesc))</span> | |
| 665 | 657 | </div> |
| 666 | - <p class="hint">(g::t(lang, K::ApprovalsHelp))</p> | |
| 667 | 658 | </div> |
| 668 | - <label class="switch"> | |
| 669 | - <input type="checkbox" name="block_on_changes_requested" value="on" checked=(block_on_changes_requested)> | |
| 670 | - <span>(g::t(lang, K::BlockWhileChanges))</span> | |
| 671 | - </label> | |
| 672 | - <label class="switch"> | |
| 673 | - <input type="checkbox" name="require_up_to_date" value="on" checked=(require_up_to_date)> | |
| 674 | - <span>(g::t(lang, K::RequireUpToDate))</span> | |
| 675 | - </label> | |
| 676 | - <label class="switch"> | |
| 677 | - <input type="checkbox" name="require_merge_queue" value="on" checked=(require_merge_queue)> | |
| 678 | - <span>(mq::t(lang, mq::K::RequireMergeQueue))</span> | |
| 679 | - </label> | |
| 680 | - <p class="hint">(mq::t(lang, mq::K::RequireMergeQueueHint))</p> | |
| 681 | - </fieldset> | |
| 682 | - <fieldset class="rule-group"> | |
| 683 | - <legend>(g::t(lang, K::SectionChecks))</legend> | |
| 684 | - <div class="field"> | |
| 685 | - <label for=(checks_id.as_str())>(g::t(lang, K::RequiredChecks))</label> | |
| 686 | - <input id=(checks_id.as_str()) type="text" name="required_checks" value=(required_checks.as_str()) autocomplete="off" spellcheck="false" placeholder="ci/test, ci/lint"> | |
| 687 | - <p class="hint">(g::t(lang, K::RequiredChecksHelp))</p> | |
| 659 | + </div> | |
| 660 | + <div class="field"> | |
| 661 | + <label for=(approvals_id.as_str())>(g::t(lang, K::RequiredApprovals))</label> | |
| 662 | + <input id=(approvals_id.as_str()) type="number" name="required_approvals" min="0" max="20" step="1" inputmode="numeric" value=(required_approvals.as_str())> | |
| 663 | + <p class="hint">(g::t(lang, K::ApprovalsHelp))</p> | |
| 664 | + </div> | |
| 665 | + <div class="field"> | |
| 666 | + <span class="field-label">(g::t(lang, K::SectionMerging))</span> | |
| 667 | + <div class="checks"> | |
| 668 | + <label class="switch"> | |
| 669 | + <input type="checkbox" name="block_on_changes_requested" value="on" checked=(block_on_changes_requested)> | |
| 670 | + <span>(g::t(lang, K::BlockWhileChanges))</span> | |
| 671 | + </label> | |
| 672 | + <label class="switch"> | |
| 673 | + <input type="checkbox" name="require_up_to_date" value="on" checked=(require_up_to_date)> | |
| 674 | + <span>(g::t(lang, K::RequireUpToDate))</span> | |
| 675 | + </label> | |
| 676 | + <div class="check-row"> | |
| 677 | + <label class="switch"> | |
| 678 | + <input type="checkbox" name="require_merge_queue" value="on" checked=(require_merge_queue)> | |
| 679 | + <span>(mq::t(lang, mq::K::RequireMergeQueue))</span> | |
| 680 | + </label> | |
| 681 | + <span class="hint">(mq::t(lang, mq::K::RequireMergeQueueHint))</span> | |
| 682 | + </div> | |
| 688 | 683 | </div> |
| 684 | + </div> | |
| 685 | + <div class="field"> | |
| 686 | + <label for=(checks_id.as_str())>(g::t(lang, K::SectionChecks))</label> | |
| 687 | + <input id=(checks_id.as_str()) type="text" name="required_checks" value=(required_checks.as_str()) autocomplete="off" spellcheck="false" placeholder="ci/test, ci/lint" aria-label=(g::t(lang, K::RequiredChecks))> | |
| 688 | + <p class="hint">(g::t(lang, K::RequiredChecksHelp))</p> | |
| 689 | 689 | if !contexts.is_empty() { |
| 690 | - <p class="hint">(g::t(lang, K::RecentContexts))</p> | |
| 691 | 690 | <div class="acts"> |
| 691 | + <span class="hint">(g::t(lang, K::RecentContexts))</span> | |
| 692 | 692 | for context in contexts.iter() { |
| 693 | 693 | <button type="button" class="act" data-check-add=(context.as_str())>(context.as_str())</button> |
| 694 | 694 | } |
| 695 | 695 | </div> |
| 696 | 696 | } |
| 697 | - </fieldset> | |
| 697 | + </div> | |
| 698 | 698 | <div class="acts"> |
| 699 | 699 | <button type="submit" class="primary">(g::t(lang, K::SaveRule))</button> |
| 700 | 700 | <button type="button" class="act quiet" data-close-details="">(g::t(lang, K::CancelRule))</button> |
crates/forge-web/src/pages/repo_side.rsmodified+2 -1
| @@ -292,7 +292,8 @@ pub fn run_pips(runs: &[RunRow]) -> Vec<(String, String, &'static str)> { | ||
| 292 | 292 | .map(|run| { |
| 293 | 293 | let class = match run.state { |
| 294 | 294 | RunState::Failure | RunState::Error => "bad", |
| 295 | - RunState::Running | RunState::Queued => "live", | |
| 295 | + RunState::Running => "live", | |
| 296 | + RunState::Success => "ok", | |
| 296 | 297 | _ => "", |
| 297 | 298 | }; |
| 298 | 299 | (run.href.clone(), run.title.clone(), class) |
crates/forge-web/src/views/timeline.rsmodified+3 -2
| @@ -31,11 +31,12 @@ pub fn bar_percent(lines: u64, max: u64) -> u32 { | ||
| 31 | 31 | pct.clamp(MIN_BAR_PERCENT, 100) |
| 32 | 32 | } |
| 33 | 33 | |
| 34 | -/// The tone class of a bar: live for the newest commit while its run goes, bad when its latest | |
| 35 | -/// run failed, neutral otherwise. | |
| 34 | +/// The tone class of a bar, the colour of its commit's latest run as the CI pages draw it: live for | |
| 35 | +/// the newest commit while its run goes, ok when it passed, bad when it failed, neutral with no run. | |
| 36 | 36 | fn tone(ci: Option<RunState>, newest: bool) -> &'static str { |
| 37 | 37 | match ci { |
| 38 | 38 | Some(RunState::Running | RunState::Queued) if newest => "hs-live", |
| 39 | + Some(RunState::Success) => "hs-ok", | |
| 39 | 40 | Some(RunState::Failure | RunState::Error) => "hs-bad", |
| 40 | 41 | _ => "hs-neutral", |
| 41 | 42 | } |
docs/ui-language.mdmodified+3 -2
| @@ -88,14 +88,15 @@ before its label. Few fixed options are `.choice`: | ||
| 88 | 88 | <div class="choice"><label><input type="radio" name="theme" value="auto" checked><span>Auto</span></label> ..</div> |
| 89 | 89 | ``` |
| 90 | 90 | |
| 91 | -Longer lists are a `<select>`. Fields are soft filled shapes with no line around them. Every control has a | |
| 91 | +Longer lists are a `<select>`, 280px like a line of text with its chevron at its end, so every control in a | |
| 92 | +form ends on one edge. Fields are soft filled shapes with no line around them. Every control has a | |
| 92 | 93 | label. Errors are `alert` at the top of the form they belong to, which stays open with the user's text. |
| 93 | 94 | |
| 94 | 95 | ## Lists and search |
| 95 | 96 | |
| 96 | 97 | Every search bar is live: `data-live-search` on a real GET form's input in `.plain-search`. It sits in the |
| 97 | 98 | tools row or above the rail's list. Filters are the rail, or `.tabs` when there are only a few. Pagers |
| 98 | -appear only when another page exists. An empty list is `.state` with one line and its action as `.act`. | |
| 99 | +appear only when another page exists, as one `nav.pager` row (Newer, the page, Older) under the list. An empty list is `.state` with one line and its action as `.act`. | |
| 99 | 100 | |
| 100 | 101 | ## Menus |
| 101 | 102 |
style/_admin_rows.scssmodified+6 -2
| @@ -53,9 +53,13 @@ | ||
| 53 | 53 | color: var(--text); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | -// Job logs pad each numbered line; the runner log has no numbers, so the box pads instead. | |
| 56 | +// The runner log is not a fit pane like a job's: it is as tall as the window leaves under the tabs and | |
| 57 | +// scrolls inside, and its lines start on the sheet's inset like the tools row above it. | |
| 57 | 58 | .ci-log.runner-log { |
| 58 | - padding: 8px 12px; | |
| 59 | + flex: none; | |
| 60 | + min-height: 240px; | |
| 61 | + max-height: calc(100dvh - 350px); | |
| 62 | + padding: 0; | |
| 59 | 63 | } |
| 60 | 64 | |
| 61 | 65 | // Copy all sits above the log, at its right edge. |
style/_ci_estimate.scssmodified+34 -16
| @@ -71,25 +71,39 @@ progress.ci-est.ci-tl-stepprog { | ||
| 71 | 71 | background: var(--border-strong); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - &.ci-sp-fail { | |
| 75 | - &::-webkit-progress-value, | |
| 76 | - &::-moz-progress-bar { | |
| 77 | - background: var(--bad); | |
| 78 | - } | |
| 74 | + // Each engine's pseudo-element gets its own rule: one it does not know drops the whole list. | |
| 75 | + &.ci-sp-pass::-webkit-progress-value { | |
| 76 | + background: var(--ok); | |
| 79 | 77 | } |
| 80 | 78 | |
| 81 | - &.ci-sp-off { | |
| 82 | - &::-webkit-progress-value, | |
| 83 | - &::-moz-progress-bar { | |
| 84 | - background: var(--border); | |
| 85 | - } | |
| 79 | + &.ci-sp-pass::-moz-progress-bar { | |
| 80 | + background: var(--ok); | |
| 86 | 81 | } |
| 87 | 82 | |
| 88 | - &.ci-sp-run { | |
| 89 | - &::-webkit-progress-value, | |
| 90 | - &::-moz-progress-bar { | |
| 91 | - background: var(--accent); | |
| 92 | - } | |
| 83 | + &.ci-sp-fail::-webkit-progress-value { | |
| 84 | + background: var(--bad); | |
| 85 | + } | |
| 86 | + | |
| 87 | + &.ci-sp-fail::-moz-progress-bar { | |
| 88 | + background: var(--bad); | |
| 89 | + } | |
| 90 | + | |
| 91 | + // Each engine's pseudo-element gets its own rule: one it does not know drops the whole list. | |
| 92 | + &.ci-sp-off::-webkit-progress-value { | |
| 93 | + background: var(--border); | |
| 94 | + } | |
| 95 | + | |
| 96 | + &.ci-sp-off::-moz-progress-bar { | |
| 97 | + background: var(--border); | |
| 98 | + } | |
| 99 | + | |
| 100 | + // Each engine's pseudo-element gets its own rule: one it does not know drops the whole list. | |
| 101 | + &.ci-sp-run::-webkit-progress-value { | |
| 102 | + background: var(--accent); | |
| 103 | + } | |
| 104 | + | |
| 105 | + &.ci-sp-run::-moz-progress-bar { | |
| 106 | + background: var(--accent); | |
| 93 | 107 | } |
| 94 | 108 | |
| 95 | 109 | // No value attribute: the element's own background carries a 30% segment that slides across. |
| @@ -100,7 +114,11 @@ progress.ci-est.ci-tl-stepprog { | ||
| 100 | 114 | animation: ci-step-slide 1.4s linear infinite; |
| 101 | 115 | |
| 102 | 116 | &::-webkit-progress-bar, |
| 103 | - &::-webkit-progress-value, | |
| 117 | + &::-webkit-progress-value { | |
| 118 | + background: transparent; | |
| 119 | + animation: none; | |
| 120 | + } | |
| 121 | + | |
| 104 | 122 | &::-moz-progress-bar { |
| 105 | 123 | background: transparent; |
| 106 | 124 | animation: none; |
style/_min_admin.scssmodified+0 -9
| @@ -47,15 +47,6 @@ form.runner-load { | ||
| 47 | 47 | margin-top: 8px; |
| 48 | 48 | } |
| 49 | 49 | |
| 50 | -// Server settings: one setting is a column of its control, its help and its actions. | |
| 51 | -.srv-row, | |
| 52 | -.srv-hints { | |
| 53 | - display: flex; | |
| 54 | - flex-direction: column; | |
| 55 | - gap: 6px; | |
| 56 | - min-width: 0; | |
| 57 | -} | |
| 58 | - | |
| 59 | 50 | // The small stepper sits at the start of its field, and its number box keeps its own width. |
| 60 | 51 | .field > .runner-pill { |
| 61 | 52 | align-self: flex-start; |
style/_one.scssmodified+197 -30
| @@ -486,7 +486,8 @@ input[type="radio"] { | ||
| 486 | 486 | padding-top: 0; |
| 487 | 487 | } |
| 488 | 488 | |
| 489 | - // The canvas's sizes: a line of text is 280 wide, a select as wide as its words, a box of text 560. | |
| 489 | + // The canvas's sizes: a line of text is 280 wide and so is a select, so every control in a form ends | |
| 490 | + // on one edge; a box of text is 560. | |
| 490 | 491 | > input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"], [type="range"], [type="hidden"]) { |
| 491 | 492 | width: 280px; |
| 492 | 493 | max-width: 100%; |
| @@ -497,9 +498,8 @@ input[type="radio"] { | ||
| 497 | 498 | width: 560px; |
| 498 | 499 | } |
| 499 | 500 | |
| 500 | - > select { | |
| 501 | - width: auto; | |
| 502 | - min-width: 160px; | |
| 501 | + > select:not([multiple]) { | |
| 502 | + width: 280px; | |
| 503 | 503 | max-width: 100%; |
| 504 | 504 | } |
| 505 | 505 | |
| @@ -674,7 +674,7 @@ input[type="radio"] { | ||
| 674 | 674 | background: var(--surface); |
| 675 | 675 | box-shadow: 0 0 0 1px var(--border); |
| 676 | 676 | color: var(--text); |
| 677 | - font-weight: 600; | |
| 677 | + font-weight: 500; // the same as its neighbours, so choosing never shifts the row | |
| 678 | 678 | } |
| 679 | 679 | } |
| 680 | 680 | |
| @@ -771,6 +771,7 @@ input[type="radio"] { | ||
| 771 | 771 | .pathbar-edit, |
| 772 | 772 | button.pathbar-edit { |
| 773 | 773 | flex: none; |
| 774 | + align-self: center; | |
| 774 | 775 | width: auto; |
| 775 | 776 | height: auto; |
| 776 | 777 | padding: 0; |
| @@ -985,6 +986,11 @@ button.corner-link { | ||
| 985 | 986 | } |
| 986 | 987 | } |
| 987 | 988 | |
| 989 | +// The avatar is the whole button: no inset, so it sits on the top bar's middle line. | |
| 990 | +.corner-float summary.corner-btn { | |
| 991 | + padding: 0; | |
| 992 | +} | |
| 993 | + | |
| 988 | 994 | .corner-sep { |
| 989 | 995 | height: 1px; |
| 990 | 996 | margin: 6px 4px; |
| @@ -1100,31 +1106,41 @@ main > .tabs { | ||
| 1100 | 1106 | } |
| 1101 | 1107 | } |
| 1102 | 1108 | |
| 1109 | +// Recent runs after the head line: a dot each, coloured by how it ended, the newest last. | |
| 1103 | 1110 | .pips { |
| 1104 | 1111 | display: inline-flex; |
| 1105 | 1112 | align-items: center; |
| 1106 | - gap: 3px; | |
| 1107 | - margin-left: 4px; | |
| 1113 | + gap: 4px; | |
| 1114 | + margin-left: 6px; | |
| 1115 | + vertical-align: middle; | |
| 1108 | 1116 | } |
| 1109 | 1117 | |
| 1110 | 1118 | .pip { |
| 1111 | 1119 | display: block; |
| 1112 | - width: 7px; | |
| 1113 | - height: 14px; | |
| 1114 | - border-radius: 2px; | |
| 1115 | - background: var(--border-strong); | |
| 1120 | + width: 8px; | |
| 1121 | + height: 8px; | |
| 1122 | + border-radius: 50%; | |
| 1123 | + box-shadow: inset 0 0 0 1.5px var(--border-strong); | |
| 1124 | + | |
| 1125 | + &.ok { | |
| 1126 | + background: var(--ok); | |
| 1127 | + box-shadow: none; | |
| 1128 | + } | |
| 1116 | 1129 | |
| 1117 | 1130 | &.bad { |
| 1118 | 1131 | background: var(--bad); |
| 1132 | + box-shadow: none; | |
| 1119 | 1133 | } |
| 1120 | 1134 | |
| 1121 | 1135 | &.live { |
| 1122 | 1136 | background: var(--accent); |
| 1137 | + box-shadow: none; | |
| 1123 | 1138 | } |
| 1124 | 1139 | |
| 1140 | + // The newest run is a little larger. | |
| 1125 | 1141 | &.cur { |
| 1126 | - outline: 2px solid var(--text); | |
| 1127 | - outline-offset: 1px; | |
| 1142 | + width: 10px; | |
| 1143 | + height: 10px; | |
| 1128 | 1144 | } |
| 1129 | 1145 | } |
| 1130 | 1146 | |
| @@ -1164,22 +1180,27 @@ main > .tabs { | ||
| 1164 | 1180 | } |
| 1165 | 1181 | } |
| 1166 | 1182 | |
| 1167 | -// The branch beside the Files heading: a quiet word that opens the one menu. | |
| 1183 | +// The branch beside the Files heading: the small soft pill every other picker in a tools row is, 32px | |
| 1184 | +// tall, that opens the one menu. | |
| 1168 | 1185 | .rail-head .ref-select > summary { |
| 1169 | 1186 | display: inline-flex; |
| 1170 | - gap: 4px; | |
| 1187 | + gap: 6px; | |
| 1171 | 1188 | align-items: center; |
| 1172 | - height: auto; | |
| 1189 | + height: 32px; | |
| 1173 | 1190 | min-height: 0; |
| 1174 | - padding: 0; | |
| 1191 | + padding: 0 12px 0 14px; | |
| 1175 | 1192 | border: 0; |
| 1176 | - border-radius: 0; | |
| 1177 | - background: none; | |
| 1193 | + border-radius: 16px; | |
| 1194 | + background: var(--surface-2); | |
| 1178 | 1195 | box-shadow: none; |
| 1179 | - color: var(--muted); | |
| 1196 | + color: var(--text); | |
| 1180 | 1197 | cursor: pointer; |
| 1181 | - font-size: 13px; | |
| 1182 | - font-weight: 600; | |
| 1198 | + font-size: 14px; | |
| 1199 | + font-weight: 500; | |
| 1200 | + | |
| 1201 | + &:hover { | |
| 1202 | + background: color-mix(in oklab, var(--surface-2) 88%, var(--text)); | |
| 1203 | + } | |
| 1183 | 1204 | |
| 1184 | 1205 | > svg:first-child { |
| 1185 | 1206 | display: none; |
| @@ -1194,7 +1215,7 @@ main > .tabs { | ||
| 1194 | 1215 | box-shadow: none; |
| 1195 | 1216 | color: inherit; |
| 1196 | 1217 | font-family: var(--font); |
| 1197 | - font-size: 13px; | |
| 1218 | + font-size: 14px; | |
| 1198 | 1219 | } |
| 1199 | 1220 | |
| 1200 | 1221 | svg { |
| @@ -1203,6 +1224,13 @@ main > .tabs { | ||
| 1203 | 1224 | } |
| 1204 | 1225 | } |
| 1205 | 1226 | |
| 1227 | +// The rail's head starts on the sheet's top edge, with no rule above it: the list's own rows draw the lines. | |
| 1228 | +.rail-head.browse-bar { | |
| 1229 | + margin: 0 0 8px; | |
| 1230 | + padding: 0; | |
| 1231 | + border: 0; | |
| 1232 | +} | |
| 1233 | + | |
| 1206 | 1234 | .rail-head { |
| 1207 | 1235 | display: flex; |
| 1208 | 1236 | flex-wrap: wrap; |
| @@ -1287,7 +1315,7 @@ main > .tabs { | ||
| 1287 | 1315 | &.sel { |
| 1288 | 1316 | background: var(--surface); |
| 1289 | 1317 | box-shadow: 0 0 0 1px var(--border); |
| 1290 | - font-weight: 600; | |
| 1318 | + font-weight: 500; // the same as its neighbours, so choosing never shifts the row | |
| 1291 | 1319 | } |
| 1292 | 1320 | } |
| 1293 | 1321 | |
| @@ -1524,6 +1552,7 @@ details > .status-list, | ||
| 1524 | 1552 | .strip-list a, |
| 1525 | 1553 | .corner-menu > a, |
| 1526 | 1554 | .corner-link, |
| 1555 | +button.corner-link.link-button, | |
| 1527 | 1556 | .menu-list > a, |
| 1528 | 1557 | .menu-list > form > button:not(.primary), |
| 1529 | 1558 | .row-menu-panel > form > button, |
| @@ -1683,6 +1712,10 @@ details > .status-list, | ||
| 1683 | 1712 | } |
| 1684 | 1713 | } |
| 1685 | 1714 | |
| 1715 | + &.ok .bar { | |
| 1716 | + background: var(--ok); | |
| 1717 | + } | |
| 1718 | + | |
| 1686 | 1719 | &.bad .bar { |
| 1687 | 1720 | background: var(--bad); |
| 1688 | 1721 | } |
| @@ -1767,6 +1800,23 @@ details > .status-list, | ||
| 1767 | 1800 | box-shadow: inset 0 0 0 5px var(--border-strong); |
| 1768 | 1801 | } |
| 1769 | 1802 | |
| 1803 | + // CI: passed, failed and running each have their colour; waiting stays a ring, cancelled a dashed one. | |
| 1804 | + &.ok { | |
| 1805 | + box-shadow: inset 0 0 0 5px var(--ok); | |
| 1806 | + } | |
| 1807 | + | |
| 1808 | + // Skipped or cancelled: the waiting ring, struck through. | |
| 1809 | + &.skip::after { | |
| 1810 | + content: ""; | |
| 1811 | + position: absolute; | |
| 1812 | + top: 7.25px; | |
| 1813 | + left: 2px; | |
| 1814 | + width: 12px; | |
| 1815 | + height: 1.5px; | |
| 1816 | + background: var(--border-strong); | |
| 1817 | + transform: rotate(-45deg); | |
| 1818 | + } | |
| 1819 | + | |
| 1770 | 1820 | &.bad { |
| 1771 | 1821 | box-shadow: inset 0 0 0 5px var(--bad); |
| 1772 | 1822 | } |
| @@ -1881,7 +1931,7 @@ details > .status-list, | ||
| 1881 | 1931 | > nav.sub a[aria-current="true"] { |
| 1882 | 1932 | background: var(--accent-soft); |
| 1883 | 1933 | color: var(--accent); |
| 1884 | - font-weight: 600; | |
| 1934 | + font-weight: 500; // the same as its neighbours, so choosing never shifts the row | |
| 1885 | 1935 | } |
| 1886 | 1936 | |
| 1887 | 1937 | .switch { |
| @@ -2214,7 +2264,7 @@ main > .diff-section, | ||
| 2214 | 2264 | #ci-view-timeline:checked ~ .ci-logbar .ci-tl-tab-timeline { |
| 2215 | 2265 | background: var(--accent-soft); |
| 2216 | 2266 | color: var(--accent); |
| 2217 | - font-weight: 600; | |
| 2267 | + font-weight: 500; // the same as its neighbours, so choosing never shifts the row | |
| 2218 | 2268 | } |
| 2219 | 2269 | |
| 2220 | 2270 | .ci-log { |
| @@ -2681,7 +2731,7 @@ dialog[data-finder] { | ||
| 2681 | 2731 | background: var(--surface); |
| 2682 | 2732 | box-shadow: 0 0 0 1px var(--border); |
| 2683 | 2733 | color: var(--text); |
| 2684 | - font-weight: 600; | |
| 2734 | + font-weight: 500; // the same as its neighbours, so choosing never shifts the row | |
| 2685 | 2735 | } |
| 2686 | 2736 | |
| 2687 | 2737 | label:has(:focus-visible) { |
| @@ -2869,13 +2919,18 @@ main select { | ||
| 2869 | 2919 | } |
| 2870 | 2920 | } |
| 2871 | 2921 | |
| 2872 | -// A select opens the shared menu panel, and its icon is the shared chevron, not a triangle. | |
| 2922 | +// A select opens the shared menu panel, and its icon is the shared chevron, not a triangle. The | |
| 2923 | +// chevron sits at the field's end, as a text field's end is its edge, so a wide select reads as one. | |
| 2873 | 2924 | @supports (appearance: base-select) { |
| 2925 | + select:not([multiple]):not([size]) { | |
| 2926 | + gap: 8px; | |
| 2927 | + } | |
| 2928 | + | |
| 2874 | 2929 | select:not([multiple]):not([size])::picker-icon { |
| 2875 | 2930 | content: ""; |
| 2876 | 2931 | width: 6px; |
| 2877 | 2932 | height: 6px; |
| 2878 | - margin: -3px 2px 0 8px; | |
| 2933 | + margin: -3px 2px 0 auto; | |
| 2879 | 2934 | border-right: 1.5px solid currentColor; |
| 2880 | 2935 | border-bottom: 1.5px solid currentColor; |
| 2881 | 2936 | rotate: 45deg; |
| @@ -2923,10 +2978,122 @@ main select { | ||
| 2923 | 2978 | > .act[aria-current] { |
| 2924 | 2979 | background: var(--surface-2); |
| 2925 | 2980 | color: var(--text); |
| 2926 | - font-weight: 600; | |
| 2981 | + font-weight: 500; // the same as its neighbours, so choosing never shifts the row | |
| 2927 | 2982 | } |
| 2928 | 2983 | |
| 2929 | 2984 | > .hint { |
| 2930 | 2985 | font-size: 14px; |
| 2931 | 2986 | } |
| 2932 | 2987 | } |
| 2988 | + | |
| 2989 | +// Pagers: Newer, the page, Older as quiet words in one row under the list, on the sheet's inset with | |
| 2990 | +// a hairline above. Every pager in the app is this row. | |
| 2991 | +nav.pager:not(.pager-numbered), | |
| 2992 | +.ci-side nav.pager:not(.pager-numbered) { | |
| 2993 | + display: flex; | |
| 2994 | + flex-wrap: wrap; | |
| 2995 | + align-items: center; | |
| 2996 | + gap: 4px; | |
| 2997 | + margin: 0; | |
| 2998 | + padding: 8px 18px; | |
| 2999 | + border-top: 1px solid var(--border); | |
| 3000 | + color: var(--muted); | |
| 3001 | + font-size: 14px; | |
| 3002 | + | |
| 3003 | + > a { | |
| 3004 | + display: inline-flex; | |
| 3005 | + align-items: center; | |
| 3006 | + height: 30px; | |
| 3007 | + padding: 0 10px; | |
| 3008 | + border-radius: 12px; | |
| 3009 | + color: var(--muted); | |
| 3010 | + font-weight: 500; | |
| 3011 | + text-decoration: none; | |
| 3012 | + | |
| 3013 | + &:first-child { | |
| 3014 | + margin-left: -10px; | |
| 3015 | + } | |
| 3016 | + | |
| 3017 | + &:hover { | |
| 3018 | + background: var(--surface-2); | |
| 3019 | + color: var(--text); | |
| 3020 | + text-decoration: none; | |
| 3021 | + } | |
| 3022 | + } | |
| 3023 | + | |
| 3024 | + > span { | |
| 3025 | + padding: 0 10px; | |
| 3026 | + } | |
| 3027 | + | |
| 3028 | + > span:first-child { | |
| 3029 | + padding-left: 0; | |
| 3030 | + } | |
| 3031 | +} | |
| 3032 | + | |
| 3033 | +// A closed disclosure leaves no empty box behind: in a row of actions its hidden content would be one | |
| 3034 | +// more item, and one more gap, between its summary and the next action. | |
| 3035 | +details:not([open])::details-content { | |
| 3036 | + display: none; | |
| 3037 | +} | |
| 3038 | + | |
| 3039 | +// A button in a tools row sits on the row's middle line, like the words beside it. | |
| 3040 | +.sheet-tools > button, | |
| 3041 | +.sheet-tools > form > button { | |
| 3042 | + align-self: center; | |
| 3043 | +} | |
| 3044 | + | |
| 3045 | +// Colour rows: the swatches sit on nine fixed columns, the most any row has, so the sliders and the hex | |
| 3046 | +// box of Background and Accent start on one edge whatever each row holds. Hue, vividness and hex | |
| 3047 | +// follow on one line, each its own width; a note about a lightened hex goes under them. | |
| 3048 | +.colour-choices { | |
| 3049 | + display: grid; | |
| 3050 | + grid-template-columns: repeat(9, 30px) auto; | |
| 3051 | + align-items: center; | |
| 3052 | + gap: 8px; | |
| 3053 | +} | |
| 3054 | + | |
| 3055 | +.colour-choices > .tune { | |
| 3056 | + grid-column: 10; | |
| 3057 | + display: flex; | |
| 3058 | + flex-wrap: wrap; | |
| 3059 | + align-items: center; | |
| 3060 | + gap: 6px 12px; | |
| 3061 | + margin-left: 12px; | |
| 3062 | + | |
| 3063 | + > .tune-row { | |
| 3064 | + display: contents; | |
| 3065 | + } | |
| 3066 | + | |
| 3067 | + .hue-stripe, | |
| 3068 | + .vivid-stripe { | |
| 3069 | + flex: none; | |
| 3070 | + width: 170px; | |
| 3071 | + } | |
| 3072 | + | |
| 3073 | + .hex-note { | |
| 3074 | + flex-basis: 100%; | |
| 3075 | + } | |
| 3076 | + | |
| 3077 | + .hex-note:empty { | |
| 3078 | + display: none; | |
| 3079 | + } | |
| 3080 | +} | |
| 3081 | + | |
| 3082 | +@media (max-width: 700px) { | |
| 3083 | + .colour-choices > .tune { | |
| 3084 | + grid-column: 1 / -1; | |
| 3085 | + margin-left: 0; | |
| 3086 | + } | |
| 3087 | +} | |
| 3088 | + | |
| 3089 | +// A box with its note: the note beside the box's words, on one line while there is room. | |
| 3090 | +.checks > .check-row { | |
| 3091 | + display: flex; | |
| 3092 | + flex-wrap: wrap; | |
| 3093 | + align-items: baseline; | |
| 3094 | + column-gap: 10px; | |
| 3095 | + | |
| 3096 | + > .hint { | |
| 3097 | + margin: 0; | |
| 3098 | + } | |
| 3099 | +} |
style/_one_admin.scssmodified+120 -29
| @@ -85,58 +85,79 @@ $repo: 'main:has(> section.repo-head .tab.active[href$="/settings"])'; | ||
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | |
| 88 | -// Server settings: each setting is one row, its name and value, then its Set here beside them. | |
| 88 | +// Server settings: one setting a line. Its name, then its control on one fixed width, then its notes, | |
| 89 | +// so every control and every note starts on the same edge. A page is short enough to need no scroll. | |
| 89 | 90 | #{$admin} .srv-row { |
| 90 | - display: flex; | |
| 91 | - flex-direction: row; | |
| 92 | - flex-wrap: wrap; | |
| 91 | + display: grid; | |
| 92 | + grid-template-columns: 210px 280px minmax(0, 1fr); | |
| 93 | + column-gap: 16px; | |
| 93 | 94 | align-items: center; |
| 94 | - justify-content: flex-start; | |
| 95 | - column-gap: 10px; | |
| 96 | - margin: 0 -18px; | |
| 97 | - padding: 0 18px; | |
| 95 | + min-height: 52px; | |
| 96 | + padding: 7px 18px; | |
| 97 | + box-sizing: border-box; | |
| 98 | 98 | border-bottom: 1px solid var(--border); |
| 99 | 99 | } |
| 100 | 100 | |
| 101 | -#{$admin} .srv-row > .line { | |
| 102 | - flex: 0 0 auto; | |
| 103 | - width: auto; | |
| 104 | - min-height: 46px; | |
| 105 | - margin: 0; | |
| 106 | - padding: 0; | |
| 107 | - border: 0; | |
| 101 | +#{$admin} .srv-name { | |
| 102 | + color: var(--text); | |
| 103 | + font-size: 15px; | |
| 104 | + font-weight: 500; | |
| 105 | + line-height: 20px; | |
| 108 | 106 | } |
| 109 | 107 | |
| 110 | -#{$admin} .srv-row > .srv-control { | |
| 111 | - flex: 1 1 100%; | |
| 112 | - padding: 10px 0; | |
| 113 | -} | |
| 108 | +#{$admin} .srv-value { | |
| 109 | + display: flex; | |
| 110 | + align-items: center; | |
| 111 | + min-width: 0; | |
| 112 | + overflow-wrap: anywhere; | |
| 113 | + color: var(--text); | |
| 114 | + font-size: 14px; | |
| 114 | 115 | |
| 115 | -#{$admin} .srv-row > details.reveal { | |
| 116 | - flex: 0 0 auto; | |
| 116 | + > :is(input:not([type="checkbox"]), select) { | |
| 117 | + width: 100%; | |
| 118 | + max-width: none; | |
| 119 | + } | |
| 117 | 120 | } |
| 118 | 121 | |
| 119 | -// A read-only setting's notes follow its value on the same line, one sentence after another. | |
| 120 | -#{$admin} .srv-row > .srv-hints { | |
| 122 | +#{$admin} .srv-hints { | |
| 121 | 123 | display: flex; |
| 122 | - flex-direction: row; | |
| 123 | - align-items: baseline; | |
| 124 | - flex: 0 1 auto; | |
| 125 | 124 | flex-wrap: wrap; |
| 125 | + align-items: baseline; | |
| 126 | 126 | column-gap: 4px; |
| 127 | + min-width: 0; | |
| 127 | 128 | |
| 128 | 129 | > .hint { |
| 129 | 130 | margin: 0; |
| 131 | + font-size: 13px; | |
| 132 | + line-height: 18px; | |
| 130 | 133 | } |
| 131 | 134 | |
| 132 | 135 | > .hint + .hint::before { |
| 133 | 136 | content: "· "; |
| 134 | 137 | } |
| 138 | + | |
| 139 | + .act { | |
| 140 | + height: auto; | |
| 141 | + padding: 0; | |
| 142 | + } | |
| 135 | 143 | } |
| 136 | 144 | |
| 137 | -#{$admin} .srv-row > details.reveal[open] { | |
| 138 | - flex-basis: 100%; | |
| 139 | - padding-bottom: 12px; | |
| 145 | +// Save sits under the controls, on their edge. | |
| 146 | +#{$admin} .srv-save { | |
| 147 | + margin: 0; | |
| 148 | + padding: 14px 18px 16px calc(18px + 210px + 16px); | |
| 149 | +} | |
| 150 | + | |
| 151 | +@media (max-width: 700px) { | |
| 152 | + #{$admin} .srv-row { | |
| 153 | + grid-template-columns: minmax(0, 1fr); | |
| 154 | + row-gap: 6px; | |
| 155 | + padding: 10px 14px; | |
| 156 | + } | |
| 157 | + | |
| 158 | + #{$admin} .srv-save { | |
| 159 | + padding-left: 14px; | |
| 160 | + } | |
| 140 | 161 | } |
| 141 | 162 | |
| 142 | 163 | // The server form takes the sheet's width, so its rows reach the same edge as the topic rules. |
| @@ -215,3 +236,73 @@ $repo: 'main:has(> section.repo-head .tab.active[href$="/settings"])'; | ||
| 215 | 236 | display: none; |
| 216 | 237 | } |
| 217 | 238 | } |
| 239 | + | |
| 240 | +// Health: the verdict leads the head's line with its dot. | |
| 241 | +.head-sub .health-sum::before { | |
| 242 | + content: ""; | |
| 243 | + display: inline-block; | |
| 244 | + width: 8px; | |
| 245 | + height: 8px; | |
| 246 | + margin: 0 8px 1px 0; | |
| 247 | + border-radius: 50%; | |
| 248 | + background: var(--ok); | |
| 249 | + vertical-align: middle; | |
| 250 | +} | |
| 251 | + | |
| 252 | +.head-sub .health-sum.bad::before { | |
| 253 | + background: var(--bad); | |
| 254 | +} | |
| 255 | + | |
| 256 | +// An alert's note belongs to its line: no hairline between them, the hairline closes the pair. | |
| 257 | +#{$admin} .sec[role="alert"] > .line:has(+ .hint) { | |
| 258 | + border-bottom: 0; | |
| 259 | +} | |
| 260 | + | |
| 261 | +#{$admin} .sec[role="alert"] > .line + .hint { | |
| 262 | + margin-top: -8px; | |
| 263 | + padding-bottom: 10px; | |
| 264 | + border-bottom: 1px solid var(--border); | |
| 265 | +} | |
| 266 | + | |
| 267 | +// A wide window holds Storage and Services side by side under the alerts, so the page needs no scroll. | |
| 268 | +@media (min-width: 1000px) { | |
| 269 | + .health-sheet { | |
| 270 | + display: grid; | |
| 271 | + grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); | |
| 272 | + align-items: start; | |
| 273 | + } | |
| 274 | + | |
| 275 | + .health-sheet > .sec[role="alert"] { | |
| 276 | + grid-column: 1 / -1; | |
| 277 | + } | |
| 278 | + | |
| 279 | + .sheet.health-sheet > .sec + .sec { | |
| 280 | + border-top: 0; | |
| 281 | + } | |
| 282 | + | |
| 283 | + .sheet.health-sheet > .sec[role="alert"] ~ .sec { | |
| 284 | + border-top: 1px solid var(--border); | |
| 285 | + } | |
| 286 | + | |
| 287 | + .sheet.health-sheet > .sec:last-child { | |
| 288 | + align-self: stretch; | |
| 289 | + border-left: 1px solid var(--border); | |
| 290 | + } | |
| 291 | +} | |
| 292 | + | |
| 293 | +// A runner's recent jobs scroll in their own pane under the tabs, so the Jobs tab fits the window. | |
| 294 | +// The pane reaches the sheet's edges, as its rows do. | |
| 295 | +#{$admin} .runner-recent { | |
| 296 | + max-height: calc(100dvh - 430px); | |
| 297 | + min-height: 140px; | |
| 298 | + margin: 0 -18px -14px; | |
| 299 | + overflow-y: auto; | |
| 300 | + | |
| 301 | + > .line { | |
| 302 | + padding: 8px 18px; | |
| 303 | + } | |
| 304 | + | |
| 305 | + > .line:last-child { | |
| 306 | + border-bottom: 0; | |
| 307 | + } | |
| 308 | +} |
style/_one_ci.scssmodified+108 -0
| @@ -248,3 +248,111 @@ main:has(> .ci-job) > .sheet { | ||
| 248 | 248 | .ci-tl-panel-timeline .ci-job-item .ci-job-line { |
| 249 | 249 | flex: 0 1 auto; |
| 250 | 250 | } |
| 251 | + | |
| 252 | +// A run's title is its commit subject: one line, cut with an ellipsis, whole on hover. | |
| 253 | +.head-sub .b[data-run] { | |
| 254 | + display: inline-block; | |
| 255 | + max-width: min(60ch, 100%); | |
| 256 | + overflow: hidden; | |
| 257 | + text-overflow: ellipsis; | |
| 258 | + white-space: nowrap; | |
| 259 | + vertical-align: bottom; | |
| 260 | +} | |
| 261 | + | |
| 262 | +// The timeline is drawn on 640 units with text of the page's size: at 640px its labels match the page's | |
| 263 | +// text, so it stops growing there instead of filling a wide window. | |
| 264 | +.ci-gantt { | |
| 265 | + max-width: 640px; | |
| 266 | +} | |
| 267 | + | |
| 268 | +// The log search's match count takes room only once there is a count to show. | |
| 269 | +.ci-logcount:empty { | |
| 270 | + display: none; | |
| 271 | +} | |
| 272 | + | |
| 273 | +// The timeline tab: its parts keep their own heights in the scrolling panel (the chart had shrunk to | |
| 274 | +// nothing), start on the sheet's inset, and every action sits on the left with the rest. | |
| 275 | +.ci-tl-panel-timeline { | |
| 276 | + padding: 12px 18px; | |
| 277 | + | |
| 278 | + > * { | |
| 279 | + flex: none; | |
| 280 | + } | |
| 281 | + | |
| 282 | + .ci-job-head { | |
| 283 | + justify-content: flex-start; | |
| 284 | + margin: 12px 0 4px -10px; | |
| 285 | + } | |
| 286 | + | |
| 287 | + // A job's last log line reads as the start of its output: on the name's edge, not centred. | |
| 288 | + .ci-job-last { | |
| 289 | + justify-content: flex-start; | |
| 290 | + align-self: stretch; | |
| 291 | + padding-left: 26px; | |
| 292 | + font-family: var(--mono); | |
| 293 | + font-size: 13px; | |
| 294 | + } | |
| 295 | + | |
| 296 | + .ci-job-last-text { | |
| 297 | + overflow: hidden; | |
| 298 | + text-overflow: ellipsis; | |
| 299 | + } | |
| 300 | +} | |
| 301 | + | |
| 302 | +// The run's commit history under the timeline: one caption line (how many commits, what a bar's | |
| 303 | +// height means), then the bars, each a narrow column in the CI colour of its commit, from the left. | |
| 304 | +.ci-tl-panel-timeline .ci-dock, | |
| 305 | +.ci-job .ci-dock { | |
| 306 | + display: flex; | |
| 307 | + flex-direction: row; | |
| 308 | + flex-wrap: wrap; | |
| 309 | + align-items: baseline; | |
| 310 | + column-gap: 6px; | |
| 311 | + height: auto; | |
| 312 | + padding: 14px 0 4px; | |
| 313 | + | |
| 314 | + > .hint { | |
| 315 | + order: 2; | |
| 316 | + margin: 0; | |
| 317 | + | |
| 318 | + &::before { | |
| 319 | + content: "· "; | |
| 320 | + } | |
| 321 | + } | |
| 322 | + | |
| 323 | + .dock-history, | |
| 324 | + .history-strip { | |
| 325 | + display: contents; | |
| 326 | + } | |
| 327 | + | |
| 328 | + .history-label { | |
| 329 | + order: 1; | |
| 330 | + position: static; | |
| 331 | + width: auto; | |
| 332 | + height: auto; | |
| 333 | + clip-path: none; | |
| 334 | + margin: 0; | |
| 335 | + font-family: var(--font); | |
| 336 | + font-size: 13px; | |
| 337 | + letter-spacing: 0; | |
| 338 | + text-transform: none; | |
| 339 | + line-height: 18px; | |
| 340 | + } | |
| 341 | + | |
| 342 | + .history-bars { | |
| 343 | + order: 3; | |
| 344 | + flex: 0 0 100%; | |
| 345 | + justify-content: flex-start; | |
| 346 | + height: 48px; | |
| 347 | + margin-top: 10px; | |
| 348 | + gap: 3px; | |
| 349 | + | |
| 350 | + > a { | |
| 351 | + flex: 0 0 14px; | |
| 352 | + } | |
| 353 | + } | |
| 354 | +} | |
| 355 | + | |
| 356 | +.ci-job .ci-dock { | |
| 357 | + padding: 12px 18px; | |
| 358 | +} |
style/_one_threads.scssmodified+21 -0
| @@ -302,3 +302,24 @@ | ||
| 302 | 302 | } |
| 303 | 303 | } |
| 304 | 304 | } |
| 305 | + | |
| 306 | +// A comment's own actions are one row under it: its reactions, then Edit and Delete. | |
| 307 | +article.thread-entry:has(> .reactions + .acts) { | |
| 308 | + display: grid; | |
| 309 | + grid-template-columns: auto minmax(0, 1fr); | |
| 310 | + align-items: center; | |
| 311 | + column-gap: 4px; | |
| 312 | + | |
| 313 | + > * { | |
| 314 | + grid-column: 1 / -1; | |
| 315 | + min-width: 0; | |
| 316 | + } | |
| 317 | + | |
| 318 | + > .reactions { | |
| 319 | + grid-column: 1; | |
| 320 | + } | |
| 321 | + | |
| 322 | + > .reactions + .acts { | |
| 323 | + grid-column: 2; | |
| 324 | + } | |
| 325 | +} |
style/_timeline.scssmodified+7 -1
| @@ -120,7 +120,13 @@ body:has(.repo-home) .site-footer { | ||
| 120 | 120 | opacity: 0.42; |
| 121 | 121 | } |
| 122 | 122 | |
| 123 | - // A failure and the running commit are the only bars at full strength. | |
| 123 | + // A bar has its commit's CI colour: passed is the ok colour, softer, so a failure and the running | |
| 124 | + // commit stand out at full strength. | |
| 125 | + > a.hs-ok { | |
| 126 | + background: var(--ok); | |
| 127 | + opacity: 0.5; | |
| 128 | + } | |
| 129 | + | |
| 124 | 130 | > a.hs-bad { |
| 125 | 131 | background: var(--bad); |
| 126 | 132 | opacity: 1; |
style/main.scssmodified+3 -2
| @@ -3956,9 +3956,10 @@ span.reaction { | ||
| 3956 | 3956 | vertical-align: middle; |
| 3957 | 3957 | } |
| 3958 | 3958 | |
| 3959 | + // Passed is the ok colour everywhere CI draws a state: the ticks, the steps and this pill. | |
| 3959 | 3960 | &.ci-success { |
| 3960 | - background: var(--public-bg); | |
| 3961 | - color: var(--public-text); | |
| 3961 | + background: color-mix(in srgb, var(--ok) 14%, transparent); | |
| 3962 | + color: var(--ok); | |
| 3962 | 3963 | } |
| 3963 | 3964 | |
| 3964 | 3965 | &.ci-queued, |