From 73dcde65aa8ae23c29ddbe6b56af5af3abb38fea Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Mon, 20 Nov 2017 15:11:12 +0100 Subject: [PATCH] localUrl only from manifest --- dapps/js-glue/src/lib.rs.in | 1 - dapps/src/apps/app.rs | 2 +- dapps/src/apps/fs.rs | 2 +- dapps/src/endpoint.rs | 2 +- dapps/src/page/builtin.rs | 2 +- 5 files changed, 4 insertions(+), 5 deletions(-) diff --git a/dapps/js-glue/src/lib.rs.in b/dapps/js-glue/src/lib.rs.in index 460c6498b..99a253013 100644 --- a/dapps/js-glue/src/lib.rs.in +++ b/dapps/js-glue/src/lib.rs.in @@ -38,7 +38,6 @@ pub struct Info { pub author: &'static str, pub description: &'static str, pub icon_url: &'static str, - pub local_url: &'static str, } pub trait WebApp : Default + Send + Sync { diff --git a/dapps/src/apps/app.rs b/dapps/src/apps/app.rs index 9ced2438d..3b674aa15 100644 --- a/dapps/src/apps/app.rs +++ b/dapps/src/apps/app.rs @@ -27,7 +27,7 @@ pub struct App { #[serde(rename="iconUrl")] pub icon_url: String, #[serde(rename="localUrl")] - pub local_url: String, + pub local_url: Option, } impl App { diff --git a/dapps/src/apps/fs.rs b/dapps/src/apps/fs.rs index 888e32bbf..c581c2a8a 100644 --- a/dapps/src/apps/fs.rs +++ b/dapps/src/apps/fs.rs @@ -56,7 +56,7 @@ fn read_manifest(name: &str, mut path: PathBuf) -> EndpointInfo { version: "0.0.0".into(), author: "?".into(), icon_url: "icon.png".into(), - local_url: "".into(), + local_url: None, } }) } diff --git a/dapps/src/endpoint.rs b/dapps/src/endpoint.rs index 3a0b23a04..5491b76de 100644 --- a/dapps/src/endpoint.rs +++ b/dapps/src/endpoint.rs @@ -44,7 +44,7 @@ pub struct EndpointInfo { pub version: String, pub author: String, pub icon_url: String, - pub local_url: String, + pub local_url: Option, } pub type Endpoints = BTreeMap>; diff --git a/dapps/src/page/builtin.rs b/dapps/src/page/builtin.rs index b8c013cb3..0e93b1c68 100644 --- a/dapps/src/page/builtin.rs +++ b/dapps/src/page/builtin.rs @@ -132,7 +132,7 @@ impl From for EndpointInfo { description: info.description.into(), author: info.author.into(), icon_url: info.icon_url.into(), - local_url: info.local_url.into(), + local_url: None, version: info.version.into(), } }