2022-02-21 21:01:45 -08:00
|
|
|
#![cfg_attr(
|
2022-03-28 18:41:35 -07:00
|
|
|
all(not(debug_assertions), target_os = "windows"),
|
|
|
|
|
windows_subsystem = "windows"
|
2022-02-21 21:01:45 -08:00
|
|
|
)]
|
|
|
|
|
|
2023-03-31 11:00:43 -07:00
|
|
|
use theseus::prelude::*;
|
|
|
|
|
|
|
|
|
|
mod api;
|
|
|
|
|
|
|
|
|
|
// Should be called in launcher initialization
|
|
|
|
|
#[tauri::command]
|
|
|
|
|
async fn initialize_state() -> api::Result<()> {
|
|
|
|
|
State::get().await?;
|
|
|
|
|
Ok(())
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-21 21:01:45 -08:00
|
|
|
fn main() {
|
2022-03-28 18:41:35 -07:00
|
|
|
tauri::Builder::default()
|
2023-03-31 11:00:43 -07:00
|
|
|
.invoke_handler(tauri::generate_handler![
|
|
|
|
|
initialize_state,
|
|
|
|
|
api::profile_create::profile_create_empty,
|
|
|
|
|
api::profile_create::profile_create,
|
|
|
|
|
api::profile::profile_add,
|
|
|
|
|
api::profile::profile_add_path,
|
|
|
|
|
api::profile::profile_remove,
|
|
|
|
|
api::profile::profile_get,
|
|
|
|
|
api::profile::profile_is_managed,
|
|
|
|
|
api::profile::profile_is_loaded,
|
|
|
|
|
api::profile::profile_list,
|
|
|
|
|
api::profile::profile_run,
|
|
|
|
|
api::profile::profile_run_wait,
|
2023-03-31 18:44:26 -07:00
|
|
|
api::profile::profile_kill,
|
|
|
|
|
api::profile::profile_wait_for,
|
|
|
|
|
api::auth::auth_authenticate_begin_flow,
|
|
|
|
|
api::auth::auth_authenticate_await_completion,
|
|
|
|
|
api::auth::auth_refresh,
|
|
|
|
|
api::auth::auth_remove_user,
|
|
|
|
|
api::auth::auth_has_user,
|
|
|
|
|
api::auth::auth_users,
|
|
|
|
|
api::auth::auth_get_user,
|
2023-04-03 13:46:04 -07:00
|
|
|
api::settings::settings_get,
|
|
|
|
|
api::settings::settings_set,
|
2023-03-31 11:00:43 -07:00
|
|
|
])
|
2023-02-27 09:11:34 -07:00
|
|
|
.run(tauri::generate_context!())
|
2022-03-28 18:41:35 -07:00
|
|
|
.expect("error while running tauri application");
|
|
|
|
|
}
|