diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 588405f9c..b541729bc 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.11.0 +current_version = 0.11.3 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? diff --git a/CHANGELOG.md b/CHANGELOG.md index 29f2d5474..e640b44c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,16 @@ Web UI version numbers should always match the corresponding version of LBRY App * * +## [0.11.3] - 2017-05-26 + +### Fixed + * Fixed always showing welcome message on run + * "Fixed" upgrade process + * Version info now shows properly on Help page + * Claim info is properly accessed on Publish page + + + ## [0.11.0] - 2017-05-25 ### Added diff --git a/app/main.js b/app/main.js index 970e2214c..85ee04ca0 100644 --- a/app/main.js +++ b/app/main.js @@ -68,6 +68,7 @@ function checkForNewVersion(callback) { 'User-Agent': `LBRY/${localVersion}`, } }; + const req = https.get(Object.assign(opts, url.parse(LATEST_RELEASE_API_URL)), (res) => { res.on('data', (data) => { result += data; @@ -76,7 +77,6 @@ function checkForNewVersion(callback) { const tagName = JSON.parse(result).tag_name; const [_, remoteVersion] = tagName.match(/^v([\d.]+(?:-?rc\d+)?)$/); if (!remoteVersion) { - console.log('Malformed remote version string:', tagName); if (win) { win.webContents.send('version-info-received', null); } diff --git a/app/package.json b/app/package.json index 2538952cb..d00c85f0a 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.11.0", + "version": "0.11.3", "main": "main.js", "description": "LBRY is a fully decentralized, open-source protocol facilitating the discovery, access, and (sometimes) purchase of data.", "author": { diff --git a/electron.bat b/electron.bat new file mode 100644 index 000000000..e300c90ae --- /dev/null +++ b/electron.bat @@ -0,0 +1,5 @@ +start /min %~dp0node_modules\.bin\electron app + +pause + + diff --git a/ui/js/actions/app.js b/ui/js/actions/app.js index 0f5df575d..9b928c512 100644 --- a/ui/js/actions/app.js +++ b/ui/js/actions/app.js @@ -186,7 +186,7 @@ export function doCheckUpgradeAvailable() { return function(dispatch, getState) { const state = getState() - lbry.getVersionInfo().then(({remoteVersion, upgradeAvailable}) => { + lbry.getAppVersionInfo().then(({remoteVersion, upgradeAvailable}) => { if (upgradeAvailable) { dispatch({ type: types.UPDATE_VERSION, diff --git a/ui/js/component/auth.js b/ui/js/component/auth.js index 12c6d7158..afe6b8066 100644 --- a/ui/js/component/auth.js +++ b/ui/js/component/auth.js @@ -8,7 +8,7 @@ import {RewardLink} from 'component/reward-link'; import {FormRow} from "../component/form.js"; import {CreditAmount, Address} from "../component/common.js"; import {getLocal, setLocal} from '../utils.js'; -import {TYPE_NEW_USER} from '../rewards' +import rewards from '../rewards' class SubmitEmailStage extends React.Component { @@ -288,7 +288,7 @@ export class AuthOverlay extends React.Component { } else { lbryio.call('reward', 'list', {}).then((userRewards) => { userRewards.filter(function(reward) { - return reward.reward_type == TYPE_NEW_USER && reward.transaction_id; + return reward.reward_type == rewards.TYPE_NEW_USER && reward.transaction_id; }).length ? this.setStage(null) : this.setStage("welcome") diff --git a/ui/js/component/downloadingModal/view.jsx b/ui/js/component/downloadingModal/view.jsx index 32c6d030b..053668437 100644 --- a/ui/js/component/downloadingModal/view.jsx +++ b/ui/js/component/downloadingModal/view.jsx @@ -17,7 +17,7 @@ class DownloadingModal extends React.Component { return ( {__("Downloading Update")}{downloadProgress ? `: ${downloadProgress}%` : null} - + {downloadComplete ? (

diff --git a/ui/js/lbry.js b/ui/js/lbry.js index d1fd125e4..b9230ce16 100644 --- a/ui/js/lbry.js +++ b/ui/js/lbry.js @@ -360,7 +360,7 @@ lbry.showMenuIfNeeded = function() { sessionStorage.setItem('menuShown', chosenMenu); }; -lbry.getVersionInfo = function() { +lbry.getAppVersionInfo = function() { return new Promise((resolve, reject) => { ipcRenderer.once('version-info-received', (event, versionInfo) => { resolve(versionInfo) }); ipcRenderer.send('version-info-requested'); diff --git a/ui/js/main.js b/ui/js/main.js index 79c92c7d1..222e71890 100644 --- a/ui/js/main.js +++ b/ui/js/main.js @@ -18,8 +18,7 @@ import {AuthOverlay} from 'component/auth.js'; import { doChangePath, doNavigate, - doDaemonReady, - doHistoryPush + doDaemonReady } from 'actions/app' import { doFetchDaemonSettings diff --git a/ui/js/page/help/view.jsx b/ui/js/page/help/view.jsx index 07e03efc4..9d4d49e46 100644 --- a/ui/js/page/help/view.jsx +++ b/ui/js/page/help/view.jsx @@ -3,6 +3,7 @@ import React from 'react'; import lbry from 'lbry.js'; import Link from 'component/link'; import SubHeader from 'component/subHeader' +import {BusyMessage} from 'component/common' import {version as uiVersion} from 'json!../../../package.json'; class HelpPage extends React.Component { @@ -16,11 +17,16 @@ class HelpPage extends React.Component { } componentWillMount() { - lbry.getVersionInfo((info) => { + lbry.getAppVersionInfo().then((info) => { this.setState({ - versionInfo: info, + appVersionInfo: info, }); }); + lbry.call('version', {}, (info) => { + this.setState({ + versionInfo: info + }) + }) lbry.getSessionInfo((info) => { this.setState({ lbryId: info.lbry_id, @@ -37,7 +43,7 @@ class HelpPage extends React.Component { if (this.state.versionInfo) { ver = this.state.versionInfo; - + console.log(ver) if (ver.os_system == 'Darwin') { osName = (parseInt(ver.os_release.match(/^\d+/)) < 16 ? 'Mac OS X' : 'Mac OS'); @@ -87,14 +93,14 @@ class HelpPage extends React.Component {
{__("Thanks! LBRY is made by its users.")}
- {!ver ? null : -
+

{__("About")}

-
- {ver.lbrynet_update_available || ver.lbryum_update_available ? +
+ {this.state.appVersionInfo ? + (ver.lbrynet_update_available || ver.lbryum_update_available ?

{__("A newer version of LBRY is available.")}

:

{__("Your copy of LBRY is up to date.")}

- } + { ver ? @@ -118,10 +124,11 @@ class HelpPage extends React.Component { -
{this.state.lbryId}
-
-
- } + : + + } + +
); } diff --git a/ui/js/page/publish/view.jsx b/ui/js/page/publish/view.jsx index 91b56d0cc..0e33a4ea6 100644 --- a/ui/js/page/publish/view.jsx +++ b/ui/js/page/publish/view.jsx @@ -206,18 +206,18 @@ class PublishPage extends React.Component { nameResolved: false, }); } else { - const topClaimIsMine = (myClaimInfo && myClaimInfo.claim.amount >= claimInfo.claim.amount); + const topClaimIsMine = myClaimInfo && myClaimInfo.amount >= claimInfo.amount; const newState = { nameResolved: true, - topClaimValue: parseFloat(claimInfo.claim.amount), + topClaimValue: parseFloat(claimInfo.amount), myClaimExists: !!myClaimInfo, - myClaimValue: myClaimInfo ? parseFloat(myClaimInfo.claim.amount) : null, + myClaimValue: myClaimInfo ? parseFloat(myClaimInfo.amount) : null, myClaimMetadata: myClaimInfo ? myClaimInfo.value : null, topClaimIsMine: topClaimIsMine, }; if (topClaimIsMine) { - newState.bid = myClaimInfo.claim.amount; + newState.bid = myClaimInfo.amount; } else if (this.state.myClaimMetadata) { // Just changed away from a name we have a claim on, so clear pre-fill newState.bid = ''; diff --git a/ui/js/reducers/app.js b/ui/js/reducers/app.js index 0662d3483..af99b8a88 100644 --- a/ui/js/reducers/app.js +++ b/ui/js/reducers/app.js @@ -27,7 +27,7 @@ reducers[types.CHANGE_PATH] = function(state, action) { reducers[types.UPGRADE_CANCELLED] = function(state, action) { return Object.assign({}, state, { downloadProgress: null, - downloadComplete: false, + upgradeDownloadComplete: false, modal: null, }) } @@ -35,7 +35,8 @@ reducers[types.UPGRADE_CANCELLED] = function(state, action) { reducers[types.UPGRADE_DOWNLOAD_COMPLETED] = function(state, action) { return Object.assign({}, state, { downloadDir: action.data.dir, - downloadComplete: true, + upgradeDownloading: false, + upgradeDownloadCompleted: true }) } @@ -45,13 +46,6 @@ reducers[types.UPGRADE_DOWNLOAD_STARTED] = function(state, action) { }) } -reducers[types.UPGRADE_DOWNLOAD_COMPLETED] = function(state, action) { - return Object.assign({}, state, { - upgradeDownloading: false, - upgradeDownloadCompleted: true - }) -} - reducers[types.SKIP_UPGRADE] = function(state, action) { sessionStorage.setItem('upgradeSkipped', true); diff --git a/ui/package.json b/ui/package.json index 47e2add1d..bf2d03720 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "lbry-web-ui", - "version": "0.11.0", + "version": "0.11.3", "description": "LBRY UI", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", diff --git a/ui/watch.bat b/ui/watch.bat new file mode 100644 index 000000000..d899c62f9 --- /dev/null +++ b/ui/watch.bat @@ -0,0 +1,33 @@ +rmdir %~dp0node_modules /s /q +rmdir %~dp0..\node_modules /s /q +rmdir %~dp0..\app\node_modules /s /q + +call yarn install + +echo f | xcopy /s /y %~dp0dist %~dp0..\app\dist + +call %~dp0node_modules\.bin\node-sass --output %~dp0..\app\dist\css --sourcemap=none %~dp0scss\ + +start /min %~dp0node_modules\.bin\node-sass --output %~dp0..\app\dist\css --sourcemap=none --watch %~dp0scss\ & + +call %~dp0node_modules\.bin\webpack --config webpack.dev.config.js --progress --colors + +start /min %~dp0node_modules\.bin\webpack --config webpack.dev.config.js --progress --colors --watch + +call yarn build:langs + +cp %~dp0build\lang\en.json %~dp0..\app\dist\lang\en.json + +cd %~dp0..\app + +call yarn install + +cd ..\ + +call yarn install + +start /min %~dp0..\node_modules\.bin\electron app + +exit 0 + + diff --git a/ui/webpack.config.js b/ui/webpack.config.js index fe0a5277b..491a5e4d5 100644 --- a/ui/webpack.config.js +++ b/ui/webpack.config.js @@ -21,7 +21,7 @@ module.exports = { }, plugins: [ new webpack.DefinePlugin({ - ENV: JSON.stringify("development"), + ENV: JSON.stringify("production"), }), ], module: {