mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-08 17:35:18 +00:00
is init yet from Rust
This commit is contained in:
1 parent
9b5ae1cd8b
commit
dcfe074535
9 files changed
+38
-91
No files matched your search
@@ -1,16 +1,9 @@
|
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
use cjdic2_core::{AppService, Entry, db::YomitanRow};
|
||||
use cjdic2_core::{AppService, YomitanRow};
|
||||
|
||||
#[tauri::command]
|
||||
pub fn add_entry(name: &str, state: tauri::State<AppService>) -> Result<(), String> {
|
||||
state
|
||||
.add_entry(name, "definition")
|
||||
.map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
pub fn list_entries(state: tauri::State<AppService>) -> Result<Vec<Entry>, String> {
|
||||
state.list_entries().map_err(|e| e.to_string())
|
||||
pub fn is_yomitan_setup_yet(state: tauri::State<AppService>) -> bool {
|
||||
state.is_yomitan_setup_yet()
|
||||
}
|
||||
|
||||
#[tauri::command]
|
||||
|
||||
Reference in new issue
Block a user