From ff7ef96b756bb34662bb99b121ea5cc3a69e98d3 Mon Sep 17 00:00:00 2001 From: selikhov Date: Tue, 29 Sep 2026 18:38:04 +0300 Subject: [PATCH] voelin-ui: the server screens of the new design The server page had one layout: a channel tree, a chat and a panel of members and streams. The design asks for more of it at once, so the same page now carries the pieces it was missing. The chat shows reactions, a pin marker, file cards and older messages, and every message can be reacted to, pinned or made into a topic where the gateway offers it. A compact voice bar sits over it with the connected channel, who is talking and the voice controls, so the sidebar card is no longer the only way to leave or mute. The members panel groups people by server group with the group's icon, shows the badges and talk power a TeamSpeak client expects, and opens a card with the person's description, groups, private chat, poke, contact and volume. Its width is the setting `ui.members_width`, so dragging the handle keeps it. Pins and topics are drawers over the chat, the voice channel can be seen as a grid of tiles with the streams in it, and the stream viewer gained the elapsed time, the viewer count, a quality picker, a mute button, the chat beside the player and a pop-out that hides the shell. The quality picker stays hidden for now: the engine tells a viewer neither which simulcast layers a streamer offers nor lets it ask for one, so there is nothing to choose between. Co-Authored-By: Claude Opus 5 --- crates/voelin-ui/src/app.rs | 4 + crates/voelin-ui/src/appearance.rs | 21 +- crates/voelin-ui/src/bind/emoji.rs | 4 +- crates/voelin-ui/src/bind/settings.rs | 3 + crates/voelin-ui/src/bind/streams.rs | 3 + crates/voelin-ui/src/emoji.rs | 2 +- crates/voelin-ui/src/settings.rs | 13 +- crates/voelin-ui/src/streams.rs | 85 +++- crates/voelin-ui/ui/app.slint | 59 ++- crates/voelin-ui/ui/bridge.slint | 4 + crates/voelin-ui/ui/nav.slint | 35 ++ crates/voelin-ui/ui/screens/chat.slint | 590 +++++++++++++++++++--- crates/voelin-ui/ui/screens/drawers.slint | 290 +++++++++++ crates/voelin-ui/ui/screens/members.slint | 571 +++++++++++++++++++++ crates/voelin-ui/ui/screens/streams.slint | 295 +++++++---- 15 files changed, 1795 insertions(+), 184 deletions(-) create mode 100644 crates/voelin-ui/ui/screens/drawers.slint create mode 100644 crates/voelin-ui/ui/screens/members.slint diff --git a/crates/voelin-ui/src/app.rs b/crates/voelin-ui/src/app.rs index ea2591c..7d2456b 100644 --- a/crates/voelin-ui/src/app.rs +++ b/crates/voelin-ui/src/app.rs @@ -288,6 +288,8 @@ pub(crate) struct Models { pub pins: Rc>, pub topics: Rc>, pub topic_messages: Rc>, + /// The quality choices of the watched stream. + pub qualities: Rc>, /// Shown when there is no chat. pub no_chat: Rc>, } @@ -304,6 +306,7 @@ impl Models { pins: Rc::default(), topics: Rc::default(), topic_messages: Rc::default(), + qualities: Rc::default(), no_chat: Rc::default(), }; bridge.set_servers(ModelRc::from(models.servers.clone())); @@ -315,6 +318,7 @@ impl Models { bridge.set_pins(ModelRc::from(models.pins.clone())); bridge.set_topics(ModelRc::from(models.topics.clone())); bridge.set_topic_messages(ModelRc::from(models.topic_messages.clone())); + bridge.set_viewer_qualities(ModelRc::from(models.qualities.clone())); bridge.set_messages(ModelRc::from(models.no_chat.clone())); models } diff --git a/crates/voelin-ui/src/appearance.rs b/crates/voelin-ui/src/appearance.rs index 8f82162..ca53583 100644 --- a/crates/voelin-ui/src/appearance.rs +++ b/crates/voelin-ui/src/appearance.rs @@ -8,7 +8,7 @@ use tracing::warn; use crate::app::{App, AppearanceForm, Bridge, Nav, Theme}; use crate::images; use crate::settings::{ - ThemeChoice, UI_FONT_SCALE, UI_IMAGE_CACHE_MB, UI_NARROW_BREAKPOINT, UI_THEME, + ThemeChoice, UI_FONT_SCALE, UI_IMAGE_CACHE_MB, UI_MEMBERS_WIDTH, UI_NARROW_BREAKPOINT, UI_THEME, }; impl App { @@ -23,7 +23,12 @@ impl App { let t = ui.global::(); t.set_mode(theme.as_str().into()); t.set_font_scale(scale); - ui.global::