Add mediarepo version to window title
Signed-off-by: trivernis <trivernis@protonmail.com>pull/14/head
parent
781fc55df3
commit
c8d17fb2a0
@ -1,19 +1,22 @@
|
|||||||
#![cfg_attr(
|
#![cfg_attr(
|
||||||
all(not(debug_assertions), target_os = "windows"),
|
all(not(debug_assertions), target_os = "windows"),
|
||||||
windows_subsystem = "windows"
|
windows_subsystem = "windows"
|
||||||
)]
|
)]
|
||||||
|
|
||||||
use tracing_subscriber::fmt::format::FmtSpan;
|
|
||||||
use tracing_subscriber::EnvFilter;
|
use tracing_subscriber::EnvFilter;
|
||||||
|
use tracing_subscriber::fmt::format::FmtSpan;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
tracing_subscriber::fmt::SubscriberBuilder::default()
|
tracing_subscriber::fmt::SubscriberBuilder::default()
|
||||||
.with_env_filter(EnvFilter::from_default_env())
|
.with_env_filter(EnvFilter::from_default_env())
|
||||||
.with_writer(std::io::stdout)
|
.with_writer(std::io::stdout)
|
||||||
.with_span_events(FmtSpan::NEW | FmtSpan::CLOSE)
|
.with_span_events(FmtSpan::NEW | FmtSpan::CLOSE)
|
||||||
.compact()
|
.compact()
|
||||||
.init();
|
.init();
|
||||||
mediarepo_api::tauri_plugin::register_plugin(tauri::Builder::default())
|
mediarepo_api::tauri_plugin::register_plugin(tauri::Builder::default())
|
||||||
.run(tauri::generate_context!())
|
.on_page_load(|window, _| {
|
||||||
.expect("error while running tauri application");
|
window.set_title(format!("mediarepo {}", env!("CARGO_PKG_VERSION")).as_str()).unwrap();
|
||||||
|
})
|
||||||
|
.run(tauri::generate_context!())
|
||||||
|
.expect("error while running tauri application");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue