Files
dashboard/src/main.rs
2026-08-06 21:25:19 +02:00

27 lines
637 B
Rust

use std::{thread::sleep, time::Duration};
mod rgba;
#[cfg(not(feature = "dev"))]
mod trekstor;
slint::include_modules!();
fn main() -> Result<(), slint::PlatformError> {
#[cfg(not(feature = "dev"))]
slint::platform::set_platform(Box::new(crate::trekstor::Trekstor::new()))
.expect("set platform");
let main_window = MainWindow::new()?;
let weak_window = main_window.as_weak();
slint::spawn_local(async move {
sleep(Duration::from_secs(5));
weak_window.upgrade_in_event_loop(move |ui| {
ui.set_text("GoodBye!".into());
})
})
.unwrap();
main_window.run()
}