diff --git a/CHANGELOG.md b/CHANGELOG.md index cf211e387..03d1754f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,10 +15,30 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/). * Recommended content on file viewer page ([#1845](https://github.com/lbryio/lbry-desktop/pull/1845)) ### Changed - * Pass error message from spee.ch API during thumbnail upload ([#1840](https://github.com/lbryio/lbry-desktop/pull/1840)) - * Use router pattern for rendering file viewer ([#1544](https://github.com/lbryio/lbry-desktop/pull/1544)) - * Missing word "to" added to the Bid Help Text (#1854) - * Updated to electron@2 ([#1858](https://github.com/lbryio/lbry-desktop/pull/1858)) +* Pass error message from spee.ch API during thumbnail upload ([#1840](https://github.com/lbryio/lbry-desktop/pull/1840)) +* Use router pattern for rendering file viewer ([#1544](https://github.com/lbryio/lbry-desktop/pull/1544)) +* Missing word "to" added to the Bid Help Text (#1854) +* Updated to electron@2 ([#1858](https://github.com/lbryio/lbry-desktop/pull/1858)) + +### Fixed + + +## [0.24.0] - 2018-08-04 + +### Fixed + * Issue where the publish page would show "Editing" on a new publish ([#1864](https://github.com/lbryio/lbry-desktop/pull/1864)) + +### Changed + * Upgrade LBRY Protocol to [version 0.21.1](https://github.com/lbryio/lbry/releases/tag/v0.21.1) which should improve download speed and availability. + * Show label when publish button is disabled while uploading thumbnail to spee.ch ([#1867](https://github.com/lbryio/lbry-desktop/pull/1867)) + +## [0.23.1] - 2018-08-01 + +### Fixed + * Fix ShapeShift integration ([#1842](https://github.com/lbryio/lbry-desktop/pull/1842)) + + +## [0.23.0] - 2018-07-25 ### Fixed * **Wallet -> Get Credits** page now shows correct ShapeShift status when it's avialable ([#1836](https://github.com/lbryio/lbry-desktop/issues/1836)) diff --git a/package.json b/package.json index dfae48926..7bbd8b0d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.23.1", + "version": "0.24.0", "description": "A browser for the LBRY network, a digital marketplace controlled by its users.", "keywords": [ "lbry" @@ -132,7 +132,7 @@ "yarn": "^1.3" }, "lbrySettings": { - "lbrynetDaemonVersion": "0.20.4", + "lbrynetDaemonVersion": "0.21.1", "lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-daemon-vDAEMONVER-OSNAME.zip", "lbrynetDaemonDir": "static/daemon", "lbrynetDaemonFileName": "lbrynet-daemon" diff --git a/src/renderer/component/publishForm/view.jsx b/src/renderer/component/publishForm/view.jsx index 5fa4f9a25..76a8a96ff 100644 --- a/src/renderer/component/publishForm/view.jsx +++ b/src/renderer/component/publishForm/view.jsx @@ -258,7 +258,14 @@ class PublishForm extends React.PureComponent { } = this.props; // If they are editing, they don't need a new file chosen - const formValidLessFile = name && !nameError && title && bid && !bidError && tosAccepted && !(uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS); + const formValidLessFile = + name && + !nameError && + title && + bid && + !bidError && + tosAccepted && + !(uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS); return editingURI && !filePath ? isStillEditing && formValidLessFile : formValidLessFile; } @@ -291,6 +298,9 @@ class PublishForm extends React.PureComponent { {uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS &&
{__('Please wait for thumbnail to finish uploading')}
} {!tosAccepted &&
{__('You must agree to the terms of service')}
} + {uploadThumbnailStatus === THUMBNAIL_STATUSES.IN_PROGRESS && ( +
{__('Please wait for thumbnail to finish uploading')}
+ )} {!!editingURI && !isStillEditing && !filePath &&
{__('You need to reselect a file after changing the LBRY URL')}
} diff --git a/src/renderer/component/spinner/view.jsx b/src/renderer/component/spinner/view.jsx index bb44ee6f7..836971041 100644 --- a/src/renderer/component/spinner/view.jsx +++ b/src/renderer/component/spinner/view.jsx @@ -7,16 +7,18 @@ type Props = { dark?: boolean, // always a dark spinner light?: boolean, // always a light spinner theme: string, + type: ?string, }; const Spinner = (props: Props) => { - const { dark, light, theme } = props; + const { dark, light, theme, type } = props; return (
diff --git a/src/renderer/component/splash/internal/load-screen.jsx b/src/renderer/component/splash/internal/load-screen.jsx index 9aff326e4..97d141c9a 100644 --- a/src/renderer/component/splash/internal/load-screen.jsx +++ b/src/renderer/component/splash/internal/load-screen.jsx @@ -2,6 +2,7 @@ import * as React from 'react'; import Icon from 'component/common/icon'; import * as icons from 'constants/icons'; +import Spinner from 'component/spinner'; type Props = { message: string, @@ -33,6 +34,7 @@ class LoadScreen extends React.PureComponent { )} {details &&
{details}
} +
); } diff --git a/src/renderer/component/splash/view.jsx b/src/renderer/component/splash/view.jsx index 504eced07..6659eea49 100644 --- a/src/renderer/component/splash/view.jsx +++ b/src/renderer/component/splash/view.jsx @@ -1,14 +1,17 @@ +// @flow import * as React from 'react'; import { Lbry, MODALS } from 'lbry-redux'; -import LoadScreen from './internal/load-screen'; import ModalWalletUnlock from 'modal/modalWalletUnlock'; import ModalIncompatibleDaemon from 'modal/modalIncompatibleDaemon'; import ModalUpgrade from 'modal/modalUpgrade'; import ModalDownloading from 'modal/modalDownloading'; +import LoadScreen from './internal/load-screen'; type Props = { checkDaemonVersion: () => Promise, notifyUnlockWallet: () => Promise, + daemonVersionMatched: boolean, + onReadyToLaunch: () => void, notification: ?{ id: string, }, @@ -18,7 +21,6 @@ type State = { details: string, message: string, isRunning: boolean, - isLagging: boolean, launchedModal: boolean, }; @@ -27,34 +29,59 @@ export class SplashScreen extends React.PureComponent { super(props); this.state = { - details: __('Starting daemon'), + details: __('Starting up'), message: __('Connecting'), isRunning: false, - isLagging: false, launchedModal: false, }; } + componentDidMount() { + const { checkDaemonVersion } = this.props; + + Lbry.connect() + .then(checkDaemonVersion) + .then(() => { + this.updateStatus(); + }) + .catch(() => { + this.setState({ + message: __('Connection Failure'), + details: __( + 'Try closing all LBRY processes and starting again. If this still happens, your anti-virus software or firewall may be preventing LBRY from connecting. Contact hello@lbry.io if you think this is a software bug.' + ), + }); + }); + } + updateStatus() { Lbry.status().then(status => { - this._updateStatusCallback(status); + this.updateStatusCallback(status); }); } - _updateStatusCallback(status) { + updateStatusCallback(status) { const { notifyUnlockWallet } = this.props; const { launchedModal } = this.state; + if (!status.wallet.is_unlocked) { + this.setState({ + message: __('Unlock Wallet'), + details: __('Please unlock your wallet to proceed.'), + isRunning: true, + }); - const startupStatus = status.startup_status; - if (startupStatus.code === 'started') { + if (launchedModal === false) { + this.setState({ launchedModal: true }, () => notifyUnlockWallet()); + } + return; + } + + if (status.is_running) { // Wait until we are able to resolve a name before declaring // that we are done. // TODO: This is a hack, and the logic should live in the daemon // to give us a better sense of when we are actually started this.setState({ - message: __('Testing Network'), - details: __('Waiting for name resolution'), - isLagging: false, isRunning: true, }); @@ -69,30 +96,23 @@ export class SplashScreen extends React.PureComponent { return; } - if (status.blockchain_status && status.blockchain_status.blocks_behind > 0) { - const format = - status.blockchain_status.blocks_behind == 1 ? '%s block behind' : '%s blocks behind'; + if (status.blockchain_headers && status.blockchain_headers.download_progress < 100) { this.setState({ message: __('Blockchain Sync'), - details: __(format, status.blockchain_status.blocks_behind), - isLagging: startupStatus.is_lagging, + details: `${__('Catching up with the blockchain')} (${ + status.blockchain_headers.download_progress + }%)`, }); - } else if (startupStatus.code === 'waiting_for_wallet_unlock') { + } else if (status.wallet && status.wallet.blocks_behind > 0) { + const format = status.wallet.blocks_behind === 1 ? '%s block behind' : '%s blocks behind'; this.setState({ - message: __('Unlock Wallet'), - details: __('Please unlock your wallet to proceed.'), - isLagging: false, - isRunning: true, + message: __('Blockchain Sync'), + details: __(format, status.wallet.blocks_behind), }); - - if (launchedModal === false) { - this.setState({ launchedModal: true }, () => notifyUnlockWallet()); - } - } else { + } else if (status.wallet && status.wallet.blocks_behind === 0) { this.setState({ - message: __('Network Loading'), - details: startupStatus.message + (startupStatus.is_lagging ? '' : '...'), - isLagging: startupStatus.is_lagging, + message: 'Network Loading', + details: 'Initializing LBRY service...', }); } setTimeout(() => { @@ -100,34 +120,16 @@ export class SplashScreen extends React.PureComponent { }, 500); } - componentDidMount() { - const { checkDaemonVersion } = this.props; - - Lbry.connect() - .then(checkDaemonVersion) - .then(() => { - this.updateStatus(); - }) - .catch(() => { - this.setState({ - isLagging: true, - message: __('Connection Failure'), - details: __( - 'Try closing all LBRY processes and starting again. If this still happens, your anti-virus software or firewall may be preventing LBRY from connecting. Contact hello@lbry.io if you think this is a software bug.' - ), - }); - }); - } - render() { const { notification } = this.props; - const { message, details, isLagging, isRunning } = this.state; + const { message, details, isRunning } = this.state; const notificationId = notification && notification.id; + // {notificationId === MODALS.WALLET_UNLOCK && } return ( - + {/* Temp hack: don't show any modals on splash screen daemon is running; daemon doesn't let you quit during startup, so the "Quit" buttons in the modals won't work. */} diff --git a/src/renderer/page/help/view.jsx b/src/renderer/page/help/view.jsx index ce92cc1e3..597d067b2 100644 --- a/src/renderer/page/help/view.jsx +++ b/src/renderer/page/help/view.jsx @@ -65,9 +65,9 @@ class HelpPage extends React.PureComponent { versionInfo: info, }); }); - Lbry.status({ session_status: true }).then(info => { + Lbry.status().then(info => { this.setState({ - lbryId: info.lbry_id, + lbryId: info.installation_id, }); }); diff --git a/src/renderer/scss/component/_spinner.scss b/src/renderer/scss/component/_spinner.scss index bdeda87ab..d6e4cb937 100644 --- a/src/renderer/scss/component/_spinner.scss +++ b/src/renderer/scss/component/_spinner.scss @@ -42,6 +42,14 @@ } } +.spinner--splash { + margin-top: $spacing-vertical; + + .rect { + background-color: var(--color-white); + } +} + @keyframes sk-stretchdelay { 0%, 40%,