diff options
author | elijah <elijah@riseup.net> | 2016-11-08 13:56:15 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2016-11-08 13:56:15 -0800 |
commit | 54613799b6277cfaf5636f9a193a70622ba0c0ae (patch) | |
tree | c5d4fa6a9582c675433a4c3da1475a1eed450a18 /ui/app/components/main_panel/account_list.js | |
parent | 9d845e98a2a5cda8aaa22f581e28506a627dca43 (diff) |
ui: disable account remove button when appropriate
Diffstat (limited to 'ui/app/components/main_panel/account_list.js')
-rw-r--r-- | ui/app/components/main_panel/account_list.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/app/components/main_panel/account_list.js b/ui/app/components/main_panel/account_list.js index 36b6c18..85d6824 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> |