client/common: support new login screen

This commit is contained in:
2026-05-05 05:39:45 +00:00
committed by Sam Sartor
parent 25ec34d7e7
commit c678de4921
10 changed files with 65 additions and 30 deletions
+8 -4
View File
@@ -1,4 +1,4 @@
use crate::app::{Command, SharedState};
use crate::app::{Command, ConnectTarget, SharedState};
use color_eyre::eyre::Error;
use futures_channel::mpsc::UnboundedReceiver;
use mumble_web2_common::{ProxyOverrides, ServerStatus};
@@ -20,20 +20,24 @@ impl super::PlatformInterface for MobilePlatform {
}
async fn network_connect(
address: String,
target: ConnectTarget,
username: String,
event_rx: &mut UnboundedReceiver<Command>,
overrides: &ProxyOverrides,
state: SharedState,
) -> Result<(), Error> {
super::connect::network_connect(address, username, event_rx, overrides, state).await
super::connect::network_connect(target, username, event_rx, overrides, state).await
}
async fn get_status(
_client: &reqwest::Client,
address: &str,
) -> color_eyre::Result<ServerStatus> {
mumble_web2_common::ping_server(address, 64738).await
let (host, port) = match address.rsplit_once(':') {
Some((h, p)) => (h, p.parse().unwrap_or(64738)),
None => (address, 64738),
};
mumble_web2_common::ping_server(host, port).await
}
fn init_logging() {