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:
@@ -18,9 +18,11 @@
|
||||
.frame {
|
||||
background: white;
|
||||
border: 0;
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.full {
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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) {
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user