diff --git a/CHANGELOG.md b/CHANGELOG.md index ef87b8f3d..3a97a6e4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). * Adds Persistence to File List Filter Selections ([#2050](https://github.com/lbryio/lbry-desktop/pull/2050)) ### Changed - * Upgraded to lbrynet v0.30.0 ([#1998](https://github.com/lbryio/lbry-desktop/pull/1998)) * Make tooltip smarter ([#1979](https://github.com/lbryio/lbry-desktop/pull/1979)) * Change channel pages to have 48 items instead of 10 ([#2002](https://github.com/lbryio/lbry-desktop/pull/2002)) * Update to https ([#2016](https://github.com/lbryio/lbry-desktop/pull/2016)) @@ -97,10 +96,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). * Fix middle click link error ([#1843](https://github.com/lbryio/lbry-desktop/issues/1843)} * Problem with search auto-complete menu when scrolling over file viewer ([#1847](https://github.com/lbryio/lbry-desktop/issues/1847)) * Show label when publish button is disabled while uploading thumbnail to spee.ch ([#1867](https://github.com/lbryio/lbry-desktop/pull/1867)) - * Edit option missing from certain published claims ([#1756](https://github.com/lbryio/lbry-desktop/issues/1756)) - * Navigation issue with channels that have more than one page ([#1797](https://github.com/lbryio/lbry-desktop/pull/1797)) - * Navigation issue with channels that have more than one page ([#1797](https://github.com/lbryio/lbry-desktop/pull/1797)) - * Upgrade modals would stack on-top of each other if the app was kept open for a long time ([#1857](https://github.com/lbryio/lbry-desktop/pull/1857)) ### Added * 3D file viewer for OBJ & STL file types ([#1558](https://github.com/lbryio/lbry-desktop/pull/1558)) @@ -119,6 +114,14 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). * More descriptive error message when Shapeshift is unavailable ([#1771](https://github.com/lbryio/lbry-desktop/pull/1771)) * Rename the Github repo to lbry-desktop ([#1765](https://github.com/lbryio/lbry-desktop/pull/1765)) + +### Fixed + * Edit option missing from certain published claims ([#1756](https://github.com/lbryio/lbry-desktop/issues/1756)) + * Navigation issue with channels that have more than one page ([#1797](https://github.com/lbryio/lbry-desktop/pull/1797)) + * Navigation issue with channels that have more than one page ([#1797](https://github.com/lbryio/lbry-desktop/pull/1797)) + * Upgrade modals would stack on-top of each other if the app was kept open for a long time ([#1857](https://github.com/lbryio/lbry-desktop/pull/1857)) + + ## [0.22.2] - 2018-07-09 ### Fixed diff --git a/build/downloadDaemon.js b/build/downloadDaemon.js index 4bb955d4e..4e45f1ad2 100644 --- a/build/downloadDaemon.js +++ b/build/downloadDaemon.js @@ -17,7 +17,7 @@ const downloadDaemon = targetPlatform => let currentPlatform = os.platform(); var daemonPlatform = process.env.TARGET || targetPlatform || currentPlatform; - if (daemonPlatform === 'mac' || daemonPlatform === 'darwin') daemonPlatform = 'mac'; + if (daemonPlatform === 'mac' || daemonPlatform === 'darwin') daemonPlatform = 'macos'; if (daemonPlatform === 'win32' || daemonPlatform === 'windows') { daemonPlatform = 'windows'; daemonFileName = daemonFileName + '.exe'; diff --git a/package.json b/package.json index 4f1b1bc35..0dce4c7e0 100644 --- a/package.json +++ b/package.json @@ -49,8 +49,8 @@ "formik": "^0.10.4", "hast-util-sanitize": "^1.1.2", "keytar": "^4.2.1", - "lbry-redux": "lbryio/lbry-redux#2375860d6269d0369418879c2531b1d48c4e47f2", - "lbryinc": "lbryio/lbryinc#7a458ea13ceceffa0191e73139f94e5c953f22b1", + "lbry-redux": "lbryio/lbry-redux#03aea43da5f12bc01546a92bdf460ebd08681013", + "lbryinc": "lbryio/lbryinc#3f34af546ee73ff2ee7d8ad05e540b3b0aa658fb", "localforage": "^1.7.1", "mammoth": "^1.4.6", "mime": "^2.3.1", @@ -134,9 +134,9 @@ "yarn": "^1.3" }, "lbrySettings": { - "lbrynetDaemonVersion": "0.30.0", - "lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-OSNAME.zip", + "lbrynetDaemonVersion": "0.21.2", + "lbrynetDaemonUrlTemplate": "https://github.com/lbryio/lbry/releases/download/vDAEMONVER/lbrynet-daemon-vDAEMONVER-OSNAME.zip", "lbrynetDaemonDir": "static/daemon", - "lbrynetDaemonFileName": "lbrynet" + "lbrynetDaemonFileName": "lbrynet-daemon" } } diff --git a/src/main/Daemon.js b/src/main/Daemon.js index 326c2d92d..f530f9768 100644 --- a/src/main/Daemon.js +++ b/src/main/Daemon.js @@ -3,7 +3,7 @@ import path from 'path'; import { spawn, execSync } from 'child_process'; export default class Daemon { - static path = process.env.LBRY_DAEMON || path.join(__static, 'daemon/lbrynet'); + static path = process.env.LBRY_DAEMON || path.join(__static, 'daemon/lbrynet-daemon'); subprocess; handlers; @@ -12,12 +12,13 @@ export default class Daemon { } launch() { - this.subprocess = spawn(Daemon.path, ['start']); + console.log('Launching daemon:', Daemon.path); + this.subprocess = spawn(Daemon.path); this.subprocess.stdout.on('data', data => console.log(`Daemon: ${data}`)); this.subprocess.stderr.on('data', data => console.error(`Daemon: ${data}`)); this.subprocess.on('exit', () => this.fire('exit')); - this.subprocess.on('error', error => console.error(`Daemon error: ${error}`)); + this.subprocess.on('error', error => console.error(`Daemon: ${error}`)); } quit() { diff --git a/src/main/index.js b/src/main/index.js index 91a0d41a3..2f19fcd97 100644 --- a/src/main/index.js +++ b/src/main/index.js @@ -64,9 +64,8 @@ if (isDev) { } app.on('ready', async () => { - const processList = await findProcess('name', 'lbrynet'); + const processList = await findProcess('name', 'lbrynet-daemon'); const isDaemonRunning = processList.length > 0; - if (!isDaemonRunning) { daemon = new Daemon(); daemon.on('exit', () => { @@ -96,16 +95,11 @@ app.on('ready', async () => { // HACK: patch webrequest to fix devtools incompatibility with electron 2.x. // See https://github.com/electron/electron/issues/13008#issuecomment-400261941 session.defaultSession.webRequest.onBeforeRequest({}, (details, callback) => { - if (details.url.indexOf('7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33') !== -1) { - callback({ - redirectURL: details.url.replace( - '7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33', - '57c9d07b416b5a2ea23d28247300e4af36329bdc' - ), - }); - } else { - callback({ cancel: false }); - } + if (details.url.indexOf('7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33') !== -1) { + callback({redirectURL: details.url.replace('7accc8730b0f99b5e7c0702ea89d1fa7c17bfe33', '57c9d07b416b5a2ea23d28247300e4af36329bdc')}); + } else { + callback({cancel: false}); + } }); }); diff --git a/src/renderer/component/cardMedia/index.js b/src/renderer/component/cardMedia/index.js index 1f7988712..22c6c0488 100644 --- a/src/renderer/component/cardMedia/index.js +++ b/src/renderer/component/cardMedia/index.js @@ -1,8 +1,3 @@ -import React from 'react'; -import { connect } from 'react-redux'; import CardMedia from './view'; -const select = state => ({}); -const perform = dispatch => ({}); - -export default connect(select, perform)(CardMedia); +export default CardMedia; diff --git a/src/renderer/component/cardVerify/view.jsx b/src/renderer/component/cardVerify/view.jsx index 5d3f3e007..0f3ff4fe0 100644 --- a/src/renderer/component/cardVerify/view.jsx +++ b/src/renderer/component/cardVerify/view.jsx @@ -7,20 +7,6 @@ let scriptLoading = false; let scriptLoaded = false; let scriptDidError = false; -declare class CardVerify { - static stripeHandler: { - open: Function, - close: Function, - }; -} - -declare class StripeCheckout { - static configure({}): { - open: Function, - close: Function, - }; -} - type Props = { disabled: boolean, label: ?string, @@ -41,20 +27,14 @@ type Props = { // token.id can be used to create a charge or customer. // token.email contains the email address entered by the user. token: string, - email: string, }; -type State = { - open: boolean, -}; - -class CardVerifyComponent extends React.Component { - constructor(props: Props) { +class CardVerify extends React.Component { + constructor(props) { super(props); this.state = { open: false, }; - this.onClick = this.onClick.bind(this); } componentDidMount() { @@ -85,14 +65,12 @@ class CardVerifyComponent extends React.Component { scriptDidError = true; scriptLoading = false; reject(event); - this.onScriptError(); + this.onScriptError(event); }; }); const wrappedPromise = new Promise((accept, cancel) => { - promise.then(() => (canceled ? cancel(new Error({ isCanceled: true })) : accept())); - promise.catch( - error => (canceled ? cancel(new Error({ isCanceled: true })) : cancel(error)) - ); + promise.then(() => (canceled ? cancel({ isCanceled: true }) : accept())); + promise.catch(error => (canceled ? cancel({ isCanceled: true }) : cancel(error))); }); return { @@ -105,9 +83,7 @@ class CardVerifyComponent extends React.Component { this.loadPromise.promise.then(this.onScriptLoaded).catch(this.onScriptError); - if (document.body) { - document.body.appendChild(script); - } + document.body.appendChild(script); } componentDidUpdate() { @@ -136,7 +112,7 @@ class CardVerifyComponent extends React.Component { } }; - onScriptError = () => { + onScriptError = (...args) => { throw new Error('Unable to load credit validation script.'); }; @@ -144,23 +120,6 @@ class CardVerifyComponent extends React.Component { this.setState({ open: false }); }; - onClick = () => { - if (scriptDidError) { - throw new Error('Tried to call onClick, but StripeCheckout failed to load'); - } else if (CardVerify.stripeHandler) { - this.showStripeDialog(); - } else { - this.hasPendingClick = true; - } - }; - - loadPromise: { - promise: Promise, - cancel: Function, - }; - - hasPendingClick: boolean; - updateStripeHandler() { if (!CardVerify.stripeHandler) { CardVerify.stripeHandler = StripeCheckout.configure({ @@ -183,6 +142,18 @@ class CardVerifyComponent extends React.Component { }); } + onClick = () => { + if (scriptDidError) { + try { + throw new Error('Tried to call onClick, but StripeCheckout failed to load'); + } catch (x) {} + } else if (CardVerify.stripeHandler) { + this.showStripeDialog(); + } else { + this.hasPendingClick = true; + } + }; + render() { return (