This commit is contained in:
2023-10-18 14:49:20 +07:00
parent 489ab6bd0b
commit 939a72f945
47 changed files with 389 additions and 293 deletions

View File

@@ -98,6 +98,13 @@ fn secure_load(key: String) -> Result<String, String> {
}
}
#[tauri::command]
fn secure_remove(key: String) -> Result<(), ()> {
let entry = Entry::new("lume", &key).expect("Failed to create entry");
let _ = entry.delete_password();
Ok(())
}
fn main() {
tauri::Builder::default()
.plugin(tauri_plugin_app::init())
@@ -140,7 +147,8 @@ fn main() {
.invoke_handler(tauri::generate_handler![
opengraph,
secure_save,
secure_load
secure_load,
secure_remove
])
.run(tauri::generate_context!())
.expect("error while running tauri application");