Settings takes the rail — one section, no scrollbar, a password door
Browse files at this commitf11db968d15532a23505680964c163092af97047Parent: aec6e70- feat
- settings takes the rail — one section, no scrollbar, a password door
7 changed files +217 -48
- crates/izlek-web/src/i18n.rs +6 -0
- crates/izlek-web/src/logs.rs +3 -3
- crates/izlek-web/src/settings.rs +83 -20
- crates/izlek-web/tests/http.rs +77 -13
- style/_instrument.scss +15 -0
- style/_ledger.scss +10 -0
- style/main.scss +23 -12
crates/izlek-web/src/i18n.rsmodified+6 -0
| @@ -166,6 +166,8 @@ pub enum Key { | ||
| 166 | 166 | SigningInAsLabel, |
| 167 | 167 | NewPasswordLabel, |
| 168 | 168 | SetPasswordAndSignIn, |
| 169 | + CurrentPasswordLabel, | |
| 170 | + ChangePassword, | |
| 169 | 171 | |
| 170 | 172 | // rules.rs |
| 171 | 173 | MailRules, |
| @@ -562,6 +564,10 @@ pub fn t(lang: Lang, key: Key) -> &'static str { | ||
| 562 | 564 | (NewPasswordLabel, Tr) => "YENİ PAROLA", |
| 563 | 565 | (SetPasswordAndSignIn, En) => "Set password and sign in", |
| 564 | 566 | (SetPasswordAndSignIn, Tr) => "Parolayı ayarla ve giriş yap", |
| 567 | + (CurrentPasswordLabel, En) => "CURRENT PASSWORD", | |
| 568 | + (CurrentPasswordLabel, Tr) => "MEVCUT PAROLA", | |
| 569 | + (ChangePassword, En) => "Change password", | |
| 570 | + (ChangePassword, Tr) => "Parolayı değiştir", | |
| 565 | 571 | (AdminMadeYouAnAccount, En) => "An admin made you an account.", |
| 566 | 572 | (AdminMadeYouAnAccount, Tr) => "Bir yönetici sana hesap oluşturdu.", |
| 567 | 573 |
crates/izlek-web/src/logs.rsmodified+3 -3
| @@ -422,7 +422,7 @@ async fn logs_screen(cx: &Cx, snapshot: LogsSnapshot) -> Result { | ||
| 422 | 422 | <h2 class="panel-title">(t(lang, Key::MailQueue))</h2> |
| 423 | 423 | </div> |
| 424 | 424 | <div class="panel-body"> |
| 425 | - <div class="rule-list rule-list-scroll"> | |
| 425 | + <div class="rule-list"> | |
| 426 | 426 | for line in queue { |
| 427 | 427 | let is_failed_or_held = line.state_kind == "failed" || line.state_kind == "held"; |
| 428 | 428 | let state_note = if is_failed_or_held { |
| @@ -454,7 +454,7 @@ async fn logs_screen(cx: &Cx, snapshot: LogsSnapshot) -> Result { | ||
| 454 | 454 | <h2 class="panel-title">(t(lang, Key::MailDecisions))</h2> |
| 455 | 455 | </div> |
| 456 | 456 | <div class="panel-body"> |
| 457 | - <div class="rule-list rule-list-scroll"> | |
| 457 | + <div class="rule-list"> | |
| 458 | 458 | for group in decisions { |
| 459 | 459 | let header = match group.happened { |
| 460 | 460 | Some(happened) => format!("{} · {}", group.task, happened), |
| @@ -489,7 +489,7 @@ async fn logs_screen(cx: &Cx, snapshot: LogsSnapshot) -> Result { | ||
| 489 | 489 | <h2 class="panel-title">(t(lang, Key::Activity))</h2> |
| 490 | 490 | </div> |
| 491 | 491 | <div class="panel-body"> |
| 492 | - <div class="rule-list rule-list-scroll"> | |
| 492 | + <div class="rule-list"> | |
| 493 | 493 | for line in activity { |
| 494 | 494 | <div class="rule-row"> |
| 495 | 495 | <div class="rule-sentence"> |
crates/izlek-web/src/settings.rsmodified+83 -20
| @@ -182,23 +182,39 @@ fn redirect_to(query: &str) -> (StatusCode, HeaderMap, Vec<u8>) { | ||
| 182 | 182 | (StatusCode::SEE_OTHER, headers, Vec::new()) |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | +/// Which rail section a call's redirect lands back on, so the reload shows | |
| 186 | +/// the panel the form it answers actually lives in. | |
| 187 | +fn section_of_call(call: &str) -> &'static str { | |
| 188 | + match call { | |
| 189 | + "save_sender" | "send_test_mail" => "outgoing", | |
| 190 | + "save_limits" => "limits", | |
| 191 | + "invite_member" | "set_role" | "resend_link" => "members", | |
| 192 | + _ => "profile", | |
| 193 | + } | |
| 194 | +} | |
| 195 | + | |
| 185 | 196 | /// Where a save lands: back on Settings, with the refusal (if any) on the |
| 186 | 197 | /// query the same way `files.rs`'s upload carries one, or `saved=<call>` |
| 187 | -/// when there was nothing to refuse. | |
| 198 | +/// when there was nothing to refuse — either way, on the rail section that | |
| 199 | +/// call belongs to. | |
| 188 | 200 | pub(crate) fn saved_or_refused( |
| 189 | 201 | call: &str, |
| 190 | 202 | refusal: Option<Refusal>, |
| 191 | 203 | ) -> (StatusCode, HeaderMap, Vec<u8>) { |
| 204 | + let section = section_of_call(call); | |
| 192 | 205 | match refusal { |
| 193 | 206 | // `BadSender`'s code collapses six different complaints into one |
| 194 | 207 | // generic "bad-sender"; the sentence save time actually wrote rides |
| 195 | 208 | // along as `why` so the redirect does not have to guess it back. |
| 196 | 209 | Some(Refusal::BadSender(problem)) => redirect_to(&format!( |
| 197 | - "refusal=bad-sender&on={call}&why={}", | |
| 210 | + "refusal=bad-sender&on={call}&why={}§ion={section}", | |
| 198 | 211 | qsencode(&problem) |
| 199 | 212 | )), |
| 200 | - Some(refusal) => redirect_to(&format!("refusal={}&on={call}", refusal.code())), | |
| 201 | - None => redirect_to(&format!("saved={call}")), | |
| 213 | + Some(refusal) => redirect_to(&format!( | |
| 214 | + "refusal={}&on={call}§ion={section}", | |
| 215 | + refusal.code() | |
| 216 | + )), | |
| 217 | + None => redirect_to(&format!("saved={call}§ion={section}")), | |
| 202 | 218 | } |
| 203 | 219 | } |
| 204 | 220 | |
| @@ -803,6 +819,27 @@ fn query_value<'q>(query: &'q str, key: &str) -> Option<&'q str> { | ||
| 803 | 819 | }) |
| 804 | 820 | } |
| 805 | 821 | |
| 822 | +/// Which rail section the page renders. Only one is drawn at a time; an | |
| 823 | +/// admin-only value asked for by anyone else falls back to `Profile`, same as | |
| 824 | +/// a section name it does not recognize at all. | |
| 825 | +#[derive(Clone, Copy, PartialEq, Eq)] | |
| 826 | +enum Section { | |
| 827 | + Profile, | |
| 828 | + Outgoing, | |
| 829 | + Limits, | |
| 830 | + Members, | |
| 831 | +} | |
| 832 | + | |
| 833 | +/// The class a rail link wears: `active` on the section it points to when | |
| 834 | +/// that is the one showing, plain otherwise. | |
| 835 | +fn rail_class(current: Section, target: Section) -> &'static str { | |
| 836 | + if current == target { | |
| 837 | + "settings-section-link active" | |
| 838 | + } else { | |
| 839 | + "settings-section-link" | |
| 840 | + } | |
| 841 | +} | |
| 842 | + | |
| 806 | 843 | /// The settings screen. |
| 807 | 844 | #[page("/settings")] |
| 808 | 845 | #[allow(unused_variables)] |
| @@ -822,6 +859,12 @@ async fn settings_page(cx: &Cx) -> Result { | ||
| 822 | 859 | let lang = Lang::from_code(&user.language); |
| 823 | 860 | let administers = user.role.can_administer(); |
| 824 | 861 | let query = topcoat::router::request::uri(cx).query().unwrap_or(""); |
| 862 | + let section = match query_value(query, "section") { | |
| 863 | + Some("outgoing") if administers => Section::Outgoing, | |
| 864 | + Some("limits") if administers => Section::Limits, | |
| 865 | + Some("members") if administers => Section::Members, | |
| 866 | + _ => Section::Profile, | |
| 867 | + }; | |
| 825 | 868 | |
| 826 | 869 | let zone = izlek_core::detail::parse_zone(&user.timezone); |
| 827 | 870 | let sender = if administers { |
| @@ -852,6 +895,7 @@ async fn settings_page(cx: &Cx) -> Result { | ||
| 852 | 895 | let (invite_refusal, _) = call_state(query, "invite_member"); |
| 853 | 896 | let (role_refusal, _) = call_state(query, "set_role"); |
| 854 | 897 | let member_refusal = resend_refusal.or(invite_refusal).or(role_refusal); |
| 898 | + let (password_refusal, _) = call_state(query, "change_password"); | |
| 855 | 899 | let mailed = query_value(query, "mailed").map(decode_q); |
| 856 | 900 | |
| 857 | 901 | view! { |
| @@ -867,20 +911,16 @@ async fn settings_page(cx: &Cx) -> Result { | ||
| 867 | 911 | </header> |
| 868 | 912 | |
| 869 | 913 | <div class="settings-shell"> |
| 914 | + <nav class="settings-sections"> | |
| 915 | + <a class=(rail_class(section, Section::Profile)) href="/settings?section=profile">(t(lang, Key::YourProfile))</a> | |
| 916 | + if administers { | |
| 917 | + <a class=(rail_class(section, Section::Outgoing)) href="/settings?section=outgoing">(t(lang, Key::OutgoingMail))</a> | |
| 918 | + <a class=(rail_class(section, Section::Limits)) href="/settings?section=limits">(t(lang, Key::WorkspaceLimits))</a> | |
| 919 | + <a class=(rail_class(section, Section::Members)) href="/settings?section=members">(t(lang, Key::Members))</a> | |
| 920 | + } | |
| 921 | + </nav> | |
| 870 | 922 | <main class="settings-stage"> |
| 871 | - <div class="settings-head"> | |
| 872 | - <h1 class="settings-title">(t(lang, Key::NavSettings))</h1> | |
| 873 | - <span class="chip chip-role">(user.role.as_str().to_string())</span> | |
| 874 | - </div> | |
| 875 | - <nav class="settings-sections"> | |
| 876 | - <a class="settings-section-link" href="#profile">(t(lang, Key::YourProfile))</a> | |
| 877 | - if administers { | |
| 878 | - <a class="settings-section-link" href="#outgoing">(t(lang, Key::OutgoingMail))</a> | |
| 879 | - <a class="settings-section-link" href="#limits">(t(lang, Key::WorkspaceLimits))</a> | |
| 880 | - <a class="settings-section-link" href="#members">(t(lang, Key::Members))</a> | |
| 881 | - } | |
| 882 | - </nav> | |
| 883 | - | |
| 923 | + if section == Section::Profile { | |
| 884 | 924 | <section class="panel" id="profile"> |
| 885 | 925 | <div class="panel-head"> |
| 886 | 926 | <h2 class="panel-title">(t(lang, Key::YourProfile))</h2> |
| @@ -967,7 +1007,30 @@ async fn settings_page(cx: &Cx) -> Result { | ||
| 967 | 1007 | } |
| 968 | 1008 | </section> |
| 969 | 1009 | |
| 970 | - if let Some(sender) = &sender { | |
| 1010 | + <section class="panel" id="password"> | |
| 1011 | + <div class="panel-head"> | |
| 1012 | + <h2 class="panel-title">(t(lang, Key::ChangePassword))</h2> | |
| 1013 | + </div> | |
| 1014 | + <form method="post" action="/api/change_password" class="panel-body"> | |
| 1015 | + <label class="field"> | |
| 1016 | + <span class="field-label">(t(lang, Key::CurrentPasswordLabel))</span> | |
| 1017 | + <input class="field-input" type="password" name="current" autocomplete="current-password" required=""> | |
| 1018 | + </label> | |
| 1019 | + <label class="field"> | |
| 1020 | + <span class="field-label">(t(lang, Key::NewPasswordLabel))</span> | |
| 1021 | + <input class="field-input" type="password" name="new" autocomplete="new-password" required=""> | |
| 1022 | + </label> | |
| 1023 | + <div class="panel-foot"> | |
| 1024 | + if let Some(refusal) = &password_refusal { | |
| 1025 | + <span class="field-error">(refusal.message_in(lang))</span> | |
| 1026 | + } | |
| 1027 | + <button class="primary" type="submit">(t(lang, Key::ChangePassword))</button> | |
| 1028 | + </div> | |
| 1029 | + </form> | |
| 1030 | + </section> | |
| 1031 | + } | |
| 1032 | + | |
| 1033 | + if section == Section::Outgoing && let Some(sender) = &sender { | |
| 971 | 1034 | let connected = sender.is_connected(); |
| 972 | 1035 | let password_set = sender.password_set; |
| 973 | 1036 | <section class="panel" id="outgoing"> |
| @@ -1074,7 +1137,7 @@ async fn settings_page(cx: &Cx) -> Result { | ||
| 1074 | 1137 | </section> |
| 1075 | 1138 | } |
| 1076 | 1139 | |
| 1077 | - if let Some((attachment_limit_mb, photo_limit_mb)) = limits { | |
| 1140 | + if section == Section::Limits && let Some((attachment_limit_mb, photo_limit_mb)) = limits { | |
| 1078 | 1141 | <section class="panel" id="limits"> |
| 1079 | 1142 | <div class="panel-head"> |
| 1080 | 1143 | <h2 class="panel-title">(t(lang, Key::WorkspaceLimits))</h2> |
| @@ -1130,7 +1193,7 @@ async fn settings_page(cx: &Cx) -> Result { | ||
| 1130 | 1193 | </section> |
| 1131 | 1194 | } |
| 1132 | 1195 | |
| 1133 | - if let Some(members) = members { | |
| 1196 | + if section == Section::Members && let Some(members) = members { | |
| 1134 | 1197 | <section class="panel" id="members"> |
| 1135 | 1198 | <div class="panel-head"> |
| 1136 | 1199 | <h2 class="panel-title">(t(lang, Key::Members))</h2> |
crates/izlek-web/tests/http.rsmodified+77 -13
| @@ -2460,7 +2460,9 @@ async fn an_admin_sees_the_sender_and_never_a_password() { | ||
| 2460 | 2460 | let admin_cookie = admin(&app).await; |
| 2461 | 2461 | assert!(sender_saved(&app, &admin_cookie).await); |
| 2462 | 2462 | |
| 2463 | - let page = app.get("/settings", Some(&admin_cookie)).await; | |
| 2463 | + let page = app | |
| 2464 | + .get("/settings?section=outgoing", Some(&admin_cookie)) | |
| 2465 | + .await; | |
| 2464 | 2466 | assert_eq!(page.status, StatusCode::OK); |
| 2465 | 2467 | let html = String::from_utf8_lossy(&page.bytes); |
| 2466 | 2468 | assert!(html.contains("smtp.fastmail.com"), "{html}"); |
| @@ -2504,7 +2506,7 @@ async fn an_admin_sees_who_has_a_password_and_never_a_hash() { | ||
| 2504 | 2506 | .await; |
| 2505 | 2507 | assert_eq!(answer.status, StatusCode::OK, "{}", answer.body); |
| 2506 | 2508 | |
| 2507 | - let page = app.get("/settings", Some(&admin_cookie)).await; | |
| 2509 | + let page = app.get("/settings?section=members", Some(&admin_cookie)).await; | |
| 2508 | 2510 | let html = String::from_utf8_lossy(&page.bytes); |
| 2509 | 2511 | assert!(html.contains("mert@izlek.sh"), "{html}"); |
| 2510 | 2512 | assert!( |
| @@ -3901,7 +3903,7 @@ async fn an_unlisted_language_is_refused() { | ||
| 3901 | 3903 | .await; |
| 3902 | 3904 | assert_eq!( |
| 3903 | 3905 | saved.location.as_deref(), |
| 3904 | - Some("/settings?refusal=bad-language&on=save_profile") | |
| 3906 | + Some("/settings?refusal=bad-language&on=save_profile§ion=profile") | |
| 3905 | 3907 | ); |
| 3906 | 3908 | } |
| 3907 | 3909 | |
| @@ -4041,14 +4043,76 @@ async fn the_topbar_nav_marks_the_active_page() { | ||
| 4041 | 4043 | } |
| 4042 | 4044 | } |
| 4043 | 4045 | |
| 4044 | - // The settings section list keeps the panels' admin gating: a member | |
| 4045 | - // sees only the Profile anchor. | |
| 4046 | + // The settings rail keeps the panels' admin gating: a member sees only | |
| 4047 | + // the Profile link, and an admin-only section in the query still renders | |
| 4048 | + // Profile rather than the panel it asked for. | |
| 4046 | 4049 | let member = invited(&app, &admin_cookie, "deniz@izlek.sh", "Deniz", Role::Member).await; |
| 4047 | 4050 | let page = app.get("/settings", Some(&member)).await; |
| 4048 | 4051 | let html = String::from_utf8_lossy(&page.bytes); |
| 4049 | - assert!(html.contains(r##"href="#profile""##), "{html}"); | |
| 4050 | - assert!(!html.contains("href=\"#limits\""), "{html}"); | |
| 4051 | - assert!(!html.contains("href=\"#members\""), "{html}"); | |
| 4052 | + assert!(html.contains(r#"href="/settings?section=profile""#), "{html}"); | |
| 4053 | + assert!(!html.contains("href=\"/settings?section=limits\""), "{html}"); | |
| 4054 | + assert!(!html.contains("href=\"/settings?section=members\""), "{html}"); | |
| 4055 | + assert!(html.contains(r#"id="profile""#), "{html}"); | |
| 4056 | + assert!(!html.contains(r#"id="limits""#), "{html}"); | |
| 4057 | + | |
| 4058 | + let page = app | |
| 4059 | + .get("/settings?section=limits", Some(&member)) | |
| 4060 | + .await; | |
| 4061 | + let html = String::from_utf8_lossy(&page.bytes); | |
| 4062 | + assert!(html.contains(r#"id="profile""#), "{html}"); | |
| 4063 | + assert!(!html.contains(r#"id="limits""#), "{html}"); | |
| 4064 | +} | |
| 4065 | + | |
| 4066 | +/// A wrong current password lands back on the rail section it was posted | |
| 4067 | +/// from with a refusal; a right one changes nothing about the query but the | |
| 4068 | +/// refusal — `carry_refusal_on_redirect` never writes a `saved=` for a call | |
| 4069 | +/// nobody asked to see a note about. | |
| 4070 | +#[tokio::test] | |
| 4071 | +async fn a_password_change_carries_its_own_refusal_and_never_a_saved_note() { | |
| 4072 | + let app = App::open().await; | |
| 4073 | + let admin_cookie = admin(&app).await; | |
| 4074 | + | |
| 4075 | + let wrong = app | |
| 4076 | + .post_without_script( | |
| 4077 | + "/api/change_password", | |
| 4078 | + Some(&admin_cookie), | |
| 4079 | + "http://izlek.test/settings?section=profile", | |
| 4080 | + &[ | |
| 4081 | + ("current", "not the password"), | |
| 4082 | + ("new", "a whole new passphrase"), | |
| 4083 | + ], | |
| 4084 | + ) | |
| 4085 | + .await; | |
| 4086 | + assert!( | |
| 4087 | + wrong.location.as_deref().is_some_and(|location| { | |
| 4088 | + location.contains("refusal=") | |
| 4089 | + && location.contains("on=change_password") | |
| 4090 | + && location.contains("section=profile") | |
| 4091 | + }), | |
| 4092 | + "{:?}", | |
| 4093 | + wrong.location | |
| 4094 | + ); | |
| 4095 | + | |
| 4096 | + let right = app | |
| 4097 | + .post_without_script( | |
| 4098 | + "/api/change_password", | |
| 4099 | + Some(&admin_cookie), | |
| 4100 | + "http://izlek.test/settings?section=profile", | |
| 4101 | + &[ | |
| 4102 | + ("current", "correct horse battery staple"), | |
| 4103 | + ("new", "a whole new passphrase"), | |
| 4104 | + ], | |
| 4105 | + ) | |
| 4106 | + .await; | |
| 4107 | + assert_eq!(right.status, StatusCode::SEE_OTHER); | |
| 4108 | + assert!( | |
| 4109 | + right | |
| 4110 | + .location | |
| 4111 | + .as_deref() | |
| 4112 | + .is_some_and(|location| !location.contains("saved=")), | |
| 4113 | + "{:?}", | |
| 4114 | + right.location | |
| 4115 | + ); | |
| 4052 | 4116 | } |
| 4053 | 4117 | |
| 4054 | 4118 | /// Polls the store until a `Rule` send for `rule_id` addressed to `recipient` |
| @@ -4351,7 +4415,7 @@ async fn a_profile_photo_round_trips_back_as_the_same_bytes() { | ||
| 4351 | 4415 | assert_eq!(answer.status, StatusCode::SEE_OTHER); |
| 4352 | 4416 | assert_eq!( |
| 4353 | 4417 | answer.location.as_deref(), |
| 4354 | - Some("/settings?saved=profile_photo") | |
| 4418 | + Some("/settings?saved=profile_photo§ion=profile") | |
| 4355 | 4419 | ); |
| 4356 | 4420 | |
| 4357 | 4421 | let photo = app.get(&format!("/photo/{admin_id}"), Some(&admin)).await; |
| @@ -4379,7 +4443,7 @@ async fn text_uploaded_as_a_photo_is_refused_and_stores_nothing() { | ||
| 4379 | 4443 | assert_eq!(answer.status, StatusCode::SEE_OTHER); |
| 4380 | 4444 | assert_eq!( |
| 4381 | 4445 | answer.location.as_deref(), |
| 4382 | - Some("/settings?refusal=not-an-image&on=profile_photo") | |
| 4446 | + Some("/settings?refusal=not-an-image&on=profile_photo§ion=profile") | |
| 4383 | 4447 | ); |
| 4384 | 4448 | |
| 4385 | 4449 | let photo = app.get(&format!("/photo/{admin_id}"), Some(&admin)).await; |
| @@ -4439,7 +4503,7 @@ async fn a_photo_over_the_workspace_limit_is_refused_and_stores_nothing() { | ||
| 4439 | 4503 | assert_eq!(answer.status, StatusCode::SEE_OTHER); |
| 4440 | 4504 | assert_eq!( |
| 4441 | 4505 | answer.location.as_deref(), |
| 4442 | - Some("/settings?refusal=file-too-big&on=profile_photo") | |
| 4506 | + Some("/settings?refusal=file-too-big&on=profile_photo§ion=profile") | |
| 4443 | 4507 | ); |
| 4444 | 4508 | |
| 4445 | 4509 | let photo = app.get(&format!("/photo/{admin_id}"), Some(&admin)).await; |
| @@ -4465,7 +4529,7 @@ async fn a_photo_is_visible_to_other_workspace_members() { | ||
| 4465 | 4529 | .await; |
| 4466 | 4530 | assert_eq!( |
| 4467 | 4531 | answer.location.as_deref(), |
| 4468 | - Some("/settings?saved=profile_photo") | |
| 4532 | + Some("/settings?saved=profile_photo§ion=profile") | |
| 4469 | 4533 | ); |
| 4470 | 4534 | |
| 4471 | 4535 | let photo = app.get(&format!("/photo/{admin_id}"), Some(&member)).await; |
| @@ -4493,7 +4557,7 @@ async fn an_unknown_photo_id_is_not_found_and_the_photo_revalidates_by_etag() { | ||
| 4493 | 4557 | .await; |
| 4494 | 4558 | assert_eq!( |
| 4495 | 4559 | answer.location.as_deref(), |
| 4496 | - Some("/settings?saved=profile_photo") | |
| 4560 | + Some("/settings?saved=profile_photo§ion=profile") | |
| 4497 | 4561 | ); |
| 4498 | 4562 | |
| 4499 | 4563 | let stranger = app.get("/photo/does-not-exist", Some(&admin)).await; |
style/_instrument.scssmodified+15 -0
| @@ -158,6 +158,21 @@ | ||
| 158 | 158 | // ruled columns and the square avatars above. Token values — control |
| 159 | 159 | // heights, radii, shadows — already carry the rest.) |
| 160 | 160 | |
| 161 | + // --- Instrument skin: settings rail ----------------------------------------- | |
| 162 | + | |
| 163 | + .settings-sections { width: 200px; } | |
| 164 | + | |
| 165 | + .settings-section-link { | |
| 166 | + font-size: 13px; | |
| 167 | + letter-spacing: normal; | |
| 168 | + text-transform: none; | |
| 169 | + | |
| 170 | + &.active { | |
| 171 | + background: var(--row-hover); | |
| 172 | + box-shadow: inset 2px 0 0 var(--accent); | |
| 173 | + } | |
| 174 | + } | |
| 175 | + | |
| 161 | 176 | } |
| 162 | 177 | |
| 163 | 178 | // -- task detail: 560px side panel over the board ---------------------------- |
style/_ledger.scssmodified+10 -0
| @@ -420,3 +420,13 @@ | ||
| 420 | 420 | [data-ui="ledger"] .comment-composer { |
| 421 | 421 | padding: 20px 0 0; |
| 422 | 422 | } |
| 423 | + | |
| 424 | +// Settings rail: a narrower column, mono/uppercase stays, the active section | |
| 425 | +// marked with an ink rule rather than a fill. | |
| 426 | +[data-ui="ledger"] .settings-sections { | |
| 427 | + width: 170px; | |
| 428 | +} | |
| 429 | + | |
| 430 | +[data-ui="ledger"] .settings-section-link.active { | |
| 431 | + border-bottom: 2px solid var(--ink); | |
| 432 | +} |
style/main.scssmodified+23 -12
| @@ -338,6 +338,16 @@ body:has(.board-stage) { | ||
| 338 | 338 | > .board-stage { flex: 1; min-height: 0; } |
| 339 | 339 | } |
| 340 | 340 | |
| 341 | +body:has(.settings-shell) { | |
| 342 | + height: 100vh; | |
| 343 | + overflow: hidden; | |
| 344 | + display: flex; | |
| 345 | + flex-direction: column; | |
| 346 | + | |
| 347 | + > * { flex: none; } | |
| 348 | + > .settings-shell { flex: 1; min-height: 0; } | |
| 349 | +} | |
| 350 | + | |
| 341 | 351 | a { |
| 342 | 352 | color: var(--accent); |
| 343 | 353 | transition: color var(--dur-fast) var(--ease); |
| @@ -2138,18 +2148,19 @@ img.avatar { | ||
| 2138 | 2148 | |
| 2139 | 2149 | .settings-shell { |
| 2140 | 2150 | display: flex; |
| 2141 | - flex-direction: column; | |
| 2142 | - min-height: calc(100vh - var(--topbar-height)); | |
| 2143 | 2151 | } |
| 2144 | 2152 | |
| 2145 | 2153 | .settings-stage { |
| 2146 | - flex-grow: 1; | |
| 2154 | + flex: 1; | |
| 2147 | 2155 | min-width: 0; |
| 2148 | 2156 | padding: 24px 32px 40px; |
| 2149 | 2157 | display: flex; |
| 2150 | 2158 | flex-direction: column; |
| 2151 | 2159 | gap: 20px; |
| 2152 | - max-width: 900px; | |
| 2160 | + max-width: 860px; | |
| 2161 | + overflow-y: auto; | |
| 2162 | + scrollbar-width: none; | |
| 2163 | + &::-webkit-scrollbar { display: none; } | |
| 2153 | 2164 | } |
| 2154 | 2165 | |
| 2155 | 2166 | .settings-head { |
| @@ -2160,12 +2171,18 @@ img.avatar { | ||
| 2160 | 2171 | } |
| 2161 | 2172 | |
| 2162 | 2173 | .settings-sections { |
| 2174 | + flex: none; | |
| 2175 | + width: 200px; | |
| 2163 | 2176 | display: flex; |
| 2164 | - flex-wrap: wrap; | |
| 2165 | - gap: 16px; | |
| 2177 | + flex-direction: column; | |
| 2178 | + gap: 2px; | |
| 2179 | + padding: 16px 0; | |
| 2180 | + border-right: 1px solid var(--border); | |
| 2166 | 2181 | } |
| 2167 | 2182 | |
| 2168 | 2183 | .settings-section-link { |
| 2184 | + display: block; | |
| 2185 | + padding: 8px 16px; | |
| 2169 | 2186 | font-family: var(--font-mono); |
| 2170 | 2187 | font-size: 10px; |
| 2171 | 2188 | letter-spacing: 0.08em; |
| @@ -2622,12 +2639,6 @@ input[type="radio"] { | ||
| 2622 | 2639 | gap: 10px; |
| 2623 | 2640 | } |
| 2624 | 2641 | |
| 2625 | -// The logs pages reuse the rules list but bound its height. | |
| 2626 | -.rule-list-scroll { | |
| 2627 | - max-height: 360px; | |
| 2628 | - overflow-y: auto; | |
| 2629 | -} | |
| 2630 | - | |
| 2631 | 2642 | .rule-row { |
| 2632 | 2643 | display: flex; |
| 2633 | 2644 | align-items: center; |