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 crate::effects::{AudioProcessor, AudioProcessorSender, TransmitState};
|
||||
use color_eyre::eyre::{bail, eyre, Error};
|
||||
use crossbeam::atomic::AtomicCell;
|
||||
@@ -108,13 +108,19 @@ impl super::PlatformInterface for WebPlatform {
|
||||
}
|
||||
|
||||
async fn network_connect(
|
||||
address: String,
|
||||
target: ConnectTarget,
|
||||
username: String,
|
||||
event_rx: &mut UnboundedReceiver<Command>,
|
||||
overrides: &ProxyOverrides,
|
||||
state: SharedState,
|
||||
) -> Result<(), Error> {
|
||||
network_connect(address, username, event_rx, overrides, state).await
|
||||
let url = match target {
|
||||
ConnectTarget::Proxy(url) => url,
|
||||
ConnectTarget::Direct { .. } => {
|
||||
bail!("web platform requires a proxy URL, not a direct host:port")
|
||||
}
|
||||
};
|
||||
network_connect(url, username, event_rx, overrides, state).await
|
||||
}
|
||||
|
||||
async fn get_status(
|
||||
|
||||
Reference in New Issue
Block a user