From bc20cf825da48a81ccc79a2dda187e752c62f750 Mon Sep 17 00:00:00 2001 From: Sam Sartor Date: Tue, 5 May 2026 05:30:18 +0000 Subject: [PATCH] fix version reporting after refactor (#34) Reviewed-on: https://git.ohea.xyz/mumble/mumble-web2/pulls/34 Reviewed-by: restitux Co-authored-by: Sam Sartor Co-committed-by: Sam Sartor --- client/src/lib.rs | 2 ++ gui/src/main.rs | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 59c8226..329a138 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -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"); diff --git a/gui/src/main.rs b/gui/src/main.rs index ecdccd4..f246ad2 100644 --- a/gui/src/main.rs +++ b/gui/src/main.rs @@ -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) -> 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!(), }