feat: add first version of TougliGui with same features as on google sheet

This commit is contained in:
2026-04-21 22:02:20 +02:00
parent 79d5c4baaa
commit f571d8bb3f
53 changed files with 12416 additions and 0 deletions

37
src-tauri/src/lib.rs Normal file
View File

@ -0,0 +1,37 @@
mod db;
mod parser;
mod commands;
use commands::DbState;
use std::sync::Mutex;
use tauri::Manager;
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_opener::init())
.setup(|app| {
let conn = db::open().expect("Failed to open database");
db::migrate(&conn).expect("Failed to migrate database");
app.manage(DbState(Mutex::new(conn)));
Ok(())
})
.invoke_handler(tauri::generate_handler![
commands::get_profiles,
commands::create_profile,
commands::delete_profile,
commands::get_completed_quests,
commands::toggle_quest,
commands::get_guides_list,
commands::get_guide,
commands::sync_guides,
commands::get_tabs_list,
commands::sync_single_guide,
commands::has_guides,
commands::get_setting,
commands::set_setting,
commands::set_always_on_top,
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}