voelin-gpui: the members panel and the member card, the sample server's pictures and a talker

Slice 2, second half. The right panel of a server on screen (as wide as
ui.members_width) is everyone on the server in sections from voelin-ui-vm's
rows (server_members: those streaming first, then each server group), with
"Members - N", a search (search_members), and per person the avatar with its
presence dot and speaking ring, the name with the admin, priority, commander
and recording marks and their myTeamSpeak badges, what they do, the role,
LIVE, the mute marks and the hand of a person who needs talk power. It is a
cached pane over a virtual list that applies the model's row operations, and
the pane a talker redraws: nothing else of the window is told.

A click on a person opens their card over the panel (tree::member_card:
name, status, description, groups, badges, talk power, country) with a scrim
a click outside closes; it follows the person while open and goes when they
leave. Its buttons (volume, message, poke, friends, block) are the slices
of those dialogs.

Development: VOELIN_DEMO_UI now also delivers the first sample server's
avatars, icons, banners and badges as files of a folder of the state's own
(removed with it), and VOELIN_DEMO_TALK=10 makes a sample person start and
stop talking that many times a second through the app's events: what the
meter measures while someone talks.

Tests: the sections and the search, a talker redraws the members panel and
no other pane, the card (open, follows, closes three ways, goes with the
person), an avatar written again shows under a new key and the old copy goes
from the asset cache, the sample pictures and the talker.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
faumarayandClaude Sonnet 5.5 committed 2026-10-28 00:03:39 +03:00
1 parent b1f673fce3
commit 26302bcdde
8 files changed
+1020 -7

No files matched your search

+16
View File
@@ -9,6 +9,9 @@
//! skipped.
//! - `VOELIN_DEMO_UI=1`: the Slint front end's sample servers, shown through
//! the app's own events; nothing is sent to the engine or kept in the store.
//! - `VOELIN_DEMO_TALK=10`: with `VOELIN_DEMO_UI`, one of the sample people
//! starts and stops talking this many times a second, through the app's own
//! events (what the meter measures while someone talks).
//! - `VOELIN_DEV_THEME=dark|light|system`: the theme mode, in place of the
//! one the settings give (`ui.theme`).
//! - `VOELIN_FONT_SCALE=1.25`: the text size factor, in place of the
@@ -36,6 +39,9 @@ pub struct Switches {
pub open: Page,
/// Show the sample servers instead of the stored ones.
pub demo_ui: bool,
/// How many times a second a sample person starts or stops talking (with
/// the sample servers), when the switch names a rate.
pub demo_talk: Option<f32>,
/// The theme mode, when the switch names one.
pub theme: Option<Choice>,
/// The text size factor, when the switch names one.
@@ -51,6 +57,7 @@ impl Default for Switches {
Self {
open: Page::Shell,
demo_ui: false,
demo_talk: None,
theme: None,
font_scale: None,
window: None,
@@ -97,6 +104,12 @@ impl Switches {
None => tracing::warn!("VOELIN_WINDOW_SIZE={text}: WIDTHxHEIGHT, such as 1440x960"),
}
}
if let Some(text) = get("VOELIN_DEMO_TALK") {
match text.trim().parse::<f32>() {
Ok(rate) if (0.1..=100.0).contains(&rate) => switches.demo_talk = Some(rate),
_ => tracing::warn!("VOELIN_DEMO_TALK={text}: a rate from 0.1 to 100 a second"),
}
}
let flag = |name: &str| get(name).is_some_and(|v| !matches!(v.trim(), "" | "0"));
switches.demo_ui = flag("VOELIN_DEMO_UI");
switches.meter = flag("VOELIN_METER");
@@ -133,6 +146,7 @@ mod tests {
let s = env(&[
("VOELIN_OPEN", "swatch"),
("VOELIN_DEMO_UI", "1"),
("VOELIN_DEMO_TALK", "10"),
("VOELIN_DEV_THEME", "light"),
("VOELIN_FONT_SCALE", "1.25"),
("VOELIN_WINDOW_SIZE", "1440x960"),
@@ -140,6 +154,7 @@ mod tests {
]);
assert_eq!(s.open, Page::Swatch);
assert!(s.demo_ui);
assert_eq!(s.demo_talk, Some(10.0));
assert_eq!(s.theme, Some(Choice::Light));
assert_eq!(s.font_scale, Some(1.25));
assert_eq!(s.window, Some((1440.0, 960.0)));
@@ -154,6 +169,7 @@ mod tests {
("VOELIN_FONT_SCALE", "9"),
("VOELIN_WINDOW_SIZE", "10x10"),
("VOELIN_DEMO_UI", "0"),
("VOELIN_DEMO_TALK", "fast"),
("VOELIN_METER", "0"),
]);
assert_eq!(s, Switches::default());