(t(lang, Key::Members))
(t(lang, Key::AdminOnly))
diff --git a/crates/izlek-web/tests/http.rs b/crates/izlek-web/tests/http.rs
index 92e3c07..a0bc414 100644
--- a/crates/izlek-web/tests/http.rs
+++ b/crates/izlek-web/tests/http.rs
@@ -2893,14 +2893,32 @@ async fn creating_a_task_into_a_ruled_column_owes_mail() {
}
#[tokio::test]
-async fn the_settings_sidenav_offers_logs() {
+async fn the_topbar_nav_marks_the_active_page() {
let app = App::open().await;
let admin_cookie = admin(&app).await;
- let page = app.get("/settings", Some(&admin_cookie)).await;
- assert_eq!(page.status, StatusCode::OK);
+ for (path, active) in [("/", "/"), ("/rules", "/rules"), ("/logs", "/logs"), ("/settings", "/settings")] {
+ let page = app.get(path, Some(&admin_cookie)).await;
+ assert_eq!(page.status, StatusCode::OK);
+ let html = String::from_utf8_lossy(&page.bytes);
+ for nav in ["/", "/rules", "/logs", "/settings"] {
+ let expected = if nav == active {
+ format!(r#"class="topbar-nav topbar-nav-on" href="{nav}""#)
+ } else {
+ format!(r#"class="topbar-nav" href="{nav}""#)
+ };
+ assert!(html.contains(&expected), "page {path} lacks `{expected}`: {html}");
+ }
+ }
+
+ // The settings section list keeps the panels' admin gating: a member
+ // sees only the Profile anchor.
+ let member = invited(&app, &admin_cookie, "deniz@izlek.sh", "Deniz", Role::Member).await;
+ let page = app.get("/settings", Some(&member)).await;
let html = String::from_utf8_lossy(&page.bytes);
- assert!(html.contains("href=\"/logs\""), "{html}");
+ assert!(html.contains(r##"href="#profile""##), "{html}");
+ assert!(!html.contains("href=\"#limits\""), "{html}");
+ assert!(!html.contains("href=\"#members\""), "{html}");
}
/// Polls the store until a `Rule` send for `rule_id` addressed to `recipient`
diff --git a/style/main.scss b/style/main.scss
index 2ddb58b..0934e02 100644
--- a/style/main.scss
+++ b/style/main.scss
@@ -377,6 +377,28 @@ a {
font-weight: 600;
}
+.topbar-nav-links {
+ display: flex;
+ gap: 16px;
+}
+
+.topbar-nav {
+ font-family: var(--font-mono);
+ font-size: 10px;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--muted-soft);
+ text-decoration: none;
+ padding-bottom: 2px;
+
+ &:hover { color: var(--ink); }
+
+ &-on {
+ color: var(--ink);
+ box-shadow: inset 0 -2px 0 var(--ink);
+ }
+}
+
.scaffold-note {
margin: 24px;
padding: 20px 24px;
@@ -2064,39 +2086,9 @@ a {
// --- Settings (Settings and MemberSettings artboards) ----------------------
.settings-shell {
- display: flex;
- min-height: calc(100vh - var(--topbar-height));
-}
-
-.sidenav {
- width: 220px;
- flex-shrink: 0;
- border-right: 1px solid var(--border);
- padding: 20px 12px;
display: flex;
flex-direction: column;
- gap: 2px;
-}
-
-.sidenav-item {
- display: flex;
- align-items: center;
- height: 36px;
- padding: 0 12px;
- border-radius: var(--radius);
- font-size: 13px;
- font-weight: 500;
- color: var(--ink-soft);
- text-decoration: none;
- transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease);
-
- &:hover { background: var(--surface-sunken); color: var(--ink); }
-
- &-on {
- background: var(--accent-tint);
- color: var(--accent-ink);
- font-weight: 600;
- }
+ min-height: calc(100vh - var(--topbar-height));
}
.settings-stage {
@@ -2116,6 +2108,23 @@ a {
gap: 10px;
}
+.settings-sections {
+ display: flex;
+ flex-wrap: wrap;
+ gap: 16px;
+}
+
+.settings-section-link {
+ font-family: var(--font-mono);
+ font-size: 10px;
+ letter-spacing: 0.08em;
+ text-transform: uppercase;
+ color: var(--muted-soft);
+ text-decoration: none;
+
+ &:hover { color: var(--ink); }
+}
+
.settings-title {
margin: 0;
font-size: 18px;