From 370eaf94ed4eec4f815a19debe6d17a1d89b26a6 Mon Sep 17 00:00:00 2001 From: faumaray Date: Sat, 24 Oct 2026 19:44:14 +0300 Subject: [PATCH] Point the references to the controllers the split removed at their folders `servers.rs`, `chat.rs`, `streams.rs` and `settings_page.rs` of voelin-ui are `servers/`, `chat/`, `streams/` and `settings_page/` since the split (the Slint side in `bind.rs`, the decisions in voelin-ui-vm), and `adopt_server_name` is in the view model's `events`. The comments of `events.rs`, `app.rs`, `studio/bind.rs` and `dev/bind.rs`, and the add-server section of docs/ui.md, named the old files. The "before" names in the table of the `.set_` counts stay: they are the files as they were. Co-Authored-By: Claude Sonnet 5.5 --- crates/voelin-ui/src/app.rs | 2 +- crates/voelin-ui/src/dev/bind.rs | 2 +- crates/voelin-ui/src/events.rs | 2 +- crates/voelin-ui/src/studio/bind.rs | 2 +- docs/ui.md | 10 ++++++---- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/crates/voelin-ui/src/app.rs b/crates/voelin-ui/src/app.rs index 15d71e9..828d138 100644 --- a/crates/voelin-ui/src/app.rs +++ b/crates/voelin-ui/src/app.rs @@ -650,7 +650,7 @@ impl App { } else if appearance_keys().iter().any(|k| k.name() == key) { self.apply_appearance(); } else if key == voelin_core::settings::STREAM_AUDIO_SOURCES.name() { - // A running share mixes the new sources (streams.rs). + // A running share mixes the new sources (streams/bind.rs). self.share_audio_changed(); } else if key == STREAM_HARDWARE_DECODING.name() || key == STREAM_DECODER_BACKEND.name() { self.video.set_decoder_preference(decoder_preference(&self.prefs)); diff --git a/crates/voelin-ui/src/dev/bind.rs b/crates/voelin-ui/src/dev/bind.rs index 4ed5083..d5eeb77 100644 --- a/crates/voelin-ui/src/dev/bind.rs +++ b/crates/voelin-ui/src/dev/bind.rs @@ -268,7 +268,7 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running { } with_app(|app| app.studio_dev(arg)); } - // Opened once connected (settings_page.rs). + // Opened once connected (settings_page/bind.rs). "client" => {} other => eprintln!("VOELIN_OPEN: unknown screen {other:?}"), } diff --git a/crates/voelin-ui/src/events.rs b/crates/voelin-ui/src/events.rs index a87f0b5..d6e0d66 100644 --- a/crates/voelin-ui/src/events.rs +++ b/crates/voelin-ui/src/events.rs @@ -1,7 +1,7 @@ //! What a server's gateway tells besides chat: its events (the events //! page, RSVP, reminders), the stream directory and the activity feed (the //! home page), our permissions there, its configuration (gateway -//! administration). The pins, reactions and topics are in `chat.rs`. +//! administration). The pins, reactions and topics are in `chat/`. use std::sync::Arc; diff --git a/crates/voelin-ui/src/studio/bind.rs b/crates/voelin-ui/src/studio/bind.rs index 14c5cc4..0f4aceb 100644 --- a/crates/voelin-ui/src/studio/bind.rs +++ b/crates/voelin-ui/src/studio/bind.rs @@ -566,7 +566,7 @@ impl App { self.studio.models.chat.sync(&lines); } - /// A chat of session `id` changed (chat.rs): follow it if it is the + /// A chat of session `id` changed (chat/): follow it if it is the /// stream's. pub(crate) fn studio_chat_changed(&mut self, id: i64, target: &ChatTarget) { if self.studio.run.is_some() diff --git a/docs/ui.md b/docs/ui.md index 337f4aa..0d0b77f 100644 --- a/docs/ui.md +++ b/docs/ui.md @@ -529,14 +529,16 @@ with the sample studio's sources, live at once with sample viewers. ## Adding a server The add-server dialog (`BookmarkDialog` in `screens/dialogs.slint`, logic in -`servers.rs`) asks for the address (host, host:port, IP or server +`servers/`: the decisions in `voelin-ui-vm`'s `servers::logic`, the Slint side +in `servers/bind.rs`) asks for the address (host, host:port, IP or server nickname; the resolver finds the port through SRV records and TSDNS) and an optional server password. *Advanced* (open when editing) has the name and the nickname, and empty fields there are filled in: the name is the address until the first connection, then the server's own name -(`adopt_server_name`); the nickname is the default identity's (one imported -from TeamSpeak keeps its nickname there), else the system user's, else -"Voelin user"; the identity is the default one, there is no default channel. +(`adopt_server_name` in `voelin-ui-vm`'s `events`); the nickname is the +default identity's (one imported from TeamSpeak keeps its nickname there), +else the system user's, else "Voelin user"; the identity is the default one, +there is no default channel. There are no gateway or ServerQuery fields: the gateway is looked up from the address (DNS SRV records, else the gateway's `/.well-known/tsgw`) when the server is saved, selected or connected