diff --git a/.bumpversion.cfg b/.bumpversion.cfg index a5f60a198..b24d9073c 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,23 @@ [bumpversion] -current_version = 0.1.1 +current_version = 0.9.0rc6 commit = True tag = True +parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? +serialize = + {major}.{minor}.{patch}{release}{candidate} + {major}.{minor}.{patch} + +[bumpversion:file:package.json] + +[bumpversion:part:release] +optional_value = production +values = + rc + production + +[bumpversion:file:CHANGELOG.md] +search = [Unreleased] +replace = [Unreleased] + + \#\# [{new_version}] - {now:%Y-%m-%d} diff --git a/CHANGELOG.md b/CHANGELOG.md index 79341d400..5fdb1be6a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/). -The LBRY Web UI comes bundled as part of [LBRY App](https://github.com/lbryio/lbry-app). Web UI version numbers should always match the corresponding version of LBRY App. +The LBRY Web UI comes bundled as part of [LBRYApp](https://github.com/lbryio/lbry-app). +Web UI version numbers should always match the corresponding version of LBRY App. ## [Unreleased] +### Changed + * Use local file for publishing + * Use local file and html5 for video playback + * Misc changes needed to make UI compatible with electron diff --git a/dist/quit.html b/dist/quit.html new file mode 100644 index 000000000..5bed1d4a9 --- /dev/null +++ b/dist/quit.html @@ -0,0 +1,37 @@ + + + + + LBRY + + + + + + + + + + + + + + + + +
+
+ LBRY +
+

+ Shutting Down + +

+
+
+
+ diff --git a/dist/warning.html b/dist/warning.html new file mode 100644 index 000000000..d82276d94 --- /dev/null +++ b/dist/warning.html @@ -0,0 +1,37 @@ + + + + + LBRY + + + + + + + + + + + + + + + + +
+
+ LBRY +
+

+ The daemon has unexpectedly shutdown. Goodbye. + +

+
+
+
+ diff --git a/js/app.js b/js/app.js index 68c03a648..fdf8b1028 100644 --- a/js/app.js +++ b/js/app.js @@ -1,4 +1,6 @@ import React from 'react'; +import {Line} from 'rc-progress'; + import lbry from './lbry.js'; import SettingsPage from './page/settings.js'; import HelpPage from './page/help.js'; @@ -19,6 +21,11 @@ import Header from './component/header.js'; import Modal from './component/modal.js'; import {Link} from './component/link.js'; + +const {remote, ipcRenderer} = require('electron'); +const {download} = remote.require('electron-dl'); + + var App = React.createClass({ _error_key_labels: { connectionString: 'API connection string', @@ -45,6 +52,7 @@ var App = React.createClass({ modal: null, updateUrl: null, isOldOSX: null, + downloadProgress: null, }; }, componentWillMount: function() { @@ -70,6 +78,9 @@ var App = React.createClass({ } else if (versionInfo.os_system == 'Linux') { var updateUrl = 'https://lbry.io/get/lbry.deb'; } else if (versionInfo.os_system == 'Windows') { + // A little weird, but for electron, the installer is + // actually an exe. Maybe a better url would + // be something like /get/windows ? var updateUrl = 'https://lbry.io/get/lbry.msi'; } else { var updateUrl = 'https://lbry.io/get'; @@ -97,8 +108,18 @@ var App = React.createClass({ }); }, handleUpgradeClicked: function() { - lbry.stop(); - window.location = this.state.updateUrl; + // TODO: create a callback for onProgress and have the UI + // show download progress + // TODO: remove the saveAs popup. Thats just me being lazy and having + // some indication that the download is happening + // TODO: calling lbry.stop() ends up displaying the "daemon + // unexpectedly stopped" page. Have a better way of shutting down + let options = { + onProgress: (p) => this.setState({downloadProgress: Math.round(p * 100)}), + } + download(remote.getCurrentWindow(), this.state.updateUrl, options) + .then(dl => ipcRenderer.send('shutdown')); + this.setState({modal: 'downloading'}); }, handleSkipClicked: function() { sessionStorage.setItem('upgradeSkipped', true); @@ -211,6 +232,11 @@ var App = React.createClass({ : null} + // TODO: have color refence css color-primary + + Downloading Update: {this.state.downloadProgress}% Complete + +

Error

diff --git a/js/component/common.js b/js/component/common.js index afb110871..9e163476c 100644 --- a/js/component/common.js +++ b/js/component/common.js @@ -98,7 +98,7 @@ export let Address = React.createClass({ }); export let Thumbnail = React.createClass({ - _defaultImageUri: '/img/default-thumb.svg', + _defaultImageUri: lbry.imagePath('default-thumb.svg'), _maxLoadTime: 10000, _isMounted: false, diff --git a/js/component/drawer.js b/js/component/drawer.js index c43239345..0f2237ec0 100644 --- a/js/component/drawer.js +++ b/js/component/drawer.js @@ -38,7 +38,7 @@ var Drawer = React.createClass({