feat(KAN-53): add Android app and platform integration
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
use tauri::{WebviewUrl, WebviewWindowBuilder};
|
||||
|
||||
pub fn context<R: tauri::Runtime>() -> tauri::Context<R> {
|
||||
tauri::generate_context!()
|
||||
}
|
||||
|
||||
pub fn builder() -> tauri::Builder<tauri::Wry> {
|
||||
tauri::Builder::default().setup(|app| {
|
||||
WebviewWindowBuilder::new(app, "launcher", WebviewUrl::App("index.html".into()))
|
||||
.use_https_scheme(true)
|
||||
.on_navigation(|url| {
|
||||
url.scheme() == "https"
|
||||
&& url.host_str() == Some("tauri.localhost")
|
||||
&& url.port().is_none()
|
||||
&& url.username().is_empty()
|
||||
&& url.password().is_none()
|
||||
&& matches!(url.path(), "/" | "/index.html")
|
||||
})
|
||||
.build()?;
|
||||
Ok(())
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user