mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-14 16:37:22 +02:00
feat(deep-link): Add deep link support for desktop (#916)
This commit is contained in:
committed by
Lucas Nogueira
parent
eb1679b997
commit
021d23bef3
@@ -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>),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user