Refactor state system #7
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user