Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 25ec34d7e7 | |||
| bc20cf825d |
@@ -9,3 +9,5 @@ pub use imp::*;
|
||||
pub use mainloop::*;
|
||||
pub use mime_guess;
|
||||
pub use reqwest;
|
||||
|
||||
pub const VERSION: Option<&str> = option_env!("MUMBLE_WEB2_VERSION");
|
||||
|
||||
+3
-4
@@ -25,12 +25,11 @@ pub struct ServerStatus {
|
||||
#[cfg(feature = "networking")]
|
||||
pub async fn ping_server(address: &str, port: u16) -> color_eyre::Result<ServerStatus> {
|
||||
use color_eyre::eyre::{bail, eyre};
|
||||
use std::net::ToSocketAddrs;
|
||||
use std::time::Duration;
|
||||
use tokio::net::UdpSocket;
|
||||
use tokio::net::{lookup_host, UdpSocket};
|
||||
|
||||
let dest = format!("{}:{}", address, port)
|
||||
.to_socket_addrs()?
|
||||
let dest = lookup_host(format!("{}:{}", address, port))
|
||||
.await?
|
||||
.next()
|
||||
.ok_or_else(|| eyre!("could not resolve address"))?;
|
||||
|
||||
|
||||
+2
-3
@@ -4,7 +4,7 @@ use dioxus::prelude::*;
|
||||
use mumble_web2_client::{
|
||||
network_entrypoint, reqwest, AudioSettings, ChannelId, Command, ConfigSystem,
|
||||
ConfigSystemInterface as _, ConnectionState, Platform, PlatformInterface as _, ServerState,
|
||||
SharedState, State, UserId, UserState,
|
||||
SharedState, State, UserId, UserState, VERSION,
|
||||
};
|
||||
use mumble_web2_common::{ProxyOverrides, ServerStatus};
|
||||
use std::collections::{HashMap, HashSet};
|
||||
@@ -575,13 +575,12 @@ pub fn LoginView(overrides: Resource<ProxyOverrides>) -> Element {
|
||||
),
|
||||
Connected => unreachable!(),
|
||||
};
|
||||
let version = option_env!("MUMBLE_WEB2_VERSION");
|
||||
rsx!(
|
||||
div {
|
||||
class: "login",
|
||||
h1 {
|
||||
"Mumble Web"
|
||||
match version {
|
||||
match VERSION {
|
||||
Some(v) => rsx!(" " span { class: "login_version", "({v})" }),
|
||||
None => rsx!(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user