I've been trying the splash screen feature and for some reason there might be a bug or eathier do something wrong
And I recorded some video
Idk why but insteatd of showing a circle loader animation it shows the contents of the main page even though I picked the loader page in tauri.conf.json
code
tauri.conf.json
"windows":
[
{
"fullscreen": false,
"resizable": true,
"title": "green-house-controler",
"width": 800,
"height": 600,
"visible": false
},
{
"width": 400,
"height": 200,
"decorations": false,
"url": "../src/splashLoad.html",
"label": "loading"
}
]
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use tauri::Manager;
fn main() {
tauri::Builder::default()
.setup(|app| {
let splashscreen_window = app.get_window("loading").unwrap();
let main_window = app.get_window("main").unwrap();
// we perform the initialization code on a new task so the app doesn't freeze
tauri::async_runtime::spawn(async move {
// initialize your app here instead of sleeping :)
println!("Initializing...");
std::thread::sleep(std::time::Duration::from_secs(2));
println!("Done initializing.");
// After it's done, close the splashscreen and display the main window
splashscreen_window.close().unwrap();
main_window.show().unwrap();
});
Ok(())
})
.run(tauri::generate_context!())
.expect("failed to run app");
}
and the loader page has a svg animated circle loader