voelin-gpui: the voice channel page and its call bar
Slice 3 of plan section 6 step 3, first part. VoicePage is a cached pane of its own, a sibling of the server page that MainView puts in the main area while the page is asked for (show_voice_view, through voelin-ui-vm's logic) and voice is connected, as the Slint VoiceView is. It shows the channel (name, topic, banner under the surface veil, "N in voice / limit total"), the people of our channel as TreeView::members gives them through the tree model's Voice event (the ring that is green while they talk and blue while they stream, the bars or the microphone and sound marks in the corner, the crown, "Speaking", "Streaming", "Away"; a click opens the card), and the call bar: mute, deafen, Share and the voice settings (both logged until their slices), Leave. The smaller stage, one row of small avatars, is ui.voice_compact and always in a window under 800 pixels tall, which MainView pushes into the pane (a cached pane does not see a resize); VOELIN_OPEN=voice[:compact] asks for it, the sample servers keep nothing. The server page gets a Voice channel button for the way in, and the meter counts the page's renders. Tests on the test platform: the page takes the main area and gives it back, the people and their marks, talking and mute events redraw the page once and the rail, top bar and main area not at all (one model build for three lists), Leave reaches the engine, the call bar's buttons, the stage kept in the settings and forced short, the banner. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
3fb5de8f32
commit
ba4fe3c8ca
10 files changed
+1242
-47
No files matched your search
@@ -14,7 +14,7 @@ use gpui_kit::{
|
||||
use voelin_ui_vm::bridge::ServerItem;
|
||||
use voelin_ui_vm::servers::logic;
|
||||
|
||||
use super::actions::{AddServer, ConnectVoice, DisconnectVoice, EditServer};
|
||||
use super::actions::{AddServer, ConnectVoice, DisconnectVoice, EditServer, ShowVoiceView};
|
||||
use super::widgets::{Avatar, Presence, icon, panel, tagged};
|
||||
use crate::app::AppState;
|
||||
use crate::meter::Counters;
|
||||
@@ -173,7 +173,7 @@ impl Render for MainPanel {
|
||||
.text_center()
|
||||
.text_size(px(m.font_body))
|
||||
.text_color(hsla(c.text_muted))
|
||||
.child("Its chat and its voice page come with the next slices."),
|
||||
.child("Its chat comes with a later slice."),
|
||||
)
|
||||
.child(
|
||||
div()
|
||||
@@ -202,6 +202,20 @@ impl Render for MainPanel {
|
||||
}),
|
||||
))
|
||||
})
|
||||
.when(connected, |row| {
|
||||
row.child(tagged(
|
||||
"main-voice",
|
||||
Button::new("main-voice")
|
||||
.primary()
|
||||
.label("Voice channel")
|
||||
.on_click(|_, window, cx| {
|
||||
window.dispatch_action(
|
||||
Box::new(ShowVoiceView { on: true }),
|
||||
cx,
|
||||
);
|
||||
}),
|
||||
))
|
||||
})
|
||||
.child(tagged(
|
||||
"main-edit",
|
||||
Button::new("main-edit").label("Edit").on_click(
|
||||
|
||||
Reference in new issue
Block a user