| |
| |
| |
|
|
| #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] |
|
|
| use tauri::{AppHandle, Manager}; |
|
|
| #[tauri::command] |
| fn close_splashscreen(app: AppHandle) { |
| |
| app |
| .get_webview_window("splashscreen") |
| .unwrap() |
| .close() |
| .unwrap(); |
| |
| app.get_webview_window("main").unwrap().show().unwrap(); |
| } |
|
|
| fn main() { |
| tauri::Builder::default() |
| .menu(tauri::menu::Menu::default) |
| .invoke_handler(tauri::generate_handler![close_splashscreen]) |
| .run(tauri::generate_context!( |
| "../../examples/splashscreen/tauri.conf.json" |
| )) |
| .expect("error while running tauri application"); |
| } |
|
|