Update build to pull from external repos
This commit is contained in:
@@ -20,6 +20,7 @@ import { FormattedMessage } from 'react-intl';
|
||||
import { connect } from 'react-redux';
|
||||
import PropTypes from 'prop-types';
|
||||
|
||||
import UpgradeStore from '@parity/shared/mobx/upgradeParity';
|
||||
import { Errors } from '@parity/ui';
|
||||
|
||||
import Connection from '../Connection';
|
||||
@@ -31,7 +32,6 @@ import Requests from '../Requests';
|
||||
import Snackbar from '../Snackbar';
|
||||
import Status from '../Status';
|
||||
import UpgradeParity from '../UpgradeParity';
|
||||
import UpgradeStore from '../UpgradeParity/store';
|
||||
import SyncWarning, { showSyncWarning } from '../SyncWarning';
|
||||
|
||||
import Store from './store';
|
||||
|
||||
@@ -102,12 +102,14 @@ export default class Dapp extends Component {
|
||||
case 'local':
|
||||
src = `${dappsUrl}/${app.id}/`;
|
||||
break;
|
||||
|
||||
case 'network':
|
||||
src = `${dappsUrl}/${app.contentHash}/`;
|
||||
break;
|
||||
|
||||
default:
|
||||
let dapphost = process.env.DAPPS_URL || (
|
||||
process.env.NODE_ENV === 'production' && !app.secure
|
||||
process.env.NODE_ENV === 'production'
|
||||
? `${dappsUrl}/ui`
|
||||
: ''
|
||||
);
|
||||
@@ -116,7 +118,11 @@ export default class Dapp extends Component {
|
||||
dapphost = '';
|
||||
}
|
||||
|
||||
src = `${dapphost}/${app.url}.html`;
|
||||
const appId = this.context.api.util.isHex(app.id)
|
||||
? app.id
|
||||
: this.context.api.sha3(app.url);
|
||||
|
||||
src = `${dapphost}/dapps/${appId}/index.html`;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
@@ -27,11 +27,9 @@ import web3extensions from './web3.extensions';
|
||||
function initProvider () {
|
||||
let [, appId] = window.location.pathname.split('/');
|
||||
|
||||
if (appId.indexOf('.html') !== -1) {
|
||||
appId = appId.replace('.html', '');
|
||||
}
|
||||
console.log('window.location.pathname', window.location.pathname, appId);
|
||||
|
||||
if (appId.substr(0, 2) !== '0x') {
|
||||
if (!Api.util.isHex(appId)) {
|
||||
appId = Api.util.sha3(appId);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user