Browse Source

basilisk init fetch / address change fetch fix

all-modes
pbca26 8 years ago
parent
commit
6649f13dee
  1. 2
      react/src/actions/actionCreators.js
  2. 13
      react/src/components/dashboard/settings/settings.js
  3. 2
      react/src/translate/en.js

2
react/src/actions/actionCreators.js

@ -330,7 +330,7 @@ export function getNativeTxHistoryState(json) {
json = null;
} else if (json && json.result && json.result.length) {
json = json.result;
} else if (!json || !json.result.length) {
} else if (!json || (!json.result || !json.result.length)) {
json = 'no data';
}

13
react/src/components/dashboard/settings/settings.js

@ -106,8 +106,6 @@ class Settings extends React.Component {
appConfigSchema: _appConfigSchema,
appSettings: _appSettings,
}));
console.warn(_appSettings);
} catch(e) {}
}
@ -263,14 +261,15 @@ class Settings extends React.Component {
renderUpdateStatus() {
let items = [];
let patchProgressBar = null;
const _updateLogLength = this.state.updateLog.length;
for (let i = 0; i < this.state.updateLog.length; i++) {
for (let i = 0; i < _updateLogLength; i++) {
items.push(
<div key={ `settings-update-log-${i}` }>{ this.state.updateLog[i] }</div>
);
}
if (this.state.updateLog.length) {
if (_updateLogLength) {
return (
<div style={{ minHeight: '200px' }}>
<hr />
@ -279,7 +278,7 @@ class Settings extends React.Component {
<div className={ updateProgressBar.patch > -1 ? 'progress progress-sm' : 'hide' }>
<div
className="progress-bar progress-bar-striped active progress-bar-indicating progress-bar-success font-size-80-percent"
style={{ width: updateProgressBar.patch + '%' }}>
style={{ width: `${updateProgressBar.patch}%` }}>
</div>
</div>
</div>
@ -467,7 +466,7 @@ class Settings extends React.Component {
isError = true;
Store.dispatch(
triggerToaster(
'Komodo datadir path is invalid',
translate('TOASTR.KOMODO_DATADIR_INVALID'),
translate('INDEX.SETTINGS'),
'error'
)
@ -476,7 +475,7 @@ class Settings extends React.Component {
isError = true;
Store.dispatch(
triggerToaster(
'Komodo datadir path is not a directory',
translate('TOASTR.KOMODO_DATADIR_NOT_DIR'),
translate('INDEX.SETTINGS'),
'error'
)

2
react/src/translate/en.js

@ -445,6 +445,8 @@ export const _lang = {
'QR_ERR_UNKNOWN': 'Error: unknown error!',
},
'TOASTR': {
'KOMODO_DATADIR_INVALID': 'Komodo datadir path is invalid',
'KOMODO_DATADIR_NOT_DIR': 'Komodo datadir path is not a directory',
'INVALID_ADDRESS': 'Invalid @template@ address',
'RESTART_AGAMA_WITH_REINDEX_PARAM': 'Restart Agama and run Komodo with -reindex param',
'JUMBLR_DEPOSIT_ADDRESS_SET': 'Jumblr deposit address is set',

Loading…
Cancel
Save