Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Shell updates (bonds, updated Dapps) #6897

Merged
merged 12 commits into from
Oct 25, 2017
Binary file added js/assets/parity-logo-black.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added js/assets/parity-logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2,324 changes: 1,484 additions & 840 deletions js/package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@
"lodash.omitby": "4.6.0",
"lodash.throttle": "4.1.1",
"lodash.uniq": "4.5.0",
"oo7": "paritytech/oo7#34fdb5991f4e59b2cf84260cab48cec9a57d88c0",
"prop-types": "15.5.10",
"react": "15.6.1",
"react-dom": "15.6.1",
Expand Down
17 changes: 17 additions & 0 deletions js/src/Application/application.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,23 @@
.application {
box-sizing: border-box;
margin-top: 2.75em;

.logo {
top: 0;
right: 0;
left: 0;
bottom: 0;
opacity: 0.2;
position: fixed;
padding: 7em;
text-align: center;
z-index: 0;

img {
display: inline-block;
margin: 0 auto;
}
}
}

.container {
Expand Down
4 changes: 4 additions & 0 deletions js/src/Application/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import Snackbar from '../Snackbar';
import Status from '../Status';
import UpgradeParity from '../UpgradeParity';

import parityLogo from '../../assets/parity-logo-black.png';
import Store from './store';
import styles from './application.css';

Expand Down Expand Up @@ -132,6 +133,9 @@ class Application extends Component {

return (
<div className={ styles.container }>
<div className={ styles.logo }>
<img src={ parityLogo } />
</div>
<Errors />
{ children }
</div>
Expand Down
11 changes: 2 additions & 9 deletions js/src/Dapp/dapp.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
.frame {
background: white;
border: 0;
opacity: 0;
position: absolute;
height: 100%;
width: 100%;
z-index: 1;
}

.full {
Expand All @@ -32,13 +34,4 @@
font-family: 'Roboto', sans-serif;
font-size: 16px;
font-weight: 300;

.text {
text-align: center;
padding: 5em;
font-size: 2em;
color: #999;
overflow: hidden;
text-overflow: ellipsis;
}
}
21 changes: 11 additions & 10 deletions js/src/Dapp/dapp.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import builtinDapps from '@parity/shared/config/dappsBuiltin.json';
import viewsDapps from '@parity/shared/config/dappsViews.json';
import DappsStore from '@parity/shared/mobx/dappsStore';
import HistoryStore from '@parity/shared/mobx/historyStore';
// import { Bond } from 'oo7';

import styles from './dapp.css';

Expand Down Expand Up @@ -90,16 +91,7 @@ export default class Dapp extends Component {
const { app, loading } = this.state;

if (loading) {
return (
<div className={ styles.full }>
<div className={ styles.text }>
<FormattedMessage
id='dapp.loading'
defaultMessage='Loading'
/>
</div>
</div>
);
return null;
}

if (!app) {
Expand Down Expand Up @@ -157,11 +149,20 @@ export default class Dapp extends Component {
<iframe
className={ styles.frame }
frameBorder={ 0 }
id='dappFrame'
name={ name }
onLoad={ this.onDappLoad }
sandbox='allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation'
scrolling='auto'
src={ `${src}${hash}` }
/>
);
}

onDappLoad = () => {
const frame = document.getElementById('dappFrame');

frame.style.opacity = 1;
// frame.contentWindow.injectedBondCache = Bond.cache;
}
}
1 change: 0 additions & 1 deletion js/src/Dapps/dapps.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class Dapps extends Component {
}

renderList (items, overlay) {
console.log(items);
return (
<SectionList
items={ items }
Expand Down
2 changes: 1 addition & 1 deletion js/src/ParityBar/parityBar.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Button from '@parity/ui/Button';
import ContainerTitle from '@parity/ui/Container/Title';
import IdentityIcon from '@parity/ui/IdentityIcon';
import GradientBg from '@parity/ui/GradientBg';
import SelectionList from '@parity/ui/SectionList';
import SelectionList from '@parity/ui/SelectionList';
import SignerPending from '@parity/ui/SignerPending';
import { CancelIcon } from '@parity/ui/Icons';

Expand Down
1 change: 1 addition & 0 deletions js/src/inject.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function initProvider () {
});

window.ethereum = ethereum;
window.isParity = true;

return ethereum;
}
Expand Down
2 changes: 1 addition & 1 deletion js/webpack/rules/parity.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

module.exports = {
test: /\.js$/,
include: /node_modules\/@parity\//,
include: /node_modules\/(@parity|oo7)\//,
use: [ {
loader: 'happypack/loader',
options: {
Expand Down