From a84b9de5e1d0b288a30daf7dacfdee55cf25da35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Fri, 11 Sep 2026 06:55:47 +0300 Subject: [PATCH] =?UTF-8?q?in-web:=20tab=20titles=20in=20the=20family=20'P?= =?UTF-8?q?age=20=C2=B7=20in'=20form=20(im=20parity)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/in-web/src/layout.rs | 9 +++++++-- crates/in-web/src/share.rs | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/crates/in-web/src/layout.rs b/crates/in-web/src/layout.rs index 8457719..a5350ed 100644 --- a/crates/in-web/src/layout.rs +++ b/crates/in-web/src/layout.rs @@ -1128,8 +1128,9 @@ const STYLE: Asset = asset!("assets/main.css"); pub(crate) async fn document_shell<'a>( cx: &'a Cx, slot: topcoat::view::Child<'a>, - title: &'a str, + title: impl Into, ) -> Result { + let title = title.into(); // The per-user chrome knobs, read off the request's own user: the theme // into `data-theme`, the interface into `data-ui`, the language into // ``. Signed-out (or unreadable) wears the provision defaults — @@ -1214,6 +1215,10 @@ fn title_key_of(path: &str) -> Option { #[layout("/")] async fn root_layout(cx: &Cx, slot: topcoat::view::Child<'_>) -> Result { let lang = crate::i18n::lang(cx).await; - let title = title_key_of(uri(cx).path()).map_or("in", |key| t(lang, key)); + let title = match title_key_of(uri(cx).path()) { + None => "in".to_string(), + Some(Key::WelcomeTitle) => t(lang, Key::WelcomeTitle).to_string(), + Some(key) => format!("{} · in", t(lang, key)), + }; document_shell(cx, slot, title).await } diff --git a/crates/in-web/src/share.rs b/crates/in-web/src/share.rs index 99b2478..20e4c62 100644 --- a/crates/in-web/src/share.rs +++ b/crates/in-web/src/share.rs @@ -685,6 +685,7 @@ async fn public_page( title: &str, page: impl View, ) -> Result { + let title = format!("{title} · in"); document_shell(cx, topcoat::view::Child::new(page), title) .await? .first()