diff --git a/assets/mainWindow/css/loading.css b/assets/mainWindow/css/loading.css index c8c97c3..8782de6 100644 --- a/assets/mainWindow/css/loading.css +++ b/assets/mainWindow/css/loading.css @@ -109,4 +109,9 @@ body.agamaMode { .btn.btn-primary.btn-close-app { margin: 0; +} + +.app-closing { + position: relative; + top: 50px; } \ No newline at end of file diff --git a/react/src/actions/actions/nativeSend.js b/react/src/actions/actions/nativeSend.js index fc3e3e2..05e8dbb 100644 --- a/react/src/actions/actions/nativeSend.js +++ b/react/src/actions/actions/nativeSend.js @@ -176,8 +176,8 @@ export function getKMDOPIDState(json) { } export function getKMDOPID(opid, coin) { - let tmpopidOutput = '', - ajaxDataToHex; + let tmpopidOutput = ''; + let ajaxDataToHex; if (opid === undefined) { ajaxDataToHex = null; diff --git a/react/src/assets/images/support/github-icon.png b/react/src/assets/images/support/github-icon.png new file mode 100644 index 0000000..21ebc17 Binary files /dev/null and b/react/src/assets/images/support/github-icon.png differ diff --git a/react/src/assets/images/support/slack-icon.png b/react/src/assets/images/support/slack-icon.png new file mode 100644 index 0000000..edf6343 Binary files /dev/null and b/react/src/assets/images/support/slack-icon.png differ diff --git a/react/src/assets/images/support/slack-invite-icon.png b/react/src/assets/images/support/slack-invite-icon.png new file mode 100644 index 0000000..dd38ca6 Binary files /dev/null and b/react/src/assets/images/support/slack-invite-icon.png differ diff --git a/react/src/components/addcoin/addcoin.js b/react/src/components/addcoin/addcoin.js index 55295d7..9699613 100644 --- a/react/src/components/addcoin/addcoin.js +++ b/react/src/components/addcoin/addcoin.js @@ -1,4 +1,5 @@ import React from 'react'; +import { connect } from 'react-redux'; import { translate } from '../../translate/translate'; import Config from '../../config'; import { @@ -16,8 +17,8 @@ import CoinSelectorsRender from './coin-selectors.render'; import AddCoinRender from './addcoin.render'; class AddCoin extends React.Component { - constructor(props) { - super(props); + constructor() { + super(); this.state = { nativeOnly: Config.iguanaLessMode, coins: [], @@ -354,4 +355,16 @@ class AddCoin extends React.Component { } } -export default AddCoin; + +const mapStateToProps = (state) => { + return { + Main: state.Main, + ActiveCoin: { + coin: state.ActiveCoin.coin, + }, + AddCoin: state.AddCoin, + }; + +}; + +export default connect(mapStateToProps)(AddCoin); diff --git a/react/src/components/dashboard/loginSettingsModal/loginSettingsModal.js b/react/src/components/dashboard/loginSettingsModal/loginSettingsModal.js index cea9312..e3ebc80 100755 --- a/react/src/components/dashboard/loginSettingsModal/loginSettingsModal.js +++ b/react/src/components/dashboard/loginSettingsModal/loginSettingsModal.js @@ -1,4 +1,5 @@ import React from 'react'; +import { connect } from 'react-redux'; import { getCoinTitle } from '../../../util/coinHelper'; import { translate } from '../../../translate/translate'; import { toggleLoginSettingsModal } from '../../../actions/actionCreators'; @@ -29,4 +30,11 @@ class LoginSettingsModal extends React.Component { } } -export default LoginSettingsModal; \ No newline at end of file +const mapStateToProps = (state) => { + return { + Main: state.Main + }; + +}; + +export default connect(mapStateToProps)(LoginSettingsModal); diff --git a/react/src/components/dashboard/loginSettingsModal/loginSettingsModal.render.js b/react/src/components/dashboard/loginSettingsModal/loginSettingsModal.render.js index 8a59705..a36ac83 100644 --- a/react/src/components/dashboard/loginSettingsModal/loginSettingsModal.render.js +++ b/react/src/components/dashboard/loginSettingsModal/loginSettingsModal.render.js @@ -6,13 +6,12 @@ import Settings from '../settings/settings'; export const LoginSettingsModalRender = function() { return (
-
+
{ this.props.section === 'settings' && } { this.props.section === 'about' && diff --git a/react/src/components/dashboard/main/dashboard.js b/react/src/components/dashboard/main/dashboard.js index 4970a88..470fbd3 100755 --- a/react/src/components/dashboard/main/dashboard.js +++ b/react/src/components/dashboard/main/dashboard.js @@ -1,9 +1,10 @@ import React from 'react'; +import { connect } from 'react-redux'; import DashboardRender from './dashboard.render'; class Dashboard extends React.Component { - constructor(props) { - super(props); + constructor() { + super(); this.state = { }; this.renderDashboard = this.renderDashboard.bind(this); @@ -38,4 +39,17 @@ class Dashboard extends React.Component { } } -export default Dashboard; +const mapStateToProps = (state) => { + return { + Main: state.Main, + ActiveCoin: { + mode: state.ActiveCoin.mode, + }, + Dashboard: { + activeSection: state.Dashboard.activeSection, + } + }; + +}; + +export default connect(mapStateToProps)(Dashboard); diff --git a/react/src/components/dashboard/main/dashboard.render.js b/react/src/components/dashboard/main/dashboard.render.js index 66f3891..cb734fd 100644 --- a/react/src/components/dashboard/main/dashboard.render.js +++ b/react/src/components/dashboard/main/dashboard.render.js @@ -46,10 +46,10 @@ const DashboardRender = function() { } { this.isSectionActive('settings') && - + } { this.isSectionActive('about') && - + }
diff --git a/react/src/components/dashboard/notifications/notifications.js b/react/src/components/dashboard/notifications/notifications.js index 0d04d1f..1504121 100755 --- a/react/src/components/dashboard/notifications/notifications.js +++ b/react/src/components/dashboard/notifications/notifications.js @@ -1,4 +1,5 @@ import React from 'react'; +import { connect } from 'react-redux'; import { sortByDate } from '../../../util/sort'; import Config from '../../../config'; import { @@ -8,8 +9,8 @@ import { } from './notifications.render'; class Notifications extends React.Component { - constructor(props) { - super(props); + constructor() { + super(); this.state = { displayModal: false, calls: { @@ -107,4 +108,15 @@ class Notifications extends React.Component { } } -export default Notifications; +const mapStateToProps = (state) => { + return { + Dashboard: { + guiLog: state.Dashboard.guiLog, + activeHandle: state.Dashboard.activeHandle, + } + }; + +}; + +export default connect(mapStateToProps)(Notifications); + diff --git a/react/src/components/dashboard/receiveCoin/receiveCoin.render.js b/react/src/components/dashboard/receiveCoin/receiveCoin.render.js index 038ea1c..1be4154 100644 --- a/react/src/components/dashboard/receiveCoin/receiveCoin.render.js +++ b/react/src/components/dashboard/receiveCoin/receiveCoin.render.js @@ -54,7 +54,7 @@ export const AddressItemRender = function(address, type) { { this.renderAddressActions(address.address, type) } { type === 'public' ? address.address : `${address.address.substring(0, 34)}...` } { address.amount } - {!this.isNativeMode() && + { !this.isNativeMode() && { address.interest ? address.interest : 'N/A' } } @@ -175,5 +175,4 @@ export const ReceiveCoinRender = function() {
); } -}; - +}; \ No newline at end of file diff --git a/react/src/components/dashboard/settings/settings.js b/react/src/components/dashboard/settings/settings.js index 59e3078..653ec7c 100644 --- a/react/src/components/dashboard/settings/settings.js +++ b/react/src/components/dashboard/settings/settings.js @@ -1,4 +1,5 @@ import React from 'react'; +import { connect } from 'react-redux'; import { translate } from '../../../translate/translate'; import Config from '../../../config'; import { @@ -41,8 +42,8 @@ let updateProgressBar = { 4) batch export/import wallet addresses */ class Settings extends React.Component { - constructor(props) { - super(props); + constructor() { + super(); this.state = { activeTab: 0, debugLinesCount: 10, @@ -79,14 +80,27 @@ class Settings extends React.Component { this.toggleSeedInputVisibility = this.toggleSeedInputVisibility.bind(this); this._checkForUpdateUIPromise = this._checkForUpdateUIPromise.bind(this); this._updateUIPromise = this._updateUIPromise.bind(this); + this.updateTabDimensions = this.updateTabDimensions.bind(this); + } + + updateTabDimensions() { + setTimeout(() => { + const _height = document.querySelector(`#${this.state.tabElId} .panel-collapse .panel-body`).offsetHeight; + + this.setState(Object.assign({}, this.state, { + activeTabHeight: _height, + })); + }, 100); } componentWillMount() { socket.on('patch', msg => this.updateSocketsData(msg)); + window.addEventListener('resize', this.updateTabDimensions); } componentWillUnmount() { socket.removeAllListeners('patch', msg => this.updateSocketsData(msg)); + window.removeEventListener('resize', this.updateTabDimensions); if (!this.state.disableWalletSpecificUI) { document.documentElement.style.height = '100%'; @@ -94,7 +108,7 @@ class Settings extends React.Component { } } - componentDidMount() { + componentDidMount(props) { if (!this.props.disableWalletSpecificUI) { Store.dispatch(iguanaActiveHandle()); } @@ -115,6 +129,25 @@ class Settings extends React.Component { } } + openExternalWindow(url) { + const remote = window.require('electron').remote; + const BrowserWindow = remote.BrowserWindow; + + const externalWindow = new BrowserWindow({ + width: 1280, + height: 800, + title: 'Loading...', + icon: remote.getCurrentWindow().iguanaIcon, + }); + + externalWindow.loadURL(url); + externalWindow.webContents.on('did-finish-load', function() { + setTimeout(function() { + externalWindow.show(); + }, 40); + }); + } + _resetAppConfig() { Store.dispatch(resetAppConfig()); } @@ -680,4 +713,18 @@ class Settings extends React.Component { } } -export default Settings; +const mapStateToProps = (state) => { + return { + Main: { + coins: state.Main.coins, + activeHandle: state.Main.activeHandle, + }, + ActiveCoin: { + coin: state.ActiveCoin.coin, + }, + Settings: state.Settings, + }; + +}; + +export default connect(mapStateToProps)(Settings); diff --git a/react/src/components/dashboard/settings/settings.render.js b/react/src/components/dashboard/settings/settings.render.js index 065cfc4..96ea400 100644 --- a/react/src/components/dashboard/settings/settings.render.js +++ b/react/src/components/dashboard/settings/settings.render.js @@ -12,7 +12,7 @@ export const AppUpdateTabRender = function() { onClick={ () => this.openTab('AppUpdate', 10) }>
- { translate('INDEX.UPDATE') } + { translate('INDEX.UPDATE') }
this.openTab('Support', 11) }> +
+ + Support + +
+
+
+
+
+
this.openExternalWindow('http://support.supernet.org') }> + Support tickets +
Support tickets
+
support.supernet.org
+
+
+
+
this.openExternalWindow('https://sprnt.slack.com') }> + Slack +
Slack
+
sprnt.slack.com
+
+
+
+
this.openExternalWindow('http://slackinvite.supernet.org') }> + Slack invite +
Get Slack invite
+
slackinvite.supernet.org
+
+
+
+
this.openExternalWindow('https://github.com/SuperNETorg/Agama') }> + Github +
Github
+
github.com/SuperNETorg/Agama
+
+
+
+
+
+
diff --git a/react/src/components/dashboard/walletsProgress/walletsProgress.render.js b/react/src/components/dashboard/walletsProgress/walletsProgress.render.js index 6208677..0305aa1 100644 --- a/react/src/components/dashboard/walletsProgress/walletsProgress.render.js +++ b/react/src/components/dashboard/walletsProgress/walletsProgress.render.js @@ -76,7 +76,6 @@ export const WalletsProgressRender = function() {