refactor: read local file with fs plugin for Tauri App, closes #553 and closes #489 (#785)

This commit is contained in:
Huang Xin 2025-04-01 20:26:26 +08:00 committed by GitHub
parent 39fb7f759e
commit 7ccf3d0632
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 1164 additions and 790 deletions

View file

@ -36,7 +36,10 @@ impl<R: Runtime, T: Manager<R>> crate::NativeBridgeExt<R> for T {
/// Initializes the plugin.
pub fn init<R: Runtime>() -> TauriPlugin<R> {
Builder::new("native-bridge")
.invoke_handler(tauri::generate_handler![commands::auth_with_safari])
.invoke_handler(tauri::generate_handler![
commands::auth_with_safari,
commands::copy_uri_to_path,
])
.setup(|app, api| {
#[cfg(mobile)]
let native_bridge = mobile::init(app, api)?;