update upgrade message

This commit is contained in:
Jeremy Kauffman 2017-10-03 17:52:53 -04:00
parent 5168cb950c
commit b8980c00d3
5 changed files with 28 additions and 10 deletions

View file

@ -15,6 +15,7 @@ Web UI version numbers should always match the corresponding version of LBRY App
* Updated the daemon from 0.16.1 to [0.16.3](https://github.com/lbryio/lbry/releases/tag/v0.16.3) to improve download performance and download issue detection. * Updated the daemon from 0.16.1 to [0.16.3](https://github.com/lbryio/lbry/releases/tag/v0.16.3) to improve download performance and download issue detection.
* There is no longer a minimum channel length (#645) * There is no longer a minimum channel length (#645)
* Changed the File page to make it clearer how to to open the folder for a file * Changed the File page to make it clearer how to to open the folder for a file
* The upgrade message is now friendlier and includes a link to the release notes.
### Fixed ### Fixed
* Improve layout (and implementation) of the icon panel in file tiles and cards * Improve layout (and implementation) of the icon panel in file tiles and cards

View file

@ -10,6 +10,7 @@ import { doFetchDaemonSettings } from "actions/settings";
import { doBalanceSubscribe } from "actions/wallet"; import { doBalanceSubscribe } from "actions/wallet";
import { doAuthenticate } from "actions/user"; import { doAuthenticate } from "actions/user";
import { doFetchFileInfosAndPublishedClaims } from "actions/file_info"; import { doFetchFileInfosAndPublishedClaims } from "actions/file_info";
import * as modals from "constants/modal_types";
const { remote, ipcRenderer, shell } = require("electron"); const { remote, ipcRenderer, shell } = require("electron");
const path = require("path"); const path = require("path");
@ -96,7 +97,7 @@ export function doDownloadUpgrade() {
dispatch({ dispatch({
type: types.OPEN_MODAL, type: types.OPEN_MODAL,
data: { data: {
modal: "downloading", modal: modals.DOWNLOADING,
}, },
}); });
}; };
@ -140,7 +141,7 @@ export function doCheckUpgradeAvailable() {
dispatch({ dispatch({
type: types.OPEN_MODAL, type: types.OPEN_MODAL,
data: { data: {
modal: "upgrade", modal: modals.UPGRADE,
}, },
}); });
} }
@ -166,7 +167,7 @@ export function doAlertError(errorList) {
dispatch({ dispatch({
type: types.OPEN_MODAL, type: types.OPEN_MODAL,
data: { data: {
modal: "error", modal: modals.ERROR,
modalProps: { error: errorList }, modalProps: { error: errorList },
}, },
}); });

View file

@ -4,6 +4,7 @@ import LoadScreen from "../load_screen.js";
import ModalIncompatibleDaemon from "modal/modalIncompatibleDaemon"; import ModalIncompatibleDaemon from "modal/modalIncompatibleDaemon";
import ModalUpgrade from "modal/modalUpgrade"; import ModalUpgrade from "modal/modalUpgrade";
import ModalDownloading from "modal/modalDownloading"; import ModalDownloading from "modal/modalDownloading";
import * as modals from "constants/modal_types";
export class SplashScreen extends React.PureComponent { export class SplashScreen extends React.PureComponent {
static propTypes = { static propTypes = {
@ -111,8 +112,10 @@ export class SplashScreen extends React.PureComponent {
{modal == "incompatibleDaemon" && {modal == "incompatibleDaemon" &&
this.state.isRunning && this.state.isRunning &&
<ModalIncompatibleDaemon />} <ModalIncompatibleDaemon />}
{modal == "upgrade" && this.state.isRunning && <ModalUpgrade />} {modal == modals.UPGRADE && this.state.isRunning && <ModalUpgrade />}
{modal == "downloading" && this.state.isRunning && <ModalDownloading />} {modal == modals.DOWNLOADING &&
this.state.isRunning &&
<ModalDownloading />}
</div> </div>
); );
} }

View file

@ -103,7 +103,7 @@ class ModalRouter extends React.PureComponent {
render() { render() {
const { modal, modalProps } = this.props; const { modal, modalProps } = this.props;
switch (modal) { switch ("upgrade") {
case modals.UPGRADE: case modals.UPGRADE:
return <ModalUpgrade {...modalProps} />; return <ModalUpgrade {...modalProps} />;
case modals.DOWNLOADING: case modals.DOWNLOADING:

View file

@ -1,5 +1,6 @@
import React from "react"; import React from "react";
import { Modal } from "modal/modal"; import { Modal } from "modal/modal";
import Link from "component/link";
class ModalUpgrade extends React.PureComponent { class ModalUpgrade extends React.PureComponent {
render() { render() {
@ -8,16 +9,28 @@ class ModalUpgrade extends React.PureComponent {
return ( return (
<Modal <Modal
isOpen={true} isOpen={true}
contentLabel={__("Update available")} contentLabel={__("Upgrade available")}
type="confirm" type="confirm"
confirmButtonLabel={__("Upgrade")} confirmButtonLabel={__("Upgrade")}
abortButtonLabel={__("Skip")} abortButtonLabel={__("Skip")}
onConfirmed={downloadUpgrade} onConfirmed={downloadUpgrade}
onAborted={skipUpgrade} onAborted={skipUpgrade}
> >
{__( <h3 className="text-center">{__("LBRY Just Got BTTR")}</h3>
"Your version of LBRY is out of date and may be unreliable or insecure." <br />
)} <p>
{__("An updated version of LBRY is now available.")}
{" "}
{__("Your version is out of date and may be unreliable or insecure.")}
</p>
<p className="meta text-center">
{__("Want to know what has changed?")}
{" "} See the{" "}
<Link
label={__("release notes")}
href="https://github.com/lbryio/lbry-app/releases"
/>.
</p>
</Modal> </Modal>
); );
} }