ui: TeamSpeak links open the server dialog, or move you in voice
Links to ts3server://, teamspeak:// and tmspk.gg in chat were only copied. voelin_model::Link reads them, and invite_link now writes through ServerLink::to_url, so a copied invite reads back the same (a '/' in a channel's name stays %2F in the link, \/ in the path). App::open_link (links.rs) finds the saved server with that address (vm::servers::same_address; of several, the one in voice, else the one shown: link_server). In voice on it, it moves into the link's channel (channel_by_path) through join_channel, so a locked channel asks for its password when the link's is missing or wrong. Otherwise the server dialog opens filled in by link_form, over the saved server's form when there is one: its nickname stays. Nothing connects before Connect. Invite codes need a TeamSpeak service; a toast says so. VOELIN_OPEN=link:<url> goes through inbox::Request::OpenLink, where the platform's links will come in. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
1 parent
7965187d2c
commit
65ff5f6693
15 files changed
+843
-96
No files matched your search
@@ -34,7 +34,9 @@
|
||||
//! the "New" divider, scrolled up to; `unread:end` ten messages before,
|
||||
//! at the list's end, under the bar that counts the new messages),
|
||||
//! `link-confirm[:<url>]` (the question before a masked link opens, by
|
||||
//! default the sample's raid board), `watch` (the first stream; with
|
||||
//! default the sample's raid board), `link:<url>` (a TeamSpeak link
|
||||
//! opened: the server dialog filled in from it, or in voice on its
|
||||
//! server a move into its channel), `watch` (the first stream; with
|
||||
//! sample data the local test pattern in its place), `popout` (the same,
|
||||
//! popped out),
|
||||
//! `tab:<home|servers|chat|activity|you>` (phone layout); `friends[:<uid>]`,
|
||||
@@ -307,6 +309,8 @@ pub(crate) fn start(ui: &MainWindow, switches: &Switches) -> Running {
|
||||
let url = if arg.is_empty() { DEMO_RAID_BOARD } else { arg };
|
||||
with_app(|app| app.open_link_text(url, true));
|
||||
}
|
||||
// As a link from the platform comes.
|
||||
"link" => crate::inbox::request(crate::inbox::Request::OpenLink(arg.to_owned())),
|
||||
"watch" | "popout" => {
|
||||
with_app(|app| {
|
||||
if switches.demo_ui { app.demo_watch() } else { app.watch_first_stream() }
|
||||
|
||||
Reference in new issue
Block a user