refactor: rename plugin safari-auth to native-bridge (#749)

* fix: layout tweaks for mobile

* refactor: rename plugin safari-auth to native-bridge
This commit is contained in:
Huang Xin 2025-03-29 14:27:18 +08:00 committed by GitHub
parent f90177713a
commit a72c8f2391
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
46 changed files with 145 additions and 144 deletions

View file

@ -0,0 +1,23 @@
use serde::de::DeserializeOwned;
use tauri::{plugin::PluginApi, AppHandle, Runtime};
use crate::models::*;
pub fn init<R: Runtime, C: DeserializeOwned>(
app: &AppHandle<R>,
_api: PluginApi<R, C>,
) -> crate::Result<NativeBridge<R>> {
Ok(NativeBridge(app.clone()))
}
/// Access to the native-bridge APIs.
pub struct NativeBridge<R: Runtime>(AppHandle<R>);
impl<R: Runtime> NativeBridge<R> {
pub fn auth_with_safari(
&self,
_payload: SafariAuthRequest,
) -> crate::Result<SafariAuthResponse> {
Err(crate::Error::UnsupportedPlatformError)
}
}