Refactor state system #7

This commit is contained in:
2026-04-04 22:04:53 +02:00
parent faf3e4ffef
commit 02454625d6
5 changed files with 112 additions and 58 deletions
+9 -8
View File
@@ -1,21 +1,22 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!!
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
use saturn_launcher_lib::{commands::*, AppState};
use std::sync::Mutex;
use saturn_launcher_lib::load_state;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_opener::init())
.manage(Mutex::new(AppState::default()))
.manage(load_state())
.invoke_handler(tauri::generate_handler![
// Saturn Launcher Commands
get_installed_mods,
toggle_mod,
install_mod,
get_settings,
update_settings,
saturn_launcher_lib::commands::get_installed_mods,
saturn_launcher_lib::commands::toggle_mod,
saturn_launcher_lib::commands::install_mod,
saturn_launcher_lib::commands::get_settings,
saturn_launcher_lib::commands::update_settings,
saturn_launcher_lib::commands::get_version,
saturn_launcher_lib::commands::update_version,
// Launcher Commands
saturn_launcher_lib::launcher::launch_game,
// Auth Commands