diff --git a/packages/app-accounts/src/ChangePass.tsx b/packages/app-accounts/src/ChangePass.tsx new file mode 100644 index 0000000000..546f6cbdd6 --- /dev/null +++ b/packages/app-accounts/src/ChangePass.tsx @@ -0,0 +1,164 @@ +// Copyright 2017-2018 @polkadot/app-accounts authors & contributors +// This software may be modified and distributed under the terms +// of the ISC license. See the LICENSE file for details. + +import { KeyringPair } from '@polkadot/util-keyring/types'; +import { I18nProps } from '@polkadot/ui-app/types'; + +import React from 'react'; +import Button from '@polkadot/ui-app/Button'; +import Modal from '@polkadot/ui-app/Modal'; +import Password from '@polkadot/ui-app/Password'; +import AddressSummary from '@polkadot/ui-app/AddressSummary'; +import keyring from '@polkadot/ui-keyring/index'; + +import translate from './translate'; + +type Props = I18nProps & { + account: KeyringPair, + onClose: () => void +}; + +type State = { + isNewValid: boolean, + isOldValid: boolean, + newPass: string, + oldPass: string +}; + +class ChangePass extends React.PureComponent { + state: State; + + constructor (props: Props) { + super(props); + + this.state = { + isNewValid: false, + isOldValid: false, + newPass: '', + oldPass: '' + }; + } + + render () { + return ( + + {this.renderContent()} + {this.renderButtons()} + + ); + } + + private renderButtons () { + const { onClose, t } = this.props; + const { isNewValid, isOldValid } = this.state; + + return ( + + +