lbry-desktop/src/ui/modal/modalPasswordUnsave/view.jsx

37 lines
943 B
React
Raw Normal View History

2019-08-20 14:29:59 +02:00
// @flow
import React from 'react';
import { Modal } from 'modal/modal';
2019-09-26 18:07:11 +02:00
import { deleteAuthToken } from 'util/saved-passwords';
2019-08-20 14:29:59 +02:00
type Props = {
closeModal: () => void,
};
class ModalPasswordUnsave extends React.PureComponent<Props> {
render() {
return (
<Modal
isOpen
contentLabel={__('Unsave Password')}
title={__('Clear Saved Password')}
type="confirm"
confirmButtonLabel={__('Forget')}
abortButtonLabel={__('Nevermind')}
2019-08-28 04:35:07 +02:00
onConfirmed={() =>
2019-09-26 18:07:11 +02:00
deleteAuthToken().then(() => {
2019-08-28 04:35:07 +02:00
this.props.closeModal();
})
2019-08-20 14:29:59 +02:00
}
onAborted={this.props.closeModal}
>
<p>
{__('You are about to delete your saved password.')}{' '}
{__('Your wallet will still be encrypted, but you will have to remember and enter it manually on startup.')}
</p>
</Modal>
);
}
}
export default ModalPasswordUnsave;