gui: new login screen
This commit is contained in:
@@ -37,7 +37,11 @@ impl super::PlatformInterface for DesktopPlatform {
|
||||
_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() {
|
||||
|
||||
@@ -33,7 +33,11 @@ impl super::PlatformInterface for MobilePlatform {
|
||||
_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() {
|
||||
|
||||
@@ -28,12 +28,8 @@ impl super::ConfigSystemInterface for NativeConfigSystem {
|
||||
match serde_json::from_value::<T>(value_untyped) {
|
||||
Ok(v) => Some(v),
|
||||
Err(_) => {
|
||||
let default_value = config_get_default(key)
|
||||
.expect("Default value required after config parse failure");
|
||||
Some(
|
||||
serde_json::from_value::<T>(default_value)
|
||||
.expect("Default value could not be parsed"),
|
||||
)
|
||||
let default_value = config_get_default(key)?;
|
||||
serde_json::from_value::<T>(default_value).ok()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user