mirror of
https://github.com/LBRYFoundation/lbry-desktop.git
synced 2025-09-03 02:35:12 +00:00
Forgot to call quitAndInstall(). If you don't, it will still install the update, but won't restart.
40 lines
1 KiB
JavaScript
40 lines
1 KiB
JavaScript
import React from "react";
|
|
import { Modal } from "modal/modal";
|
|
import { Line } from "rc-progress";
|
|
import Link from "component/link/index";
|
|
|
|
const { ipcRenderer } = require("electron");
|
|
|
|
class ModalAutoUpdateDownloaded extends React.PureComponent {
|
|
render() {
|
|
const { closeModal } = this.props;
|
|
|
|
return (
|
|
<Modal
|
|
isOpen={true}
|
|
type="confirm"
|
|
contentLabel={__("Update downloaded")}
|
|
confirmButtonLabel={__("Update and Restart")}
|
|
abortButtonLabel={__("Don't Update")}
|
|
onConfirmed={() => {
|
|
ipcRenderer.send("autoUpdateAccepted");
|
|
}}
|
|
onAborted={() => {
|
|
ipcRenderer.send("autoUpdateDeclined");
|
|
closeModal();
|
|
}}
|
|
>
|
|
<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;
|