Add "auto update downloaded" modal
This commit is contained in:
parent
e39470c3cc
commit
5fff24b0fb
4 changed files with 40 additions and 0 deletions
|
@ -2,6 +2,7 @@ export const CONFIRM_FILE_REMOVE = 'confirmFileRemove';
|
|||
export const INCOMPATIBLE_DAEMON = 'incompatibleDaemon';
|
||||
export const FILE_TIMEOUT = 'file_timeout';
|
||||
export const DOWNLOADING = 'downloading';
|
||||
export const AUTO_UPDATE_DOWNLOADED = "auto_update_downloaded";
|
||||
export const ERROR = 'error';
|
||||
export const INSUFFICIENT_CREDITS = 'insufficient_credits';
|
||||
export const UPGRADE = 'upgrade';
|
||||
|
|
5
src/renderer/modal/modalAutoUpdateDownloaded/index.js
Normal file
5
src/renderer/modal/modalAutoUpdateDownloaded/index.js
Normal file
|
@ -0,0 +1,5 @@
|
|||
import React from "react";
|
||||
import { connect } from "react-redux";
|
||||
import ModalAutoUpdateDownloaded from "./view";
|
||||
|
||||
export default connect(null, null)(ModalAutoUpdateDownloaded);
|
31
src/renderer/modal/modalAutoUpdateDownloaded/view.jsx
Normal file
31
src/renderer/modal/modalAutoUpdateDownloaded/view.jsx
Normal file
|
@ -0,0 +1,31 @@
|
|||
import React from "react";
|
||||
import { Modal } from "modal/modal";
|
||||
import { Line } from "rc-progress";
|
||||
import Link from "component/link/index";
|
||||
|
||||
const { remote } = require("electron");
|
||||
const { autoUpdater } = remote.require("electron-updater");
|
||||
|
||||
class ModalAutoUpdateDownloaded extends React.PureComponent {
|
||||
render() {
|
||||
return (
|
||||
<Modal
|
||||
isOpen={true}
|
||||
contentLabel={__("Update downloaded")}
|
||||
confirmButtonLabel={__("Update and Restart")}
|
||||
onConfirmed={autoUpdater.quitAndInstall()}
|
||||
>
|
||||
<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;
|
|
@ -2,6 +2,7 @@ import React from 'react';
|
|||
import ModalError from 'modal/modalError';
|
||||
import ModalAuthFailure from 'modal/modalAuthFailure';
|
||||
import ModalDownloading from 'modal/modalDownloading';
|
||||
import ModalAutoUpdateDownloaded from "modal/modalAutoUpdateDownloaded";
|
||||
import ModalUpgrade from 'modal/modalUpgrade';
|
||||
import ModalWelcome from 'modal/modalWelcome';
|
||||
import ModalFirstReward from 'modal/modalFirstReward';
|
||||
|
@ -102,6 +103,8 @@ class ModalRouter extends React.PureComponent {
|
|||
return <ModalUpgrade {...modalProps} />;
|
||||
case modals.DOWNLOADING:
|
||||
return <ModalDownloading {...modalProps} />;
|
||||
case modals.AUTO_UPDATE_DOWNLOADED:
|
||||
return <ModalAutoUpdateDownloaded {...modalProps} />;
|
||||
case modals.ERROR:
|
||||
return <ModalError {...modalProps} />;
|
||||
case modals.FILE_TIMEOUT:
|
||||
|
|
Loading…
Reference in a new issue