diff --git a/packages/app-accounts/src/Account.tsx b/packages/app-accounts/src/Account.tsx index 64c4147a80..8529f9cd8d 100644 --- a/packages/app-accounts/src/Account.tsx +++ b/packages/app-accounts/src/Account.tsx @@ -3,12 +3,11 @@ // of the Apache-2.0 license. See the LICENSE file for details. import { ActionStatus } from '@polkadot/ui-app/Status/types'; -import { I18nProps } from './types'; +import { I18nProps } from '@polkadot/ui-app/types'; -import { Button as SUIB, Popup } from 'semantic-ui-react'; import React from 'react'; import styled from 'styled-components'; -import { AddressSummary, Available, Balance, Bonded, CryptoType, Nonce, Unlocking } from '@polkadot/ui-app'; +import { AddressSummary, Available, Balance, Bonded, Button, CryptoType, Nonce, Unlocking } from '@polkadot/ui-app'; import keyring from '@polkadot/ui-keyring'; import Backup from './modals/Backup'; @@ -22,6 +21,7 @@ type Props = I18nProps & { type State = { isBackupOpen: boolean, + isEditable: boolean, isForgetOpen: boolean, isPasswordOpen: boolean }; @@ -109,6 +109,7 @@ class Account extends React.PureComponent { this.state = { isBackupOpen: false, + isEditable: !(keyring.getAccount(props.address).getMeta().isInjected), isForgetOpen: false, isPasswordOpen: false }; @@ -116,14 +117,17 @@ class Account extends React.PureComponent { render () { const { address } = this.props; + const { isEditable } = this.state; + // FIXME It is a bit heavy-handled switching of being editable here completely + // (and removing the tags, however the keyring cannot save these) return ( {this.renderModals()} { } private renderButtons () { + const { t } = this.props; + const { isEditable } = this.state; + + if (!isEditable) { + return null; + } - // FIXME: The event trigger on='hover' does not work together with the ui-app' - //