Threads Scryfall's per-format legalities through the reference db and adds a deck-page indicator (structural rules + banned/restricted lists) that lists violation reasons inline. Decks and selected library cards can now be exported to/imported from plain-text decklists, with best-effort name resolution and a report of anything that didn't match. Also adds a shuffle- and-draw sample hand modal, and an Alt+/ command palette for jumping to a tab, deck, or card without leaving the keyboard. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
53 lines
1.6 KiB
Rust
53 lines
1.6 KiB
Rust
mod commands;
|
|
mod state;
|
|
|
|
use std::sync::Mutex;
|
|
|
|
use tauri::Manager;
|
|
|
|
use state::AppState;
|
|
|
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
|
pub fn run() {
|
|
tauri::Builder::default()
|
|
.plugin(tauri_plugin_dialog::init())
|
|
.setup(|app| {
|
|
let data_dir = app
|
|
.path()
|
|
.app_data_dir()
|
|
.expect("resolve app data dir");
|
|
std::fs::create_dir_all(&data_dir).ok();
|
|
app.manage(Mutex::new(AppState::new(data_dir)));
|
|
Ok(())
|
|
})
|
|
.invoke_handler(tauri::generate_handler![
|
|
commands::get_status,
|
|
commands::set_library_path,
|
|
commands::update_card_data,
|
|
commands::cancel_update_card_data,
|
|
commands::search_cards,
|
|
commands::add_owned,
|
|
commands::set_owned,
|
|
commands::set_location,
|
|
commands::search_library,
|
|
commands::get_library_stats,
|
|
commands::get_library_facets,
|
|
commands::list_decks,
|
|
commands::create_deck,
|
|
commands::delete_deck,
|
|
commands::rename_deck,
|
|
commands::duplicate_deck,
|
|
commands::set_deck_format,
|
|
commands::set_deck_commander,
|
|
commands::set_deck_card,
|
|
commands::deck_contents,
|
|
commands::card_decks,
|
|
commands::export_deck,
|
|
commands::import_deck,
|
|
commands::export_library_cards,
|
|
commands::import_library_cards,
|
|
])
|
|
.run(tauri::generate_context!())
|
|
.expect("error while running tauri application");
|
|
}
|