Shell updates (bonds, updated Dapps) (#6897)
* Remove stage-0 * Re-add stage-0 for `export default from './xyz';` * Add background loading image * Add window.isParity for parity-specific actions * inject bonds (temporary) * Remove loading text overlay * Remove background around logo * Remove debug log * Fix account selection (correct component used) * Update with changed dapp dependencies * Add oo7 to list of babel node_module targets * injectObjects -> onDappLoad
This commit is contained in:
parent
542cee9ace
commit
f282823e78
BIN
js/assets/parity-logo-black.png
Normal file
BIN
js/assets/parity-logo-black.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
BIN
js/assets/parity-logo.png
Normal file
BIN
js/assets/parity-logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.8 KiB |
2156
js/package-lock.json
generated
2156
js/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -180,6 +180,7 @@
|
|||||||
"lodash.omitby": "4.6.0",
|
"lodash.omitby": "4.6.0",
|
||||||
"lodash.throttle": "4.1.1",
|
"lodash.throttle": "4.1.1",
|
||||||
"lodash.uniq": "4.5.0",
|
"lodash.uniq": "4.5.0",
|
||||||
|
"oo7": "paritytech/oo7#34fdb5991f4e59b2cf84260cab48cec9a57d88c0",
|
||||||
"prop-types": "15.5.10",
|
"prop-types": "15.5.10",
|
||||||
"react": "15.6.1",
|
"react": "15.6.1",
|
||||||
"react-dom": "15.6.1",
|
"react-dom": "15.6.1",
|
||||||
|
@ -18,6 +18,23 @@
|
|||||||
.application {
|
.application {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
margin-top: 2.75em;
|
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 {
|
.container {
|
||||||
|
@ -35,6 +35,7 @@ import Snackbar from '../Snackbar';
|
|||||||
import Status from '../Status';
|
import Status from '../Status';
|
||||||
import UpgradeParity from '../UpgradeParity';
|
import UpgradeParity from '../UpgradeParity';
|
||||||
|
|
||||||
|
import parityLogo from '../../assets/parity-logo-black.png';
|
||||||
import Store from './store';
|
import Store from './store';
|
||||||
import styles from './application.css';
|
import styles from './application.css';
|
||||||
|
|
||||||
@ -132,6 +133,9 @@ class Application extends Component {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={ styles.container }>
|
<div className={ styles.container }>
|
||||||
|
<div className={ styles.logo }>
|
||||||
|
<img src={ parityLogo } />
|
||||||
|
</div>
|
||||||
<Errors />
|
<Errors />
|
||||||
{ children }
|
{ children }
|
||||||
</div>
|
</div>
|
||||||
|
@ -18,9 +18,11 @@
|
|||||||
.frame {
|
.frame {
|
||||||
background: white;
|
background: white;
|
||||||
border: 0;
|
border: 0;
|
||||||
|
opacity: 0;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.full {
|
.full {
|
||||||
@ -32,13 +34,4 @@
|
|||||||
font-family: 'Roboto', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
font-weight: 300;
|
font-weight: 300;
|
||||||
|
|
||||||
.text {
|
|
||||||
text-align: center;
|
|
||||||
padding: 5em;
|
|
||||||
font-size: 2em;
|
|
||||||
color: #999;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ import builtinDapps from '@parity/shared/config/dappsBuiltin.json';
|
|||||||
import viewsDapps from '@parity/shared/config/dappsViews.json';
|
import viewsDapps from '@parity/shared/config/dappsViews.json';
|
||||||
import DappsStore from '@parity/shared/mobx/dappsStore';
|
import DappsStore from '@parity/shared/mobx/dappsStore';
|
||||||
import HistoryStore from '@parity/shared/mobx/historyStore';
|
import HistoryStore from '@parity/shared/mobx/historyStore';
|
||||||
|
// import { Bond } from 'oo7';
|
||||||
|
|
||||||
import styles from './dapp.css';
|
import styles from './dapp.css';
|
||||||
|
|
||||||
@ -90,16 +91,7 @@ export default class Dapp extends Component {
|
|||||||
const { app, loading } = this.state;
|
const { app, loading } = this.state;
|
||||||
|
|
||||||
if (loading) {
|
if (loading) {
|
||||||
return (
|
return null;
|
||||||
<div className={ styles.full }>
|
|
||||||
<div className={ styles.text }>
|
|
||||||
<FormattedMessage
|
|
||||||
id='dapp.loading'
|
|
||||||
defaultMessage='Loading'
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!app) {
|
if (!app) {
|
||||||
@ -157,11 +149,20 @@ export default class Dapp extends Component {
|
|||||||
<iframe
|
<iframe
|
||||||
className={ styles.frame }
|
className={ styles.frame }
|
||||||
frameBorder={ 0 }
|
frameBorder={ 0 }
|
||||||
|
id='dappFrame'
|
||||||
name={ name }
|
name={ name }
|
||||||
|
onLoad={ this.onDappLoad }
|
||||||
sandbox='allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation'
|
sandbox='allow-forms allow-popups allow-same-origin allow-scripts allow-top-navigation'
|
||||||
scrolling='auto'
|
scrolling='auto'
|
||||||
src={ `${src}${hash}` }
|
src={ `${src}${hash}` }
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onDappLoad = () => {
|
||||||
|
const frame = document.getElementById('dappFrame');
|
||||||
|
|
||||||
|
frame.style.opacity = 1;
|
||||||
|
// frame.contentWindow.injectedBondCache = Bond.cache;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,6 @@ class Dapps extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
renderList (items, overlay) {
|
renderList (items, overlay) {
|
||||||
console.log(items);
|
|
||||||
return (
|
return (
|
||||||
<SectionList
|
<SectionList
|
||||||
items={ items }
|
items={ items }
|
||||||
|
@ -29,7 +29,7 @@ import Button from '@parity/ui/Button';
|
|||||||
import ContainerTitle from '@parity/ui/Container/Title';
|
import ContainerTitle from '@parity/ui/Container/Title';
|
||||||
import IdentityIcon from '@parity/ui/IdentityIcon';
|
import IdentityIcon from '@parity/ui/IdentityIcon';
|
||||||
import GradientBg from '@parity/ui/GradientBg';
|
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 SignerPending from '@parity/ui/SignerPending';
|
||||||
import { CancelIcon } from '@parity/ui/Icons';
|
import { CancelIcon } from '@parity/ui/Icons';
|
||||||
|
|
||||||
|
@ -45,6 +45,7 @@ function initProvider () {
|
|||||||
});
|
});
|
||||||
|
|
||||||
window.ethereum = ethereum;
|
window.ethereum = ethereum;
|
||||||
|
window.isParity = true;
|
||||||
|
|
||||||
return ethereum;
|
return ethereum;
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
test: /\.js$/,
|
test: /\.js$/,
|
||||||
include: /node_modules\/@parity\//,
|
include: /node_modules\/(@parity|oo7)\//,
|
||||||
use: [ {
|
use: [ {
|
||||||
loader: 'happypack/loader',
|
loader: 'happypack/loader',
|
||||||
options: {
|
options: {
|
||||||
|
Loading…
Reference in New Issue
Block a user