summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
Diffstat (limited to 'ui')
-rw-r--r--ui/app/components/main_panel/account_list.js3
-rw-r--r--ui/app/components/main_panel/index.js13
2 files changed, 10 insertions, 6 deletions
diff --git a/ui/app/components/main_panel/account_list.js b/ui/app/components/main_panel/account_list.js
index 36b6c18f..85d6824d 100644
--- a/ui/app/components/main_panel/account_list.js
+++ b/ui/app/components/main_panel/account_list.js
@@ -80,12 +80,13 @@ export default class AccountList extends React.Component {
<Glyphicon glyph="triangle-left" />
</Button>
)
+ let removeDisabled = !this.props.account || this.props.account.authenticated
plusminusButtons = (
<ButtonGroup style={style}>
<Button onClick={this.add} className="btn-inverse">
<Glyphicon glyph="plus" />
</Button>
- <Button disabled={this.props.account == null} onClick={this.askRemove} className="btn-inverse">
+ <Button disabled={removeDisabled} onClick={this.askRemove} className="btn-inverse">
<Glyphicon glyph="minus" />
</Button>
</ButtonGroup>
diff --git a/ui/app/components/main_panel/index.js b/ui/app/components/main_panel/index.js
index 19485358..2949b1b3 100644
--- a/ui/app/components/main_panel/index.js
+++ b/ui/app/components/main_panel/index.js
@@ -50,11 +50,14 @@ export default class MainPanel extends React.Component {
removeAccount(account) {
Account.remove(account).then(
newActiveAccount => {
- console.log(newActiveAccount)
- this.setState({
- account: newActiveAccount,
- accounts: Account.list
- })
+ if (newActiveAccount == null) {
+ App.start()
+ } else {
+ this.setState({
+ account: newActiveAccount,
+ accounts: Account.list
+ })
+ }
},
error => {
console.log(error)