Update build to pull from external repos

This commit is contained in:
Jaco Greeff
2017-08-01 14:41:13 +02:00
parent c509733a30
commit f8bf4a1522
10 changed files with 607 additions and 828 deletions

View File

@@ -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';

View File

@@ -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;
}

View File

@@ -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);
}