diff --git a/crates/voelin-ui/src/chat.rs b/crates/voelin-ui/src/chat.rs index 4040b99..7b59bd2 100644 --- a/crates/voelin-ui/src/chat.rs +++ b/crates/voelin-ui/src/chat.rs @@ -67,7 +67,7 @@ impl App { format!("#{}", name.unwrap_or_else(|| cid.to_string())) } ChatTarget::Server => "Server".into(), - ChatTarget::Private(uid) => format!("@{uid}"), + ChatTarget::Private(uid) => format!("@{}", self.peer_name(uid, None)), }; let view = self.sessions.entry(id).or_default(); let index = match view.tabs.iter().position(|t| t.target == target) { @@ -186,9 +186,20 @@ impl App { complete: bool, ) { let current = self.current == Some(id); + // A private chat is named after the peer, whoever wrote first. + let peer = match target { + ChatTarget::Private(uid) => Some(format!( + "@{}", + self.peer_name( + uid, + messages.iter().find(|m| m.message.author_uid.as_deref() == Some(uid.as_str())) + ) + )), + _ => None, + }; let view = self.sessions.entry(id).or_default(); let author = messages.first().map_or("", |m| m.message.author_name.as_str()); - let title = Self::tab_title(view, target, author); + let title = peer.unwrap_or_else(|| Self::tab_title(view, target, author)); let index = Self::tab_for(view, target, || title); let shown = current && view.current_tab == index; let tab = &mut view.tabs[index]; diff --git a/crates/voelin-ui/src/home.rs b/crates/voelin-ui/src/home.rs index 66377ec..cb39da8 100644 --- a/crates/voelin-ui/src/home.rs +++ b/crates/voelin-ui/src/home.rs @@ -253,6 +253,13 @@ impl App { /// List the recordings and clips (when the Library opens). pub(crate) fn load_library(&mut self) { + // Sample data shows sample recordings, not the user's. + if self.demo_ui { + if let Some(ui) = self.ui.upgrade() { + ui.global::().set_recordings_dir("~/Videos/Voelin".into()); + } + return; + } let dir = self.recordings_dir(); let items = recordings_in(&dir); vm::list::sync(&self.models.social.recordings, &items); diff --git a/crates/voelin-ui/ui/screens/events.slint b/crates/voelin-ui/ui/screens/events.slint index 98f1c75..bacff99 100644 --- a/crates/voelin-ui/ui/screens/events.slint +++ b/crates/voelin-ui/ui/screens/events.slint @@ -359,6 +359,7 @@ export component EventDialog inherits Modal { VerticalLayout { spacing: Theme.space-4; padding-right: Theme.space-3; + alignment: start; Field { label: @tr("Title"); TextField { text <=> form.title; placeholder: @tr("Raid night"); label: @tr("Title"); } @@ -376,6 +377,7 @@ export component EventDialog inherits Modal { } Field { label: @tr("Ends (optional)"); + hint: @tr("Empty: no end"); TextField { text <=> form.end; placeholder: "2026-10-04 21:00"; icon: Icons.clock; label: @tr("Ends"); } } } diff --git a/crates/voelin-ui/ui/screens/friends.slint b/crates/voelin-ui/ui/screens/friends.slint index b05be63..af7db7c 100644 --- a/crates/voelin-ui/ui/screens/friends.slint +++ b/crates/voelin-ui/ui/screens/friends.slint @@ -133,7 +133,8 @@ export component FriendsPage inherits VerticalLayout { in property compact; padding: compact ? Theme.space-4 : Theme.space-6; spacing: Theme.space-4; - HorizontalLayout { + // The phone's top bar names the page. + if !root.compact: HorizontalLayout { spacing: Theme.space-4; if !root.compact: Icon { source: Icons.users;