Files
AstralRinth/theseus_gui/src-tauri/src/main.rs
T
Wyatt Verchere b0c830119b Tag fetching and caching (#59)
* basic framework. still has errors

* added functionality for main endpoints + some structuring

* formatting

* unused code

* mimicked CLI function with wait_for process

* added basic auth bindings

* made PR changes, added playground

* cargo fmt

* removed missed println

* misc tests fixes

* cargo fmt

* added windows support

* cargo fmt

* all OS use dunce

* restructured profile slightly; fixed mac bug

* profile changes, new main.rs

* fixed requested pr + canonicaliation bug

* fixed regressed bug in ui

* fixed regressed bugs

* fixed git error

* typo

* ran prettier

* clippy

* playground clippy

* ported profile loading fix

* profile change for real, url println and clippy

* PR changes

* auth bindings + semisynch flow

* fixed dropping task error

* prettier, eslint, clippy

* removed debugging modifications

* removed unused function that eslinter missed :(

* initial errored push

* working draft

* added tag system!

* fixed merge issue

---------

Co-authored-by: Wyatt <wyatt@modrinth.com>
2023-04-03 16:08:53 -07:00

54 lines
1.8 KiB
Rust

#![cfg_attr(
all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
use theseus::prelude::*;
mod api;
// Should be called in launcher initialization
#[tauri::command]
async fn initialize_state() -> api::Result<()> {
State::get().await?;
Ok(())
}
fn main() {
tauri::Builder::default()
.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,
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,
api::tags::tags_get_category_tags,
api::tags::tags_get_donation_platform_tags,
api::tags::tags_get_game_version_tags,
api::tags::tags_get_loader_tags,
api::tags::tags_get_license_tags,
api::tags::tags_get_report_type_tags,
api::tags::tags_get_tag_bundle,
api::settings::settings_get,
api::settings::settings_set,
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}