From 413da805b5b17ff13e428389f8f728befd5549da Mon Sep 17 00:00:00 2001 From: Jaco Greeff Date: Tue, 19 Sep 2017 14:28:33 +0200 Subject: [PATCH] Update status styling --- js/src/DappRequests/store.js | 8 ++++++++ js/src/ParityBar/parityBar.css | 2 +- js/src/ParityBar/parityBar.js | 1 - js/src/Requests/requests.css | 21 +++++++++++++-------- js/src/Requests/requests.js | 1 + js/webpack/app.js | 12 +++++++++--- 6 files changed, 32 insertions(+), 13 deletions(-) diff --git a/js/src/DappRequests/store.js b/js/src/DappRequests/store.js index e9516ce6d..227dba996 100644 --- a/js/src/DappRequests/store.js +++ b/js/src/DappRequests/store.js @@ -137,6 +137,10 @@ export default class Store { } @action rejectMessage = (source, { id, from, method, token }) => { + if (!source) { + return; + } + source.postMessage({ error: `Method ${method} not allowed`, id, @@ -198,6 +202,10 @@ export default class Store { _methodCallbackPost = (id, from, source, token) => { return (error, result) => { + if (!source) { + return; + } + source.postMessage({ error: error ? error.message diff --git a/js/src/ParityBar/parityBar.css b/js/src/ParityBar/parityBar.css index 87050072f..49c71aa6a 100644 --- a/js/src/ParityBar/parityBar.css +++ b/js/src/ParityBar/parityBar.css @@ -125,7 +125,7 @@ $modalZ: 10001; .cornercolor { align-items: center; display: flex; - padding: 0.5em 1em; + padding: 0 1em; } .link { diff --git a/js/src/ParityBar/parityBar.js b/js/src/ParityBar/parityBar.js index 78bcdb88e..6fd423128 100644 --- a/js/src/ParityBar/parityBar.js +++ b/js/src/ParityBar/parityBar.js @@ -237,7 +237,6 @@ class ParityBar extends Component { icon={ diff --git a/js/src/Requests/requests.css b/js/src/Requests/requests.css index e26d89ceb..04bc11f0a 100644 --- a/js/src/Requests/requests.css +++ b/js/src/Requests/requests.css @@ -21,7 +21,7 @@ $borderColor: rgba(0, 0, 0, 0.15); .requests { align-items: flex-end; - bottom: 2em; + bottom: 2.75em; display: flex; flex-direction: column; position: fixed; @@ -37,23 +37,32 @@ $borderColor: rgba(0, 0, 0, 0.15); .request { animation-fill-mode: forwards; animation-timing-function: cubic-bezier(0.7, 0, 0.3, 1); - background-color: rgba($baseColor, $baseColor, $baseColor, $baseOpacity); + background: white; + background: linear-gradient(white, #fcfcfc); border: 4px solid $borderColor; cursor: pointer; margin-top: 0.25em; opacity: 1; width: 100%; + &:hover { + background: white; + } + &.hide { animation-duration: 0.5s; animation-name: fadeout; } + .progress { + margin: 0 0.25em 0.5em; + } + .status { - padding: 0.5em; + padding: 0.75em; &.error { - background-color: rgba(200, 40, 40, 0.95); + background: rgba(200, 40, 40, 0.95); color: white; } } @@ -64,10 +73,6 @@ $borderColor: rgba(0, 0, 0, 0.15); padding: 1em 1em 0.5em; } - &:hover .container { - background-color: rgba($baseColor, $baseColor, $baseColor, 1); - } - p { margin: 0; } diff --git a/js/src/Requests/requests.js b/js/src/Requests/requests.js index 4f02267be..d208f79e0 100644 --- a/js/src/Requests/requests.js +++ b/js/src/Requests/requests.js @@ -110,6 +110,7 @@ class Requests extends Component { ? null : ( ({ - from: path.join(dir, file), + return [ + 'index.html', 'dist.css', 'dist.css.map', 'dist.js', 'dist.js.map' + ] + .map((file) => path.join(dir, file)) + .filter((from) => fs.existsSync(from)) + .map((from) => ({ + from, to: `dapps/${destination}/` - })).concat({ + })) + .concat({ from: path.join(dir, 'dist'), to: `dapps/${destination}/dist/` });