Add mediarepo version to window title

Signed-off-by: trivernis <trivernis@protonmail.com>
pull/14/head
trivernis 3 years ago
parent 781fc55df3
commit c8d17fb2a0
Signed by: Trivernis
GPG Key ID: DFFFCC2C7A02DB45

@ -1,19 +1,22 @@
#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
use tracing_subscriber::fmt::format::FmtSpan;
use tracing_subscriber::EnvFilter;
use tracing_subscriber::fmt::format::FmtSpan;
fn main() {
tracing_subscriber::fmt::SubscriberBuilder::default()
.with_env_filter(EnvFilter::from_default_env())
.with_writer(std::io::stdout)
.with_span_events(FmtSpan::NEW | FmtSpan::CLOSE)
.compact()
.init();
mediarepo_api::tauri_plugin::register_plugin(tauri::Builder::default())
.run(tauri::generate_context!())
.expect("error while running tauri application");
tracing_subscriber::fmt::SubscriberBuilder::default()
.with_env_filter(EnvFilter::from_default_env())
.with_writer(std::io::stdout)
.with_span_events(FmtSpan::NEW | FmtSpan::CLOSE)
.compact()
.init();
mediarepo_api::tauri_plugin::register_plugin(tauri::Builder::default())
.on_page_load(|window, _| {
window.set_title(format!("mediarepo {}", env!("CARGO_PKG_VERSION")).as_str()).unwrap();
})
.run(tauri::generate_context!())
.expect("error while running tauri application");
}

Loading…
Cancel
Save