Browse Source

hide non-native ui in native only mode

all-modes
pbca26 8 years ago
parent
commit
0199b68546
  1. 4
      react/src/components/dashboard/navbar/navbar.render.js
  2. 2
      react/src/components/dashboard/notifications/notifications.js
  3. 50
      react/src/components/dashboard/notifications/notifications.render.js
  4. 2
      react/src/components/dashboard/settings/settings.js
  5. 30
      react/src/components/dashboard/settings/settings.render.js
  6. 2
      react/src/components/overrides.scss

4
react/src/components/dashboard/navbar/navbar.render.js

@ -62,7 +62,7 @@ const NavbarRender = function() {
<i className="site-menu-icon"></i> Jumblr
</a>
</li>
<li className={ this.isSectionActive('atomic') ? 'active nav-top-menu' : 'nav-top-menu' }>
<li className={ this.state.nativeOnly ? 'hide' : (this.isSectionActive('atomic') ? 'active nav-top-menu' : 'nav-top-menu') }>
<a onClick={ () => this.dashboardChangeSection('atomic') }>
<i className="site-menu-icon"></i> Atomic Explorer
</a>
@ -97,7 +97,7 @@ const NavbarRender = function() {
<i className="icon md-settings"></i> { translate('INDEX.SETTINGS') }
</a>
</li>
<li>
<li className={ this.state.nativeOnly ? 'hide' : '' }>
<a onClick={ () => this.openSyncOnlyModal() }>
<i className="icon fa-cubes"></i> { translate('ADD_COIN.SYNC_ONLY') }
</a>

2
react/src/components/dashboard/notifications/notifications.js

@ -1,5 +1,6 @@
import React from 'react';
import { sortByDate } from '../../../util/sort';
import { Config } from '../../../actions/actionCreators';
import {
NotificationsByTypeRender,
NotificationsModalRender,
@ -19,6 +20,7 @@ class Notifications extends React.Component {
},
activeTab: 2,
guiLog: null,
debug: Config.debug,
};
this.toggleNotificationsModal = this.toggleNotificationsModal.bind(this);
}

50
react/src/components/dashboard/notifications/notifications.render.js

@ -88,29 +88,33 @@ export const NotificationsModalRender = function() {
};
export const NotificationsRender = function() {
return (
<div>
<div
className={ this.props.Dashboard.activeHandle && this.props.Dashboard.activeHandle.status === 'unlocked' ? 'notifications-badge stick-to-top' : 'notifications-badge' }
onClick={ this.toggleNotificationsModal }>
<span className="badge success">
{ this.state.calls.success }
</span>
<span className="badge error">
{ this.state.calls.error }
</span>
<span className="badge pending">
{ this.state.calls.pending }
</span>
<div className={ this.state.calls.pending === 0 ? 'spinner spinner-hide' : 'spinner' }>
<div className="rect1"></div>
<div className="rect2"></div>
<div className="rect3"></div>
<div className="rect4"></div>
<div className="rect5"></div>
if (this.state.debug) {
return (
<div>
<div
className={ this.props.Dashboard.activeHandle && this.props.Dashboard.activeHandle.status === 'unlocked' ? 'notifications-badge stick-to-top' : 'notifications-badge' }
onClick={ this.toggleNotificationsModal }>
<span className="badge success">
{ this.state.calls.success }
</span>
<span className="badge error">
{ this.state.calls.error }
</span>
<span className="badge pending">
{ this.state.calls.pending }
</span>
<div className={ this.state.calls.pending === 0 ? 'spinner spinner-hide' : 'spinner' }>
<div className="rect1"></div>
<div className="rect2"></div>
<div className="rect3"></div>
<div className="rect4"></div>
<div className="rect5"></div>
</div>
</div>
{ this.renderNotificationsModal() }
</div>
{ this.renderNotificationsModal() }
</div>
);
);
} else {
return null;
}
};

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

@ -1,6 +1,7 @@
import React from 'react';
import { translate } from '../../../translate/translate';
import {
Config,
iguanaActiveHandle,
encryptWallet,
settingsWifkeyState,
@ -42,6 +43,7 @@ class Settings extends React.Component {
cliResponse: null,
exportWifKeysRaw: false,
seedInputVisibility: false,
nativeOnly: Config.iguanaLessMode,
};
this.exportWifKeys = this.exportWifKeys.bind(this);
this.updateInput = this.updateInput.bind(this);

30
react/src/components/dashboard/settings/settings.render.js

@ -106,9 +106,9 @@ export const SettingsRender = function() {
className="panel-group"
id="SettingsAccordion">
<div
className="panel"
id="WalletInfo"
onClick={ () => this.openTab('WalletInfo', 0) }>
onClick={ () => this.openTab('WalletInfo', 0) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 0 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-balance-wallet"></i>{ translate('INDEX.WALLET_INFO') }
@ -157,9 +157,9 @@ export const SettingsRender = function() {
</div>
<div
className="panel"
id="AddNodeforCoin"
onClick={ () => this.openTab('AddNodeforCoin', 1) }>
onClick={ () => this.openTab('AddNodeforCoin', 1) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 1 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-plus-square"></i>{ translate('INDEX.ADD_NODE') }
@ -243,9 +243,9 @@ export const SettingsRender = function() {
</div>
<div
className="panel"
id="DumpWallet"
onClick={ () => this.openTab('DumpWallet', 2) }>
onClick={ () => this.openTab('DumpWallet', 2) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 2 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon wb-briefcase"></i>{ translate('INDEX.WALLET_BACKUP') }
@ -259,9 +259,9 @@ export const SettingsRender = function() {
</div>
<div
className="panel"
id="FiatCurrencySettings"
onClick={ () => this.openTab('FiatCurrencySettings', 3) }>
onClick={ () => this.openTab('FiatCurrencySettings', 3) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 3 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon fa-money"></i>{ translate('INDEX.FIAT_CURRENCY') }
@ -275,9 +275,9 @@ export const SettingsRender = function() {
</div>
<div
className="panel"
id="ExportKeys"
onClick={ () => this.openTab('ExportKeys', 4) }>
onClick={ () => this.openTab('ExportKeys', 4) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 4 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-key"></i>{ translate('INDEX.EXPORT_KEYS') }
@ -345,9 +345,9 @@ export const SettingsRender = function() {
</div>
<div
className="panel"
id="ImportKeys"
onClick={ () => this.openTab('ImportKeys', 5) }>
onClick={ () => this.openTab('ImportKeys', 5) }
className={ this.state.nativeOnly ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 5 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon md-key"></i>{ translate('INDEX.IMPORT_KEYS') }
@ -431,7 +431,7 @@ export const SettingsRender = function() {
name="debugTarget"
id="settingsDelectDebugLogOptions"
onChange={ this.updateInput }>
<option value="iguana">Iguana</option>
<option value="iguana" className={ this.state.nativeOnly ? 'hide' : '' }>Iguana</option>
<option value="komodo">Komodo</option>
</select>
<label
@ -487,9 +487,9 @@ export const SettingsRender = function() {
{ this.renderAppInfoTab() }
<div
className="panel"
id="Cli"
onClick={ () => this.openTab('Cli', 9) }>
onClick={ () => this.openTab('Cli', 9) }
className={ !this.props.Main.coins.native.length ? 'hide' : 'panel' }>
<div className="panel-heading">
<a className={ this.state.activeTab === 9 ? 'panel-title' : 'panel-title collapsed' }>
<i className="icon fa-code"></i> CLI

2
react/src/components/overrides.scss

@ -483,7 +483,7 @@ input:checked + .slider:before {
&.stick-to-top {
top: -3px;
left: 470px;
left: 400px;
z-index: 1500;
.spinner {

Loading…
Cancel
Save