mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-30 17:48:50 +02:00
fix(deep-link): allow empty config values (#1732)
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
"deep-link": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Allow empty configuration values.
|
||||||
@@ -32,10 +32,12 @@ where
|
|||||||
#[derive(Deserialize)]
|
#[derive(Deserialize)]
|
||||||
pub struct Config {
|
pub struct Config {
|
||||||
/// Mobile requires `https://<host>` urls.
|
/// Mobile requires `https://<host>` urls.
|
||||||
|
#[serde(default)]
|
||||||
pub mobile: Vec<AssociatedDomain>,
|
pub mobile: Vec<AssociatedDomain>,
|
||||||
/// Desktop requires urls starting with `<scheme>://`.
|
/// Desktop requires urls starting with `<scheme>://`.
|
||||||
/// These urls are also active in dev mode on Android.
|
/// These urls are also active in dev mode on Android.
|
||||||
#[allow(unused)] // Used in tauri-bundler
|
#[allow(unused)] // Used in tauri-bundler
|
||||||
|
#[serde(default)]
|
||||||
pub desktop: DesktopProtocol,
|
pub desktop: DesktopProtocol,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -46,3 +48,9 @@ pub enum DesktopProtocol {
|
|||||||
One(DeepLinkProtocol),
|
One(DeepLinkProtocol),
|
||||||
List(Vec<DeepLinkProtocol>),
|
List(Vec<DeepLinkProtocol>),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for DesktopProtocol {
|
||||||
|
fn default() -> Self {
|
||||||
|
Self::List(Vec::new())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user