lbry-desktop/src/renderer/modal/modalAutoUpdateDownloaded/view.jsx

41 lines
1 KiB
React
Raw Normal View History

2017-12-08 11:08:50 +01:00
import React from "react";
import { Modal } from "modal/modal";
import { Line } from "rc-progress";
import Link from "component/link/index";
2017-12-10 09:06:30 +01:00
const { ipcRenderer } = require("electron");
2017-12-08 11:08:50 +01:00
class ModalAutoUpdateDownloaded extends React.PureComponent {
render() {
2017-12-22 07:42:04 +01:00
const { closeModal } = this.props;
2017-12-08 11:08:50 +01:00
return (
<Modal
isOpen={true}
2017-12-22 07:42:04 +01:00
type="confirm"
2017-12-08 11:08:50 +01:00
contentLabel={__("Update downloaded")}
confirmButtonLabel={__("Update and Restart")}
2017-12-22 07:42:04 +01:00
abortButtonLabel={__("Don't Update")}
2017-12-10 09:06:30 +01:00
onConfirmed={() => {
ipcRenderer.send("autoUpdateAccepted");
2017-12-10 09:06:30 +01:00
}}
onAborted={() => {
ipcRenderer.send("autoUpdateDeclined");
closeModal();
}}
2017-12-08 11:08:50 +01:00
>
<section>
<h3 className="text-center">{__("LBRY Leveled Up")}</h3>
<p>
{__(
"A new version of LBRY has been downloaded and is ready to install."
)}
</p>
</section>
</Modal>
);
}
}
export default ModalAutoUpdateDownloaded;