mirror of
https://github.com/readest/readest.git
synced 2026-05-03 14:00:54 +00:00
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:
parent
f90177713a
commit
a72c8f2391
46 changed files with 145 additions and 144 deletions
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue