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
|
// For now, log info messages in production for easier debugging of built apps
|
||||||
log.transports.file.level = 'info';
|
log.transports.file.level = 'info';
|
||||||
|
autoUpdater.autoDownload = true;
|
||||||
|
|
||||||
|
|
||||||
// Misc constants
|
// Misc constants
|
||||||
const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest';
|
const LATEST_RELEASE_API_URL = 'https://api.github.com/repos/lbryio/lbry-app/releases/latest';
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { connect } from "react-redux";
|
import { connect } from "react-redux";
|
||||||
|
import { doCloseModal } from "redux/actions/app";
|
||||||
import ModalAutoUpdateDownloaded from "./view";
|
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 {
|
class ModalAutoUpdateDownloaded extends React.PureComponent {
|
||||||
render() {
|
render() {
|
||||||
|
const { closeModal } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
isOpen={true}
|
isOpen={true}
|
||||||
|
type="confirm"
|
||||||
contentLabel={__("Update downloaded")}
|
contentLabel={__("Update downloaded")}
|
||||||
confirmButtonLabel={__("Update and Restart")}
|
confirmButtonLabel={__("Update and Restart")}
|
||||||
|
abortButtonLabel={__("Don't Update")}
|
||||||
onConfirmed={() => {
|
onConfirmed={() => {
|
||||||
ipcRenderer.send("autoUpdate");
|
ipcRenderer.send("autoUpdate");
|
||||||
}}
|
}}
|
||||||
|
onAborted={closeModal}
|
||||||
>
|
>
|
||||||
<section>
|
<section>
|
||||||
<h3 className="text-center">{__("LBRY Leveled Up")}</h3>
|
<h3 className="text-center">{__("LBRY Leveled Up")}</h3>
|
||||||
|
|
Loading…
Reference in a new issue