2018-02-24 01:24:00 +01:00
|
|
|
import React from 'react';
|
2018-04-17 00:51:35 +02:00
|
|
|
import { ipcRenderer } from 'electron';
|
2018-02-24 01:24:00 +01:00
|
|
|
import { Modal } from 'modal/modal';
|
2018-03-26 23:32:43 +02:00
|
|
|
import Button from 'component/button';
|
2017-12-08 11:08:50 +01:00
|
|
|
|
|
|
|
class ModalAutoUpdateDownloaded extends React.PureComponent {
|
|
|
|
render() {
|
2018-01-17 11:50:02 +01:00
|
|
|
const { closeModal, declineAutoUpdate } = this.props;
|
2017-12-22 07:42:04 +01:00
|
|
|
|
2017-12-08 11:08:50 +01:00
|
|
|
return (
|
|
|
|
<Modal
|
2018-03-26 23:32:43 +02:00
|
|
|
isOpen
|
2017-12-22 07:42:04 +01:00
|
|
|
type="confirm"
|
2018-02-24 01:24:00 +01:00
|
|
|
contentLabel={__('Update Downloaded')}
|
|
|
|
confirmButtonLabel={__('Use it Now')}
|
|
|
|
abortButtonLabel={__('Upgrade on Close')}
|
2017-12-10 09:06:30 +01:00
|
|
|
onConfirmed={() => {
|
2018-02-24 01:24:00 +01:00
|
|
|
ipcRenderer.send('autoUpdateAccepted');
|
2017-12-10 09:06:30 +01:00
|
|
|
}}
|
2018-01-05 07:29:31 +01:00
|
|
|
onAborted={() => {
|
2018-01-17 11:50:02 +01:00
|
|
|
declineAutoUpdate();
|
2018-02-24 01:24:00 +01:00
|
|
|
ipcRenderer.send('autoUpdateDeclined');
|
2018-01-05 07:29:31 +01:00
|
|
|
closeModal();
|
|
|
|
}}
|
2017-12-08 11:08:50 +01:00
|
|
|
>
|
|
|
|
<section>
|
2018-02-24 01:24:00 +01:00
|
|
|
<h3 className="text-center">{__('LBRY Leveled Up')}</h3>
|
2017-12-08 11:08:50 +01:00
|
|
|
<p>
|
|
|
|
{__(
|
2018-01-13 04:18:55 +01:00
|
|
|
'A new version of LBRY has been released, downloaded, and is ready for you to use pending a restart.'
|
2017-12-08 11:08:50 +01:00
|
|
|
)}
|
|
|
|
</p>
|
2018-04-17 00:51:35 +02:00
|
|
|
<p className="meta text-center">
|
|
|
|
{__('Want to know what has changed?')} See the{' '}
|
|
|
|
<Button
|
|
|
|
button="link"
|
|
|
|
label={__('release notes')}
|
2018-07-12 20:39:12 +02:00
|
|
|
href="https://github.com/lbryio/lbry-desktop/releases"
|
2018-04-17 00:51:35 +02:00
|
|
|
/>.
|
|
|
|
</p>
|
2017-12-08 11:08:50 +01:00
|
|
|
</section>
|
|
|
|
</Modal>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ModalAutoUpdateDownloaded;
|