From 9a58a77d28a7401a69ff36331c4e9ea112bc33e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomasz=20Drwi=C4=99ga?= Date: Fri, 23 Dec 2016 12:58:09 +0100 Subject: [PATCH] Adding WebBrowser dapp to the list --- js/src/views/Dapps/Summary/summary.js | 43 ++++++++++++++++++++------- js/src/views/Dapps/builtin.json | 9 ++++++ 2 files changed, 41 insertions(+), 11 deletions(-) diff --git a/js/src/views/Dapps/Summary/summary.js b/js/src/views/Dapps/Summary/summary.js index 154ce15b17c..9c1d04f2196 100644 --- a/js/src/views/Dapps/Summary/summary.js +++ b/js/src/views/Dapps/Summary/summary.js @@ -39,12 +39,8 @@ export default class Summary extends Component { return null; } - let image =
 
; - if (app.type === 'local') { - image = ; - } else { - image = ; - } + const image = this.renderImage(dappsUrl, app); + const link = this.renderLink(app); return ( @@ -53,11 +49,7 @@ export default class Summary extends Component {
- { app.name } - - } + title={ link } byline={ app.description } />
@@ -68,4 +60,33 @@ export default class Summary extends Component { ); } + + renderImage (dappsUrl, app) { + if (app.type === 'local') { + return ( + + ); + } + + return ( + + ); + } + + renderLink (app) { + // Special case for web dapp + if (app.url === 'web') { + return ( + + { app.name } + + ); + } + + return ( + + { app.name } + + ); + } } diff --git a/js/src/views/Dapps/builtin.json b/js/src/views/Dapps/builtin.json index 1124c52fd41..2b617ae3294 100644 --- a/js/src/views/Dapps/builtin.json +++ b/js/src/views/Dapps/builtin.json @@ -64,5 +64,14 @@ "version": "1.0.0", "visible": false, "secure": true + }, + { + "id": "0x9042323cd85c6576992d211de34b3ecc183f15e4f639aa87859882f839c374e5", + "url": "web", + "name": "Browser", + "description": "A Web 2.0 hosted pseudo-dapps browser.", + "author": "Parity Team ", + "version": "1.0.0", + "visible": true } ]