feat(deep-link): Add deep link support for desktop (#916)

This commit is contained in:
Fabian-Lars
2024-05-09 18:58:15 +02:00
committed by Lucas Nogueira
parent eb1679b997
commit 021d23bef3
21 changed files with 614 additions and 29 deletions
+13 -3
View File
@@ -4,9 +4,8 @@
// This module is also imported in build.rs!
#![allow(dead_code)]
use serde::{Deserialize, Deserializer};
use tauri_utils::config::DeepLinkProtocol;
#[derive(Deserialize)]
pub struct AssociatedDomain {
@@ -32,5 +31,16 @@ where
#[derive(Deserialize)]
pub struct Config {
pub domains: Vec<AssociatedDomain>,
/// Mobile requires `https://<host>` urls.
pub mobile: Vec<AssociatedDomain>,
/// Desktop requires urls starting with `<scheme>://`.
/// These urls are also active in dev mode on Android.
pub desktop: DesktopProtocol,
}
#[derive(Deserialize)]
#[serde(untagged)]
pub enum DesktopProtocol {
One(DeepLinkProtocol),
List(Vec<DeepLinkProtocol>),
}