Add ability to decline updates
This commit is contained in:
parent
acec4a745f
commit
bc15d24d66
3 changed files with 13 additions and 1 deletions
|
@ -21,6 +21,8 @@ const isDevelopment = process.env.NODE_ENV === 'development';
|
|||
|
||||
// For now, log info messages in production for easier debugging of built apps
|
||||
log.transports.file.level = 'info';
|
||||
autoUpdater.autoDownload = true;
|
||||
|
||||
|
||||
// Misc constants
|
||||
const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest';
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import { doCloseModal } from "redux/actions/app";
|
||||
import ModalAutoUpdateDownloaded from "./view";
|
||||
|
||||
export default connect(null, null)(ModalAutoUpdateDownloaded);
|
||||
const perform = dispatch => ({
|
||||
closeModal: () => dispatch(doCloseModal()),
|
||||
});
|
||||
|
||||
export default connect(null, perform)(ModalAutoUpdateDownloaded);
|
||||
|
|
|
@ -7,14 +7,19 @@ 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("autoUpdate");
|
||||
}}
|
||||
onAborted={closeModal}
|
||||
>
|
||||
<section>
|
||||
<h3 className="text-center">{__("LBRY Leveled Up")}</h3>
|
||||
|
|
Loading…
Reference in a new issue