client/common: support new login screen
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user