diff --git a/.bumpversion.cfg b/.bumpversion.cfg index c8cf85307..1143fe2b5 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.12.2rc5 +current_version = 0.12.2rc3 commit = True tag = True parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?P[a-z]+)(?P\d+))? @@ -18,9 +18,5 @@ values = [bumpversion:file:app/package.json] -[bumpversion:file:app/package-lock.json] - [bumpversion:file:ui/package.json] -[bumpversion:file:ui/package-lock.json] - diff --git a/.gitignore b/.gitignore index cee0d61d1..022473023 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,6 @@ -/node_modules -/LBRY-darwin-x64 -/dist - -/ui/dist/css/* -/ui/dist/js/* -!/ui/dist/js/mediaelement -/ui/node_modules -/ui/.sass-cache - +node_modules +LBRY-darwin-x64 +dist /app/dist /app/node_modules diff --git a/.travis.yml b/.travis.yml index 9676d6e89..36a29909e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,28 +1,20 @@ -env: - global: - - TRANSIFEX_USER: api - - secure: u6gwnZlPGJLnvpoPPCpUZ+jBPajQuIW1+aq6UGW57z54AUjTAECxaYpqcGTGtDBjYark/yeiso887wP/EmJva7hMHeNMf6uLqwzP3YFsIv/Iv+9c1f4MXbJNgOrEKN834o/BdkD4ifi9CCiH9uPPVYGPx1bvfaxGpcHmQXdW4F4S0uj+jePB257mt+afGiNlz9wET6kWJKNNZf/4BNmefldVNq7h6oTSLsyO1TBhDcvSjatpKIwmXUNQfSUTFWvrtpWUB/m/IzitGuUtrt82vU2fPl7tuH6BHNrNp58MINjFzXXJLC+mMybb2UBDIAuc3+k7vj4J0U2rkcTloxDNCKNmYa1jBogOKBRgGp98Ct7E0V2vuLGAPniUbvBcCGK1wwed7uwDjsz3YNCGxUEcyyWc3OVDgN/up4+gXHxkh9FTpZy8Q3rSZx4Lwj700impBUQIVh/5p7Vgv+bSUdOeVRAMlcP9yT83jX50w9LkJMfICFPNv1tOZ3/SOnnB+JdW/ahpplFI4Z68/fBLttZTeaNcU4f28oJvPer8Wll+Elx5kxwLqLbwVUFNlxTxY1LYnPB7SPjGxrFNy3mVTRq5Pxp1hMiTZF4TlapkfHgR+gEzk2wpcJGmub70tW2baZaJF0jDBWIh7GXV+EGve53BKDhpX2Z6jTK0gkhrSUW1MT8= - - secure: h1r9Qzv2xHRQl7nDHcscB4qDv7KlF/ncgHko1YuoY4oLZipBV8mzQXDmn3nlMKwaKOe1/Tty/bjoZexkWict4cwKBzU7/1HtJeMa6nxRICuS6DiVhLUNGZEddK6jQLxeEZFxkFPSCZyjybPWtasF8f8jd0lqqLIL4/FcIVV56aRCKAsUwCbedxi8Vnc19l74xjaQIK82xBFYOQPK078OBovk9DDOnicTjMulUo3/pKEZD1njSdcEhfSRv+MFE+31B/a6lpoLo7twPlyzLMfpo30NlEzIN0TeMAk44e4PV6DYg0wntC2GJ21p4BqMnDGocwnZwm7gpjflzUZdW6hF0esGLcqOdbyJLUb3rNX9AzQmn0p9KwDC3S80peZFxSiuLJGL8eivceVDUK/jwWinu3OHDJ/eO5iMDm9odm2ALemPtrDTSlRNT8HzNCY9PQTU9Dhdm4Q/dGDsRPWibFJSJ/qGKhVgadk2CUEAPua0hB1zZ556PkTGx4R1JDscgFDAkgemzgKl4Z/4qK3xGDoEtz1HmBlvQtn+B/PuhA2essADj0iTDiItxb7AYTA7EzsHEcRMmrbYarZ3Eh2onWy2GOpAGRN5Xl9cBIDbibcSC6BLI1m2PcLABpP7DhUX4bJbsVNSiGesHEU7o9Dgn8Ig09eHW/8F9i0VVoGUZXxKMJ8= +matrix: + include: + - os: osx + # Use generic language for osx + # python 2.7 is broken on osx on travis, so follow we have to specify the installation ourselves + # https://github.com/travis-ci/travis-ci/issues/2312#issuecomment-195620855 + language: generic + osx_image: xcode7.3 -os: linux -dist: xenial - -#branches: -# only: -# - "/^v\\d+\\.\\d+\\.\\d+$/" install: -- rvm install 2.3.1 - -script: -- rvm use 2.3.1 && gem install danger --version '~> 4.0' && danger -- FULL_BUILD=true ./build.sh - -sudo: required -after_success: -- pip install virtualenv -- virtualenv ~/env -- source ~/env/bin/activate -- pip install transifex-client -- sudo echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nusername= '"$TRANSIFEX_USER"$'\npassword = '"$TRANSIFEX_PASSWORD"$'\ntoken = '"$TRANSIFEX_API_TOKEN"$'\n' > ~/.transifexrc -- tx push -s + - wget https://www.python.org/ftp/python/2.7.13/python-2.7.13-macosx10.6.pkg + - sudo installer -pkg python-2.7.13-macosx10.6.pkg -target / + - pip install -U pip + - pip install pyinstaller + - wget https://nodejs.org/dist/v6.9.4/node-v6.9.4.pkg + - sudo installer -pkg node-v6.9.4.pkg -target / + - sudo npm install electron-packager -g + - ./build.sh + - electron-packager --electron-version=1.4.14 --overwrite electron LBRY diff --git a/.tx/config b/.tx/config deleted file mode 100644 index 8979a5b32..000000000 --- a/.tx/config +++ /dev/null @@ -1,8 +0,0 @@ -[main] -host = https://www.transifex.com - -[lbry-app.app-strings] -file_filter = app/dist/locales/.json -source_file = app/dist/locales/en.json -source_lang = en -type = KEYVALUEJSON diff --git a/CHANGELOG.md b/CHANGELOG.md index beef797e9..f98234a7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,19 +9,15 @@ Web UI version numbers should always match the corresponding version of LBRY App ## [Unreleased] ### Added * State is persisted through app close and re-open, resulting in faster opens - * Support webm, ogg, m4v, and a few others - * Translations added to build process ### Changed * Upgraded to lbry daemon 0.13, including updating API signatures * Channels resolve much faster * Resolve is no longer cancelled on navigate - * Updated API and authentication used by rewards process ### Fixed * Fix help menu force reloading whole app * Show page updates correctly when navigating from show page to another show page - * URI handling navigates to correct page if app is closed ### Deprecated * diff --git a/app/package-lock.json b/app/package-lock.json index ece7eeafe..9ac1f3774 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.12.2rc5", + "version": "0.12.0", "lockfileVersion": 1, "dependencies": { "commander": { @@ -155,8 +155,7 @@ }, "dezalgo": { "version": "1.0.3", - "resolved": "https://registry.npmjs.org/dezalgo/-/dezalgo-1.0.3.tgz", - "integrity": "sha1-f3Qt4Gb8dIvI24IFad3c5Jvw1FY=" + "bundled": true }, "editor": { "version": "1.0.0", @@ -526,8 +525,7 @@ }, "normalize-git-url": { "version": "3.0.2", - "resolved": "https://registry.npmjs.org/normalize-git-url/-/normalize-git-url-3.0.2.tgz", - "integrity": "sha1-jl8Uvgva7bc+ByADEKpBbCc1D8Q=" + "bundled": true }, "normalize-package-data": { "version": "2.3.8", @@ -551,8 +549,7 @@ }, "npm-install-checks": { "version": "3.0.0", - "resolved": "https://registry.npmjs.org/npm-install-checks/-/npm-install-checks-3.0.0.tgz", - "integrity": "sha1-1K7N/VGlPjcjt7L5Oy7ijjB7wNc=" + "bundled": true }, "npm-package-arg": { "version": "4.2.1", @@ -720,8 +717,7 @@ }, "core-util-is": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + "bundled": true }, "isarray": { "version": "1.0.0", @@ -747,8 +743,7 @@ }, "realize-package-specifier": { "version": "3.0.3", - "resolved": "https://registry.npmjs.org/realize-package-specifier/-/realize-package-specifier-3.0.3.tgz", - "integrity": "sha1-0N74gpUrjeP2frpekRmWYScfQfQ=" + "bundled": true }, "request": { "version": "2.81.0", @@ -1069,8 +1064,7 @@ "dependencies": { "unique-slug": { "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.0.tgz", - "integrity": "sha1-22Z258fMBimHj/GWCXx4hVrp9Ks=" + "bundled": true } } }, @@ -1426,8 +1420,7 @@ }, "spdx-license-ids": { "version": "1.2.0", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-1.2.0.tgz", - "integrity": "sha1-tUndD2Pct0Whfi6joHQC4OMy0eI=" + "bundled": true } } } diff --git a/app/package.json b/app/package.json index 2a01c01c7..b9a7cd69f 100644 --- a/app/package.json +++ b/app/package.json @@ -1,6 +1,6 @@ { "name": "LBRY", - "version": "0.12.2rc5", + "version": "0.12.2rc3", "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/build/DAEMON_URL b/build/DAEMON_URL index b3b581882..3df4e528f 100644 --- a/build/DAEMON_URL +++ b/build/DAEMON_URL @@ -1 +1 @@ -https://github.com/lbryio/lbry/releases/download/v0.13.1/lbrynet-daemon-v0.13.1-OSNAME.zip +https://github.com/lbryio/lbry/releases/download/v0.13.1rc1/lbrynet-daemon-v0.13.1rc1-OSNAME.zip diff --git a/build/build.ps1 b/build/build.ps1 index 0199853e0..5add85a3a 100644 --- a/build/build.ps1 +++ b/build/build.ps1 @@ -13,13 +13,6 @@ cd .. # build ui cd ui npm install - -# necessary to ensure native Node modules (e.g. keytar) are built against the correct version of Node) -# yes, it needs to be run twice. it fails the first time, not sure why -node_modules\.bin\electron-rebuild -node_modules\.bin\electron-rebuild - -node extractLocals.js node_modules\.bin\node-sass --output dist\css --sourcemap=none scss\ node_modules\.bin\webpack Copy-Item dist ..\app\ -recurse diff --git a/build/build.sh b/build/build.sh index 9019a88be..e3a6fffe6 100755 --- a/build/build.sh +++ b/build/build.sh @@ -45,13 +45,6 @@ if [ "$FULL_BUILD" == "true" ]; then python "$BUILD_DIR/set_version.py" fi -libsecret="libsecret-1-dev" -if $LINUX && [ -z "$(dpkg-query --show --showformat='${Status}\n' "$libsecret" 2>/dev/null | grep "install ok installed")" ]; then - # this is needed for keytar, which does secure password/token management - sudo apt-get install --no-install-recommends -y "$libsecret" -fi - - [ -d "$ROOT/dist" ] && rm -rf "$ROOT/dist" mkdir -p "$ROOT/dist" [ -d "$ROOT/app/dist" ] && rm -rf "$ROOT/app/dist" @@ -68,16 +61,6 @@ npm install ( cd "$ROOT/ui" npm install - - # necessary to ensure native Node modules (e.g. keytar) are built against the correct version of Node) - # yes, it needs to be run twice. it fails the first time, not sure why - set +e - # DEBUG=electron-rebuild node_modules/.bin/electron-rebuild . - node_modules/.bin/electron-rebuild "$ROOT/ui" - set -e - node_modules/.bin/electron-rebuild "$ROOT/ui" - - node extractLocals.js node_modules/.bin/node-sass --output dist/css --sourcemap=none scss/ node_modules/.bin/webpack cp -r dist/* "$ROOT/app/dist/" diff --git a/package-lock.json b/package-lock.json index 4b354044d..4e178ac4f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,12 @@ { "lockfileVersion": 1, "dependencies": { + "@types/node": { + "version": "7.0.31", + "resolved": "https://registry.npmjs.org/@types/node/-/node-7.0.31.tgz", + "integrity": "sha512-+KrE1LDddn97ip+gXZAnzNQ0pupKH/6tcKwTpo96BDVNpzmhIKGHug0Wd3H0dN4WEqYB1tXYI5m2mZuIZNI8tg==", + "dev": true + }, "7zip-bin": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/7zip-bin/-/7zip-bin-2.1.0.tgz", diff --git a/ui/.gitignore b/ui/.gitignore new file mode 100644 index 000000000..789fcf4f3 --- /dev/null +++ b/ui/.gitignore @@ -0,0 +1,7 @@ +dist/css/* +dist/js/* +!dist/js/mediaelement +node_modules +.sass-cache +.idea +.DS_Store diff --git a/ui/.travis.yml b/ui/.travis.yml new file mode 100644 index 000000000..b1ad37013 --- /dev/null +++ b/ui/.travis.yml @@ -0,0 +1,35 @@ +language: node_js +node_js: 5 + +# note that travis still builds PRs so that covers +# other branches +branches: + only: + - master + - development + +install: + - rvm install 2.3.1 + - npm install + +script: + - rvm use 2.3.1 && gem install danger --version '~> 4.0' && danger + - mkdir -p dist/css dist/js + - node_modules/.bin/node-sass scss/all.scss dist/css/all.css + - node_modules/.bin/webpack + - mkdir upload + - cd dist; zip -r ../upload/dist.zip *; cd - + - .travis/echo_sha.sh > upload/data.json + +deploy: + provider: s3 + access_key_id: + secure: "LjqvQ2MQj8fbumcnIKZC5wa03s3SIAnaLdOrmi7uRcltKIMko20QluRlpXipmYLdDRBg9sZrGgHJzN2QMZBk29XDsPhnFTG5Mhnaf9Ycxac2dy6FABtarNXjEOSH6Vv+Z96W8NkNTly7Okgyg0lXylTi1rLm/JxW14z+SrDPBOVPx5i4Wemd/y4Qx/5Oy611jaZIC4tExL+KWLCfX6tCgg1iE1vnJ22DAjNVlUOmZrLpuhuz/d/4mgkjtZvHAENDPmTItoN6WXxWPspMuaBaSMsj5OuhXqfro8BygbalWfUN7bSMvCqvO+irC6PBeZ4ntq675fS6g9Xb0vzZ6KnNck40PdHXdZRb4wvseqphCL4Xy9cLgUfND3GhxDtStJlqpMeaCg5Yjd9JknQjfCteObLqVeHyjIbWUNsQlyyQcgrVdAQRQiImG+do5qWQXC/02YqxffGJxW/6iQUC/TqC6vNoTKbMSVlccHExt9wnoooZ8D7MT7oN4BCk8bw+G/momH03hGoI0xffcVM9mN+y4z3/BbDX+bn/H5J2cmGWVFZHcOcbY+ehsTmdcqmm+KeePIpKmP6bD7waSUp+czXMgAgfjlWKuzmOFVxvlTo/rLzj5NlIH35RtIKOoVjU8kHzYI1aWAKIHNTHHrUJp4aVYeYGw5y2oejaHnO0ltmVoog=" + secret_access_key: + secure: "cAWUhKK+2//JBmV2ohcLs3WTDgDWAMK2RxDrwTqUBEeOdAHMRnEVR++a7fzEL+2dcYi939ZaynNXS5JFJANdjIEKmSWDtvyszyl5MWH0xERZtD0K0xs9bNXS8Un6UrTxhaatmQmqx0KokdUmdH5iqB02BBCKLuwGEjMcUVbadXkp+F8Pd4EXmDPbYHQ2eNo87FzQ7dCQ+GOyQBDNM1Orq+hOKiqJOzB9sDWKShsMTeq5Hyb1oji3cAxTyi6niJ/M/46NokLrPT0xrJLxy+sw5k2106SJXyofJsW1UVOsa5Nxx/suJTv2D0E6d7Ei1XYNnkAbDltu1m9wMq2xqLyoxfdvcC7bxr/NcUZ+DTCKcsM5oa8CiL/y+sOpB8ia0CjO3WBebIUWQAhyswQb312rYsbfQXscb5TnheS+wo4Z1MLse7fSm6jzZRZwqGi27GxC7SFWkSkBwHgaQ8tA7mzsdi6DFmz/KrnwgzqzFRkGg9d0RNXVfUN09p0GJr9drVS1DscVYWGhhD1eDKAIEaEd89u0vKF83zLk73UuNVZA38kkERtLwv7Yr1rRdftL3/gt6fMiW//JQB9sRWV0fDfiWbV2vaki6c/0s6moX00UBuZq21FEpx8puylUOwkXNlQK6TH/bw41ikrRMO156njokYOwLgQaebI/Mb0Cwi32gOU=" + bucket: lbry-ui + skip_cleanup: true + upload-dir: ${TRAVIS_BRANCH} + local_dir: upload + on: + all_branches: true diff --git a/ui/.travis/echo_sha.sh b/ui/.travis/echo_sha.sh new file mode 100755 index 000000000..e3ca8d762 --- /dev/null +++ b/ui/.travis/echo_sha.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +# this is a script instead of a line in the travis.yml +# getting the quoting on this correctly inside the yaml is +# unreadable and difficult + +echo '{"sha": "'${TRAVIS_COMMIT}'"}' diff --git a/Dangerfile b/ui/Dangerfile similarity index 100% rename from Dangerfile rename to ui/Dangerfile diff --git a/ui/LICENSE.md b/ui/LICENSE.md new file mode 100644 index 000000000..ee8b246ea --- /dev/null +++ b/ui/LICENSE.md @@ -0,0 +1 @@ +See https://github.com/lbryio/lbry/blob/master/LICENSE diff --git a/ui/extractLocals.js b/ui/extractLocals.js index b36e3e9d4..f67d123e2 100644 --- a/ui/extractLocals.js +++ b/ui/extractLocals.js @@ -1,48 +1,48 @@ -var extract = require("i18n-extract"); -const fs = require("fs"); +var extract = require('i18n-extract'); +const fs = require('fs'); -var dir = __dirname + "/../app/dist/locales"; -var path = dir + "/en.json"; +var path = '../app/dist/locales/en.json'; -if (!fs.existsSync(dir)) { - fs.mkdirSync(dir); -} +fs.writeFile(path, '{}', 'utf8', function(err) { + if(err) { + return console.log(err); + } + var enLocale = require(path); -fs.writeFile(path, "{}", "utf8", function(err) { - if (err) { - return console.log(err); - } - var enLocale = require(path); - - const keys = extract.extractFromFiles(["js/**/*.{js,jsx}"], { - marker: "__", - }); - - let reports = []; - reports = reports.concat(extract.findMissing(enLocale, keys)); - - if (reports.length > 0) { - fs.readFile(path, "utf8", function readFileCallback(err, data) { - if (err) { - console.log(err); - } else { - localeObj = JSON.parse(data); - - for (var i = 0; i < reports.length; i++) { - // no need to care for other types than MISSING because starting file will always be empty - if (reports[i].type === "MISSING") { - localeObj[reports[i].key] = reports[i].key; - } - } - - var json = JSON.stringify(localeObj, null, "\t"); //convert it back to json-string - fs.writeFile(path, json, "utf8", function callback(err) { - if (err) { - throw err; - } - console.log("Extracted all strings!"); - }); - } + const keys = extract.extractFromFiles(['js/**/*.{js,jsx}'], { + marker: '__', }); - } -}); + + let reports = []; + reports = reports.concat(extract.findMissing(enLocale, keys)); + + if (reports.length > 0) { + fs.readFile(path, 'utf8', function readFileCallback(err, data){ + if (err){ + console.log(err); + } else { + localeObj = JSON.parse(data); + + for (var i = 0; i < reports.length; i++) { + // no need to care for other types than MISSING because starting file will always be empty + if (reports[i].type === 'MISSING') { + localeObj[reports[i].key] = reports[i].key; + } + } + + var json = JSON.stringify(localeObj, null, '\t'); //convert it back to json-string + fs.writeFile(path, json, 'utf8', function callback(err) { + if (err) throw err; + console.log('Extracted all strings!'); + }); + } + }); + } +}); + + + + + + + diff --git a/ui/js/actions/app.js b/ui/js/actions/app.js index 9657b8756..d82c51606 100644 --- a/ui/js/actions/app.js +++ b/ui/js/actions/app.js @@ -225,6 +225,7 @@ export function doDaemonReady() { dispatch({ type: types.DAEMON_READY, }); + dispatch(doChangePath("/discover")); dispatch(doFetchDaemonSettings()); dispatch(doFileList()); }; diff --git a/ui/js/actions/rewards.js b/ui/js/actions/rewards.js index 34254ab3f..14a2a8253 100644 --- a/ui/js/actions/rewards.js +++ b/ui/js/actions/rewards.js @@ -77,7 +77,7 @@ export function doClaimReward(reward, saveError = false) { export function doClaimEligiblePurchaseRewards() { return function(dispatch, getState) { - if (!lbryio.enabled) { + if (!lbryio.enabled || !lbryio.getAccessToken()) { return; } diff --git a/ui/js/actions/user.js b/ui/js/actions/user.js index 662521617..972e167eb 100644 --- a/ui/js/actions/user.js +++ b/ui/js/actions/user.js @@ -33,20 +33,20 @@ export function doUserFetch() { dispatch({ type: types.USER_FETCH_STARTED, }); - lbryio - .getCurrentUser() - .then(user => { + lbryio.setCurrentUser( + user => { dispatch({ type: types.USER_FETCH_SUCCESS, data: { user }, }); - }) - .catch(error => { + }, + error => { dispatch({ type: types.USER_FETCH_FAILURE, data: { error }, }); - }); + } + ); }; } @@ -56,37 +56,32 @@ export function doUserEmailNew(email) { type: types.USER_EMAIL_NEW_STARTED, email: email, }); - lbryio - .call( - "user_email", - "new", - { email: email, send_verification_email: true }, - "post" - ) - .catch(error => { - if (error.xhr && error.xhr.status == 409) { - return lbryio.call( - "user_email", - "resend_token", - { email: email, only_if_expired: true }, - "post" - ); - } - throw error; - }) - .then(() => { + lbryio.call("user_email", "new", { email }, "post").then( + () => { dispatch({ type: types.USER_EMAIL_NEW_SUCCESS, data: { email }, }); dispatch(doUserFetch()); - }) - .catch(error => { - dispatch({ - type: types.USER_EMAIL_NEW_FAILURE, - data: { error: error.message }, - }); - }); + }, + error => { + if ( + error.xhr && + (error.xhr.status == 409 || + error.message == "This email is already in use") + ) { + dispatch({ + type: types.USER_EMAIL_NEW_EXISTS, + data: { email }, + }); + } else { + dispatch({ + type: types.USER_EMAIL_NEW_FAILURE, + data: { error: error.message }, + }); + } + } + ); }; } diff --git a/ui/js/app.js b/ui/js/app.js index 41701ee18..1f1f32ecd 100644 --- a/ui/js/app.js +++ b/ui/js/app.js @@ -1,27 +1,27 @@ -import store from "store.js"; -import lbry from "./lbry.js"; +import store from 'store.js'; +import lbry from './lbry.js'; const env = ENV; const config = require(`./config/${env}`); -const language = lbry.getClientSetting("language") - ? lbry.getClientSetting("language") - : "en"; -const i18n = require("y18n")({ - directory: "app/locales", - updateFiles: false, - locale: language, +const language = lbry.getClientSetting('language') + ? lbry.getClientSetting('language') + : 'en'; +const i18n = require('y18n')({ + directory: 'app/locales', + updateFiles: false, + locale: language }); const logs = []; const app = { - env: env, - config: config, - store: store, - i18n: i18n, - logs: logs, - log: function(message) { - console.log(message); - logs.push(message); - }, + env: env, + config: config, + store: store, + i18n: i18n, + logs: logs, + log: function(message) { + console.log(message); + logs.push(message); + } }; window.__ = i18n.__; diff --git a/ui/js/component/filePrice/index.js b/ui/js/component/filePrice/index.js index be675d924..aa8f692aa 100644 --- a/ui/js/component/filePrice/index.js +++ b/ui/js/component/filePrice/index.js @@ -4,9 +4,11 @@ import { doFetchCostInfoForUri } from "actions/cost_info"; import { makeSelectCostInfoForUri, makeSelectFetchingCostInfoForUri, -} from "selectors/cost_info"; -import { makeSelectClaimForUri } from "selectors/claims"; -import FilePrice from "./view"; +} from 'selectors/cost_info' +import { + makeSelectClaimForUri, +} from 'selectors/claims' +import FilePrice from './view' const makeSelect = () => { const selectCostInfoForUri = makeSelectCostInfoForUri(); diff --git a/ui/js/component/userEmailVerify/view.jsx b/ui/js/component/userEmailVerify/view.jsx index 5aa656a61..bf6e9605e 100644 --- a/ui/js/component/userEmailVerify/view.jsx +++ b/ui/js/component/userEmailVerify/view.jsx @@ -46,9 +46,7 @@ class UserEmailVerify extends React.PureComponent { {/* render help separately so it always shows */}

- {__("Email")}{" "} - {" "} - {__("if you did not receive or are having trouble with your code.")} + {__("Email")} {__("if you did not receive or are having trouble with your code.")}

diff --git a/ui/js/component/welcomeModal/view.jsx b/ui/js/component/welcomeModal/view.jsx index 9b6930bc6..2e71f9e3e 100644 --- a/ui/js/component/welcomeModal/view.jsx +++ b/ui/js/component/welcomeModal/view.jsx @@ -13,16 +13,12 @@ class WelcomeModal extends React.PureComponent {

{__("Welcome to LBRY.")}

- {__( - "Using LBRY is like dating a centaur. Totally normal up top, and" - )} + {__("Using LBRY is like dating a centaur. Totally normal up top, and")} {" "}{__("way different")} {__("underneath.")}

{__("Up top, LBRY is similar to popular media sites.")}

- {__( - "Below, LBRY is controlled by users -- you -- via blockchain and decentralization." - )} + {__("Below, LBRY is controlled by users -- you -- via blockchain and decentralization.")}

{__("Thank you for making content freedom possible!")} @@ -54,24 +50,16 @@ class WelcomeModal extends React.PureComponent { {" "}{__("LBRY credits, or")} {__("LBC")}.

- {__( - "This reward will show in your Wallet momentarily, probably while you are reading this message." - )} + {__("This reward will show in your Wallet momentarily, probably while you are reading this message.")}

- {__( - "LBC is used to compensate creators, to publish, and to have say in how the network works." - )} + {__("LBC is used to compensate creators, to publish, and to have say in how the network works.")}

- {__( - "No need to understand it all just yet! Try watching or downloading something next." - )} + {__("No need to understand it all just yet! Try watching or downloading something next.")}

- {__( - "Finally, know that LBRY is an early beta and that it earns the name." - )} + {__("Finally, know that LBRY is an early beta and that it earns the name.")}

; diff --git a/ui/js/jsonrpc.js b/ui/js/jsonrpc.js index d401d2eaf..b07dbe547 100644 --- a/ui/js/jsonrpc.js +++ b/ui/js/jsonrpc.js @@ -1,87 +1,87 @@ const jsonrpc = {}; jsonrpc.call = function( - connectionString, - method, - params, - callback, - errorCallback, - connectFailedCallback, - timeout + connectionString, + method, + params, + callback, + errorCallback, + connectFailedCallback, + timeout ) { - var xhr = new XMLHttpRequest(); - if (typeof connectFailedCallback !== "undefined") { - if (timeout) { - xhr.timeout = timeout; - } + var xhr = new XMLHttpRequest(); + if (typeof connectFailedCallback !== 'undefined') { + if (timeout) { + xhr.timeout = timeout; + } - xhr.addEventListener("error", function(e) { - connectFailedCallback(e); - }); - xhr.addEventListener("timeout", function() { - connectFailedCallback( - new Error(__("XMLHttpRequest connection timed out")) - ); - }); - } - xhr.addEventListener("load", function() { - var response = JSON.parse(xhr.responseText); + xhr.addEventListener('error', function(e) { + connectFailedCallback(e); + }); + xhr.addEventListener('timeout', function() { + connectFailedCallback( + new Error(__('XMLHttpRequest connection timed out')) + ); + }); + } + xhr.addEventListener('load', function() { + var response = JSON.parse(xhr.responseText); - if (response.error) { - if (errorCallback) { - errorCallback(response.error); - } else { - var errorEvent = new CustomEvent("unhandledError", { - detail: { - connectionString: connectionString, - method: method, - params: params, - code: response.error.code, - message: response.error.message, - data: response.error.data, - }, - }); - document.dispatchEvent(errorEvent); - } - } else if (callback) { - callback(response.result); - } - }); + if (response.error) { + if (errorCallback) { + errorCallback(response.error); + } else { + var errorEvent = new CustomEvent('unhandledError', { + detail: { + connectionString: connectionString, + method: method, + params: params, + code: response.error.code, + message: response.error.message, + data: response.error.data + } + }); + document.dispatchEvent(errorEvent); + } + } else if (callback) { + callback(response.result); + } + }); - if (connectFailedCallback) { - xhr.addEventListener("error", function(event) { - connectFailedCallback(event); - }); - } else { - xhr.addEventListener("error", function(event) { - var errorEvent = new CustomEvent("unhandledError", { - detail: { - connectionString: connectionString, - method: method, - params: params, - code: xhr.status, - message: __("Connection to API server failed"), - }, - }); - document.dispatchEvent(errorEvent); - }); - } + if (connectFailedCallback) { + xhr.addEventListener('error', function(event) { + connectFailedCallback(event); + }); + } else { + xhr.addEventListener('error', function(event) { + var errorEvent = new CustomEvent('unhandledError', { + detail: { + connectionString: connectionString, + method: method, + params: params, + code: xhr.status, + message: __('Connection to API server failed') + } + }); + document.dispatchEvent(errorEvent); + }); + } - const counter = parseInt(sessionStorage.getItem("JSONRPCCounter") || 0); + const counter = parseInt(sessionStorage.getItem('JSONRPCCounter') || 0); - xhr.open("POST", connectionString, true); - xhr.send( - JSON.stringify({ - jsonrpc: "2.0", - method: method, - params: params, - id: counter, - }) - ); + xhr.open('POST', connectionString, true); + xhr.send( + JSON.stringify({ + jsonrpc: '2.0', + method: method, + params: params, + id: counter + }) + ); - sessionStorage.setItem("JSONRPCCounter", counter + 1); + sessionStorage.setItem('JSONRPCCounter', counter + 1); - return xhr; + return xhr; }; export default jsonrpc; diff --git a/ui/js/lbry.js b/ui/js/lbry.js index 286218532..3f4feecb7 100644 --- a/ui/js/lbry.js +++ b/ui/js/lbry.js @@ -319,11 +319,11 @@ lbry.getMediaType = function(contentType, fileName) { } var ext = fileName.substr(dotIndex + 1); - if (/^mp4|m4v|mov|webm|flv|f4v|ogv$/i.test(ext)) { + if (/^mp4|mov|m4v|flv|f4v$/i.test(ext)) { return "video"; - } else if (/^mp3|m4a|aac|wav|flac|ogg|opus$/i.test(ext)) { + } else if (/^mp3|m4a|aac|wav|flac|ogg$/i.test(ext)) { return "audio"; - } else if (/^html|htm|xml|pdf|odf|doc|docx|md|markdown|txt|org$/i.test(ext)) { + } else if (/^html|htm|pdf|odf|doc|docx|md|markdown|txt$/i.test(ext)) { return "document"; } else { return "unknown"; @@ -417,7 +417,7 @@ lbry.file_list = function(params = {}) { return; } } - + apiCall( "file_list", params, @@ -458,6 +458,7 @@ lbry.claim_list_mine = function(params = {}) { }); }; + lbry._resolveXhrs = {}; lbry.resolve = function(params = {}) { return new Promise((resolve, reject) => { diff --git a/ui/js/lbryio.js b/ui/js/lbryio.js index 9e3a7cc43..11416fbd6 100644 --- a/ui/js/lbryio.js +++ b/ui/js/lbryio.js @@ -1,21 +1,21 @@ +import { getSession, setSession, setLocal } from "./utils.js"; import lbry from "./lbry.js"; const querystring = require("querystring"); -const keytar = require("keytar"); const lbryio = { - enabled: true, + _accessToken: getSession("accessToken"), _authenticationPromise: null, - _exchangePromise: null, - _exchangeLastFetched: null, + enabled: true, }; const CONNECTION_STRING = process.env.LBRY_APP_API_URL ? process.env.LBRY_APP_API_URL.replace(/\/*$/, "/") // exactly one slash at the end : "https://api.lbry.io/"; - const EXCHANGE_RATE_TIMEOUT = 20 * 60 * 1000; +lbryio._exchangePromise = null; +lbryio._exchangeLastFetched = null; lbryio.getExchangeRates = function() { if ( !lbryio._exchangeLastFetched || @@ -60,7 +60,7 @@ lbryio.call = function(resource, action, params = {}, method = "get") { if (!response.success) { if (reject) { - const error = new Error(response.error); + let error = new Error(response.error); error.xhr = xhr; reject(error); } else { @@ -81,54 +81,54 @@ lbryio.call = function(resource, action, params = {}, method = "get") { } }); - lbryio - .getAuthToken() - .then(token => { - const fullParams = { auth_token: token, ...params }; + // For social media auth: + //const accessToken = localStorage.getItem('accessToken'); + //const fullParams = {...params, ... accessToken ? {access_token: accessToken} : {}}; - if (method == "get") { - xhr.open( - "get", - CONNECTION_STRING + - resource + - "/" + - action + - "?" + - querystring.stringify(fullParams), - true - ); - xhr.send(); - } else if (method == "post") { - xhr.open("post", CONNECTION_STRING + resource + "/" + action, true); - xhr.setRequestHeader( - "Content-type", - "application/x-www-form-urlencoded" - ); - xhr.send(querystring.stringify(fullParams)); - } else { - reject(new Error(__("Invalid method"))); - } - }) - .catch(reject); + // Temp app ID based auth: + const fullParams = { app_id: lbryio.getAccessToken(), ...params }; + + if (method == "get") { + xhr.open( + "get", + CONNECTION_STRING + + resource + + "/" + + action + + "?" + + querystring.stringify(fullParams), + true + ); + xhr.send(); + } else if (method == "post") { + xhr.open("post", CONNECTION_STRING + resource + "/" + action, true); + xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); + xhr.send(querystring.stringify(fullParams)); + } else { + reject(new Error(__("Invalid method"))); + } }); }; -lbryio.getAuthToken = () => { - return keytar.getPassword("LBRY", "auth_token").then(token => { - return token ? token.toString().trim() : null; - }); +lbryio.getAccessToken = () => { + const token = getSession("accessToken"); + return token ? token.toString().trim() : token; }; -lbryio.setAuthToken = token => { - return keytar.setPassword( - "LBRY", - "auth_token", - token ? token.toString().trim() : null - ); +lbryio.setAccessToken = token => { + setSession("accessToken", token ? token.toString().trim() : token); }; -lbryio.getCurrentUser = () => { - return lbryio.call("user", "me"); +lbryio.setCurrentUser = (resolve, reject) => { + lbryio + .call("user", "me") + .then(data => { + resolve(data); + }) + .catch(function(err) { + lbryio.setAccessToken(null); + reject(err); + }); }; lbryio.authenticate = function() { @@ -144,69 +144,48 @@ lbryio.authenticate = function() { }); }); } - if (lbryio._authenticationPromise === null) { lbryio._authenticationPromise = new Promise((resolve, reject) => { - lbryio - .getAuthToken() - .then(token => { - if (!token || token.length > 60) { - return false; - } + lbry + .status() + .then(response => { + let installation_id = response.installation_id; - // check that token works - return lbryio - .getCurrentUser() - .then(() => { - return true; - }) - .catch(() => { - return false; - }); - }) - .then(isTokenValid => { - if (isTokenValid) { - return; - } - - let app_id; - - return lbry - .status() - .then(status => { - // first try swapping - app_id = status.installation_id; - return lbryio.call( + if (!lbryio.getAccessToken()) { + lbryio + .call( "user", - "token_swap", - { auth_token: "", app_id: app_id }, + "new", + { + language: "en", + app_id: installation_id, + }, "post" - ); - }) - .catch(err => { - if (err.xhr.status == 403) { - // cannot swap. either app_id doesn't exist, or app_id already swapped. pretend its the former and create a new user. if we get another error, then its the latter - return lbryio.call( - "user", - "new", - { auth_token: "", language: "en", app_id: app_id }, - "post" - ); - } - throw err; - }) - .then(response => { - if (!response.auth_token) { - throw new Error(__("auth_token is missing from response")); - } - return lbryio.setAuthToken(response.auth_token); - }); + ) + .then(function(responseData) { + if (!responseData.id) { + reject( + new Error("Received invalid authentication response.") + ); + } + lbryio.setAccessToken(installation_id); + lbryio.setCurrentUser(resolve, reject); + }) + .catch(function(error) { + /* + until we have better error code format, assume all errors are duplicate application id + if we're wrong, this will be caught by later attempts to make a valid call + */ + lbryio.setAccessToken(installation_id); + lbryio.setCurrentUser(resolve, reject); + }); + } else { + lbryio.setCurrentUser(resolve, reject); + } }) - .then(lbryio.getCurrentUser) - .then(resolve, reject); + .catch(reject); }); } - return lbryio._authenticationPromise; }; diff --git a/ui/js/lbryuri.js b/ui/js/lbryuri.js index b58ad55ac..fce46d217 100644 --- a/ui/js/lbryuri.js +++ b/ui/js/lbryuri.js @@ -26,125 +26,125 @@ const lbryuri = {}; * - channelName (string, if present): Channel name without @ */ lbryuri.parse = function(uri, requireProto = false) { - // Break into components. Empty sub-matches are converted to null - const componentsRegex = new RegExp( - "^((?:lbry://)?)" + // protocol - "([^:$#/]*)" + // name (stops at the first separator or end) - "([:$#]?)([^/]*)" + // modifier separator, modifier (stops at the first path separator or end) - "(/?)(.*)" // path separator, path - ); - const [proto, name, modSep, modVal, pathSep, path] = componentsRegex - .exec(uri) - .slice(1) - .map(match => match || null); + // Break into components. Empty sub-matches are converted to null + const componentsRegex = new RegExp( + '^((?:lbry://)?)' + // protocol + '([^:$#/]*)' + // name (stops at the first separator or end) + '([:$#]?)([^/]*)' + // modifier separator, modifier (stops at the first path separator or end) + '(/?)(.*)' // path separator, path + ); + const [proto, name, modSep, modVal, pathSep, path] = componentsRegex + .exec(uri) + .slice(1) + .map(match => match || null); - let contentName; + let contentName; - // Validate protocol - if (requireProto && !proto) { - throw new Error(__("LBRY URIs must include a protocol prefix (lbry://).")); - } + // Validate protocol + if (requireProto && !proto) { + throw new Error(__('LBRY URIs must include a protocol prefix (lbry://).')); + } - // Validate and process name - if (!name) { - throw new Error(__("URI does not include name.")); - } + // Validate and process name + if (!name) { + throw new Error(__('URI does not include name.')); + } - const isChannel = name.startsWith("@"); - const channelName = isChannel ? name.slice(1) : name; + const isChannel = name.startsWith('@'); + const channelName = isChannel ? name.slice(1) : name; - if (isChannel) { - if (!channelName) { - throw new Error(__("No channel name after @.")); - } + if (isChannel) { + if (!channelName) { + throw new Error(__('No channel name after @.')); + } - if (channelName.length < CHANNEL_NAME_MIN_LEN) { - throw new Error( - __( - `Channel names must be at least %s characters.`, - CHANNEL_NAME_MIN_LEN - ) - ); - } + if (channelName.length < CHANNEL_NAME_MIN_LEN) { + throw new Error( + __( + `Channel names must be at least %s characters.`, + CHANNEL_NAME_MIN_LEN + ) + ); + } - contentName = path; - } + contentName = path; + } - const nameBadChars = (channelName || name).match(/[^A-Za-z0-9-]/g); - if (nameBadChars) { - throw new Error( - __( - `Invalid character %s in name: %s.`, - nameBadChars.length == 1 ? "" : "s", - nameBadChars.join(", ") - ) - ); - } + const nameBadChars = (channelName || name).match(/[^A-Za-z0-9-]/g); + if (nameBadChars) { + throw new Error( + __( + `Invalid character %s in name: %s.`, + nameBadChars.length == 1 ? '' : 's', + nameBadChars.join(', ') + ) + ); + } - // Validate and process modifier (claim ID, bid position or claim sequence) - let claimId, claimSequence, bidPosition; - if (modSep) { - if (!modVal) { - throw new Error(__(`No modifier provided after separator %s.`, modSep)); - } + // Validate and process modifier (claim ID, bid position or claim sequence) + let claimId, claimSequence, bidPosition; + if (modSep) { + if (!modVal) { + throw new Error(__(`No modifier provided after separator %s.`, modSep)); + } - if (modSep == "#") { - claimId = modVal; - } else if (modSep == ":") { - claimSequence = modVal; - } else if (modSep == "$") { - bidPosition = modVal; - } - } + if (modSep == '#') { + claimId = modVal; + } else if (modSep == ':') { + claimSequence = modVal; + } else if (modSep == '$') { + bidPosition = modVal; + } + } - if ( - claimId && - (claimId.length > CLAIM_ID_MAX_LEN || !claimId.match(/^[0-9a-f]+$/)) - ) { - throw new Error(__(`Invalid claim ID %s.`, claimId)); - } + if ( + claimId && + (claimId.length > CLAIM_ID_MAX_LEN || !claimId.match(/^[0-9a-f]+$/)) + ) { + throw new Error(__(`Invalid claim ID %s.`, claimId)); + } - if (claimSequence && !claimSequence.match(/^-?[1-9][0-9]*$/)) { - throw new Error(__("Claim sequence must be a number.")); - } + if (claimSequence && !claimSequence.match(/^-?[1-9][0-9]*$/)) { + throw new Error(__('Claim sequence must be a number.')); + } - if (bidPosition && !bidPosition.match(/^-?[1-9][0-9]*$/)) { - throw new Error(__("Bid position must be a number.")); - } + if (bidPosition && !bidPosition.match(/^-?[1-9][0-9]*$/)) { + throw new Error(__('Bid position must be a number.')); + } - // Validate and process path - if (path) { - if (!isChannel) { - throw new Error(__("Only channel URIs may have a path.")); - } + // Validate and process path + if (path) { + if (!isChannel) { + throw new Error(__('Only channel URIs may have a path.')); + } - const pathBadChars = path.match(/[^A-Za-z0-9-]/g); - if (pathBadChars) { - throw new Error( - __( - `Invalid character %s in path: %s`, - count == 1 ? "" : "s", - nameBadChars.join(", ") - ) - ); - } + const pathBadChars = path.match(/[^A-Za-z0-9-]/g); + if (pathBadChars) { + throw new Error( + __( + `Invalid character %s in path: %s`, + count == 1 ? '' : 's', + nameBadChars.join(', ') + ) + ); + } - contentName = path; - } else if (pathSep) { - throw new Error(__("No path provided after /")); - } + contentName = path; + } else if (pathSep) { + throw new Error(__('No path provided after /')); + } - return { - name, - path, - isChannel, - ...(contentName ? { contentName } : {}), - ...(channelName ? { channelName } : {}), - ...(claimSequence ? { claimSequence: parseInt(claimSequence) } : {}), - ...(bidPosition ? { bidPosition: parseInt(bidPosition) } : {}), - ...(claimId ? { claimId } : {}), - ...(path ? { path } : {}), - }; + return { + name, + path, + isChannel, + ...(contentName ? { contentName } : {}), + ...(channelName ? { channelName } : {}), + ...(claimSequence ? { claimSequence: parseInt(claimSequence) } : {}), + ...(bidPosition ? { bidPosition: parseInt(bidPosition) } : {}), + ...(claimId ? { claimId } : {}), + ...(path ? { path } : {}) + }; }; /** @@ -153,96 +153,96 @@ lbryuri.parse = function(uri, requireProto = false) { * The channelName key will accept names with or without the @ prefix. */ lbryuri.build = function(uriObj, includeProto = true, allowExtraProps = false) { - let { - name, - claimId, - claimSequence, - bidPosition, - path, - contentName, - channelName, - } = uriObj; + let { + name, + claimId, + claimSequence, + bidPosition, + path, + contentName, + channelName + } = uriObj; - if (channelName) { - const channelNameFormatted = channelName.startsWith("@") - ? channelName - : "@" + channelName; - if (!name) { - name = channelNameFormatted; - } else if (name !== channelNameFormatted) { - throw new Error( - __( - 'Received a channel content URI, but name and channelName do not match. "name" represents the value in the name position of the URI (lbry://name...), which for channel content will be the channel name. In most cases, to construct a channel URI you should just pass channelName and contentName.' - ) - ); - } - } + if (channelName) { + const channelNameFormatted = channelName.startsWith('@') + ? channelName + : '@' + channelName; + if (!name) { + name = channelNameFormatted; + } else if (name !== channelNameFormatted) { + throw new Error( + __( + 'Received a channel content URI, but name and channelName do not match. "name" represents the value in the name position of the URI (lbry://name...), which for channel content will be the channel name. In most cases, to construct a channel URI you should just pass channelName and contentName.' + ) + ); + } + } - if (contentName) { - if (!name) { - name = contentName; - } else if (!path) { - path = contentName; - } - if (path && path !== contentName) { - throw new Error( - __( - "Path and contentName do not match. Only one is required; most likely you wanted contentName." - ) - ); - } - } + if (contentName) { + if (!name) { + name = contentName; + } else if (!path) { + path = contentName; + } + if (path && path !== contentName) { + throw new Error( + __( + 'Path and contentName do not match. Only one is required; most likely you wanted contentName.' + ) + ); + } + } - return ( - (includeProto ? "lbry://" : "") + - name + - (claimId ? `#${claimId}` : "") + - (claimSequence ? `:${claimSequence}` : "") + - (bidPosition ? `\$${bidPosition}` : "") + - (path ? `/${path}` : "") - ); + return ( + (includeProto ? 'lbry://' : '') + + name + + (claimId ? `#${claimId}` : '') + + (claimSequence ? `:${claimSequence}` : '') + + (bidPosition ? `\$${bidPosition}` : '') + + (path ? `/${path}` : '') + ); }; /* Takes a parseable LBRY URI and converts it to standard, canonical format (currently this just * consists of adding the lbry:// prefix if needed) */ lbryuri.normalize = function(uri) { - const { name, path, bidPosition, claimSequence, claimId } = lbryuri.parse( - uri - ); - return lbryuri.build({ name, path, claimSequence, bidPosition, claimId }); + const { name, path, bidPosition, claimSequence, claimId } = lbryuri.parse( + uri + ); + return lbryuri.build({ name, path, claimSequence, bidPosition, claimId }); }; lbryuri.isValid = function(uri) { - let parts; - try { - parts = lbryuri.parse(lbryuri.normalize(uri)); - } catch (error) { - return false; - } - return parts && parts.name; + let parts; + try { + parts = lbryuri.parse(lbryuri.normalize(uri)); + } catch (error) { + return false; + } + return parts && parts.name; }; lbryuri.isValidName = function(name, checkCase = true) { - const regexp = new RegExp("^[a-z0-9-]+$", checkCase ? "" : "i"); - return regexp.test(name); + const regexp = new RegExp('^[a-z0-9-]+$', checkCase ? '' : 'i'); + return regexp.test(name); }; lbryuri.isClaimable = function(uri) { - let parts; - try { - parts = lbryuri.parse(lbryuri.normalize(uri)); - } catch (error) { - return false; - } - return ( - parts && - parts.name && - !parts.claimId && - !parts.bidPosition && - !parts.claimSequence && - !parts.isChannel && - !parts.path - ); + let parts; + try { + parts = lbryuri.parse(lbryuri.normalize(uri)); + } catch (error) { + return false; + } + return ( + parts && + parts.name && + !parts.claimId && + !parts.bidPosition && + !parts.claimSequence && + !parts.isChannel && + !parts.path + ); }; window.lbryuri = lbryuri; diff --git a/ui/js/lighthouse.js b/ui/js/lighthouse.js index d7052a0ee..cfac14a9a 100644 --- a/ui/js/lighthouse.js +++ b/ui/js/lighthouse.js @@ -1,84 +1,84 @@ -import lbry from "./lbry.js"; -import jsonrpc from "./jsonrpc.js"; +import lbry from './lbry.js'; +import jsonrpc from './jsonrpc.js'; const queryTimeout = 3000; const maxQueryTries = 2; const defaultServers = [ - "http://lighthouse7.lbry.io:50005", - "http://lighthouse8.lbry.io:50005", - "http://lighthouse9.lbry.io:50005", + 'http://lighthouse7.lbry.io:50005', + 'http://lighthouse8.lbry.io:50005', + 'http://lighthouse9.lbry.io:50005' ]; -const path = "/"; +const path = '/'; let server = null; let connectTryNum = 0; function getServers() { - return lbry.getClientSetting("useCustomLighthouseServers") - ? lbry.getClientSetting("customLighthouseServers") - : defaultServers; + return lbry.getClientSetting('useCustomLighthouseServers') + ? lbry.getClientSetting('customLighthouseServers') + : defaultServers; } function call(method, params, callback, errorCallback) { - if (connectTryNum >= maxQueryTries) { - errorCallback( - new Error( - __( - `Could not connect to Lighthouse server. Last server attempted: %s`, - server - ) - ) - ); - return; - } + if (connectTryNum >= maxQueryTries) { + errorCallback( + new Error( + __( + `Could not connect to Lighthouse server. Last server attempted: %s`, + server + ) + ) + ); + return; + } - /** + /** * Set the Lighthouse server if it hasn't been set yet, if the current server is not in current * set of servers (most likely because of a settings change), or we're re-trying after a failed * query. */ - if (!server || !getServers().includes(server) || connectTryNum > 0) { - // If there's a current server, filter it out so we get a new one - const newServerChoices = server - ? getServers().filter(s => s != server) - : getServers(); - server = - newServerChoices[ - Math.round(Math.random() * (newServerChoices.length - 1)) - ]; - } + if (!server || !getServers().includes(server) || connectTryNum > 0) { + // If there's a current server, filter it out so we get a new one + const newServerChoices = server + ? getServers().filter(s => s != server) + : getServers(); + server = + newServerChoices[ + Math.round(Math.random() * (newServerChoices.length - 1)) + ]; + } - jsonrpc.call( - server + path, - method, - params, - response => { - connectTryNum = 0; - callback(response); - }, - error => { - connectTryNum = 0; - errorCallback(error); - }, - () => { - connectTryNum++; - call(method, params, callback, errorCallback); - }, - queryTimeout - ); + jsonrpc.call( + server + path, + method, + params, + response => { + connectTryNum = 0; + callback(response); + }, + error => { + connectTryNum = 0; + errorCallback(error); + }, + () => { + connectTryNum++; + call(method, params, callback, errorCallback); + }, + queryTimeout + ); } const lighthouse = new Proxy( - {}, - { - get: function(target, name) { - return function(...params) { - return new Promise((resolve, reject) => { - call(name, params, resolve, reject); - }); - }; - }, - } + {}, + { + get: function(target, name) { + return function(...params) { + return new Promise((resolve, reject) => { + call(name, params, resolve, reject); + }); + }; + } + } ); export default lighthouse; diff --git a/ui/js/page/discover/view.jsx b/ui/js/page/discover/view.jsx index 22f5f2b80..a37611cc7 100644 --- a/ui/js/page/discover/view.jsx +++ b/ui/js/page/discover/view.jsx @@ -5,6 +5,9 @@ import FileCard from "component/fileCard"; import { BusyMessage } from "component/common.js"; import ToolTip from "component/tooltip.js"; + + + const FeaturedCategory = props => { const { category, names } = props; @@ -16,9 +19,7 @@ const FeaturedCategory = props => { category.match(/^community/i) && } diff --git a/ui/js/page/publish/index.js b/ui/js/page/publish/index.js index fac4419c1..cd01864d9 100644 --- a/ui/js/page/publish/index.js +++ b/ui/js/page/publish/index.js @@ -15,8 +15,7 @@ const perform = dispatch => ({ back: () => dispatch(doHistoryBack()), navigate: path => dispatch(doNavigate(path)), fetchClaimListMine: () => dispatch(doFetchClaimListMine()), - claimFirstChannelReward: () => - dispatch(doClaimRewardType(rewards.TYPE_FIRST_CHANNEL)), + claimFirstChannelReward: () => dispatch(doClaimRewardType(rewards.TYPE_FIRST_CHANNEL)), }); export default connect(select, perform)(PublishPage); diff --git a/ui/js/page/publish/view.jsx b/ui/js/page/publish/view.jsx index 7959ad9f7..ce2cc6551 100644 --- a/ui/js/page/publish/view.jsx +++ b/ui/js/page/publish/view.jsx @@ -437,8 +437,7 @@ class PublishPage extends React.PureComponent { return ( {__( - 'A deposit of at least one credit is required to win "%s". However, you can still get a permanent URL for any amount.', - this.state.name + 'A deposit of at least one credit is required to win "%s". However, you can still get a permanent URL for any amount.', this.state.name )} ); @@ -446,9 +445,7 @@ class PublishPage extends React.PureComponent { return ( {__( - 'A deposit of at least "%s" credits is required to win "%s". However, you can still get a permanent URL for any amount.', - this.state.topClaimValue, - this.state.name + 'A deposit of at least "%s" credits is required to win "%s". However, you can still get a permanent URL for any amount.', this.state.topClaimValue, this.state.name )} ); diff --git a/ui/js/page/rewards/view.jsx b/ui/js/page/rewards/view.jsx index b7342210e..bb3833006 100644 --- a/ui/js/page/rewards/view.jsx +++ b/ui/js/page/rewards/view.jsx @@ -60,8 +60,7 @@ const RewardsPage = props => {

{__("You are not eligible to claim rewards.")}

{__("To become eligible, email")} - {" "}{" "} - {__("with a link to a public social media profile.")} + {" "} {__("with a link to a public social media profile.")}

); diff --git a/ui/js/rewards.js b/ui/js/rewards.js index d69e48f7e..08d82fd9b 100644 --- a/ui/js/rewards.js +++ b/ui/js/rewards.js @@ -93,7 +93,7 @@ rewards.TYPE_FEATURED_DOWNLOAD = "featured_download"; rewards.claimReward = function(type) { function requestReward(resolve, reject, params) { - if (!lbryio.enabled) { + if (!lbryio.enabled || !lbryio.getAccessToken()) { reject(new Error(__("Rewards are not enabled."))); return; } diff --git a/ui/js/selectors/app.js b/ui/js/selectors/app.js index c03bb28d3..0945833c1 100644 --- a/ui/js/selectors/app.js +++ b/ui/js/selectors/app.js @@ -31,17 +31,25 @@ export const selectPageTitle = createSelector( (page, params) => { switch (page) { case "settings": - case "help": + return __("Settings"); case "report": + return __("Report"); case "wallet": + return __("Wallet"); case "send": + return __("Send"); case "receive": + return __("Receive"); case "rewards": + return __("Rewards"); case "start": + return __("Start"); case "publish": + return __("Publish"); case "help": + return __("Help"); case "developer": - return __(page.charAt(0).toUpperCase() + page.slice(1)); + return __("Developer"); case "search": return params.query ? __("Search results for %s", params.query) diff --git a/ui/js/selectors/user.js b/ui/js/selectors/user.js index bd981273e..f7104d3d4 100644 --- a/ui/js/selectors/user.js +++ b/ui/js/selectors/user.js @@ -68,7 +68,8 @@ export const selectUserIsVerificationCandidate = createSelector( selectUserIsRewardApproved, selectEmailToVerify, selectUser, - (isEligible, isApproved, emailToVerify, user) => emailToVerify && user + (isEligible, isApproved, emailToVerify, user) => + (isEligible && !isApproved) || (emailToVerify && user && !user.has_email) ); export const selectUserIsAuthRequested = createSelector( diff --git a/ui/js/utils.js b/ui/js/utils.js index 783f85113..3b3160f13 100644 --- a/ui/js/utils.js +++ b/ui/js/utils.js @@ -3,15 +3,15 @@ * is not set yet. */ export function getLocal(key, fallback = undefined) { - const itemRaw = localStorage.getItem(key); - return itemRaw === null ? fallback : JSON.parse(itemRaw); + const itemRaw = localStorage.getItem(key); + return itemRaw === null ? fallback : JSON.parse(itemRaw); } /** * Thin wrapper around localStorage.setItem(). Converts value to JSON. */ export function setLocal(key, value) { - localStorage.setItem(key, JSON.stringify(value)); + localStorage.setItem(key, JSON.stringify(value)); } /** @@ -19,13 +19,13 @@ export function setLocal(key, value) { * is not set yet. */ export function getSession(key, fallback = undefined) { - const itemRaw = sessionStorage.getItem(key); - return itemRaw === null ? fallback : JSON.parse(itemRaw); + const itemRaw = sessionStorage.getItem(key); + return itemRaw === null ? fallback : JSON.parse(itemRaw); } /** * Thin wrapper around localStorage.setItem(). Converts value to JSON. */ export function setSession(key, value) { - sessionStorage.setItem(key, JSON.stringify(value)); + sessionStorage.setItem(key, JSON.stringify(value)); } diff --git a/ui/package-lock.json b/ui/package-lock.json index 890228ef8..cb870b578 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "lbry-web-ui", - "version": "0.12.2rc5", + "version": "0.12.0", "lockfileVersion": 1, "dependencies": { "abbrev": { @@ -97,12 +97,6 @@ "integrity": "sha1-vgiVmQl7dKXJxKhKDNvNtivYeu8=", "dev": true }, - "any-promise": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/any-promise/-/any-promise-1.3.0.tgz", - "integrity": "sha1-q8av7tzqUugJzcA3au0845Y10X8=", - "dev": true - }, "anymatch": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-1.3.0.tgz", @@ -146,9 +140,9 @@ "integrity": "sha1-3wEKoSh+Fku9pvlyOwqWoexBh6E=" }, "array-flatten": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-2.1.1.tgz", - "integrity": "sha1-Qmu52oQJDBg42BLIFQryCoMx4pY=", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", "dev": true }, "array-union": { @@ -667,9 +661,9 @@ "integrity": "sha1-cK+ySNVmDl0Y+BHZHIMDtUE0oY4=" }, "babylon": { - "version": "6.17.4", - "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.17.4.tgz", - "integrity": "sha512-kChlV+0SXkjE0vUn9OZ7pBMWRFd8uq3mZe8x1K6jhuNcAFAtEnjchFAqB+dYEXKyd+JpT6eppRR78QAr5gTsUw==" + "version": "6.17.3", + "resolved": "https://registry.npmjs.org/babylon/-/babylon-6.17.3.tgz", + "integrity": "sha512-mq0x3HCAGGmQyZXviOVe5TRsw37Ijy3D43jCqt/9WVf+onx2dUgW3PosnqCbScAFhRO9DGs8nxoMzU0iiosMqQ==" }, "balanced-match": { "version": "1.0.0", @@ -721,15 +715,9 @@ "integrity": "sha1-E+v+d4oDIFz+A3UUgeu0szAMEmo=" }, "bn.js": { - "version": "4.11.7", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.7.tgz", - "integrity": "sha512-LxFiV5mefv0ley0SzqkOPR1bC4EbpPx8LkOz5vMe/Yi15t5hzwgO/G+tc7wOtL4PZTYjwHu8JnEiSLumuSjSfA==", - "dev": true - }, - "bonjour": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/bonjour/-/bonjour-3.5.0.tgz", - "integrity": "sha1-jokKGD2O6aI5OzhExpGkK897yfU=", + "version": "4.11.6", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.6.tgz", + "integrity": "sha1-UzRK2xRhehP26N0s4okF0cC6MhU=", "dev": true }, "boom": { @@ -795,12 +783,6 @@ "integrity": "sha1-bRu2AbB6TvztlwlBMgkwJ8lbwpg=", "dev": true }, - "buffer-indexof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/buffer-indexof/-/buffer-indexof-1.1.0.tgz", - "integrity": "sha1-9U9kfE9OJSKLqmVqLlfkPV8nCYI=", - "dev": true - }, "buffer-xor": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", @@ -892,30 +874,22 @@ "dev": true }, "cli-cursor": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-2.1.0.tgz", - "integrity": "sha1-s12sN2R5+sw+lHR9QdDQ9SOP/LU=", + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", + "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", "dev": true }, "cli-spinners": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-1.0.0.tgz", - "integrity": "sha1-75h+09SDkaw9q5GAtAanQhgNbmo=", + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", + "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=", "dev": true }, "cli-table": { "version": "0.3.1", "resolved": "https://registry.npmjs.org/cli-table/-/cli-table-0.3.1.tgz", "integrity": "sha1-9TsFJmqLGguTSz0IIebi3FkUriM=", - "dev": true, - "dependencies": { - "colors": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", - "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", - "dev": true - } - } + "dev": true }, "cli-truncate": { "version": "0.2.1", @@ -957,9 +931,9 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha1-FopHAXVran9RoSzgyXv6KMCE7WM=", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=", "dev": true }, "combined-stream": { @@ -1116,9 +1090,9 @@ "dev": true }, "create-react-class": { - "version": "15.6.0", - "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.6.0.tgz", - "integrity": "sha1-q0SEl8JlZuHilBPogyB9V8/nvtQ=" + "version": "15.5.4", + "resolved": "https://registry.npmjs.org/create-react-class/-/create-react-class-15.5.4.tgz", + "integrity": "sha1-GIh1yxXi++TKWVtvQ+sOSh8A/lA=" }, "cross-spawn": { "version": "3.0.1", @@ -1192,12 +1166,6 @@ "resolved": "https://registry.npmjs.org/deep-diff/-/deep-diff-0.3.8.tgz", "integrity": "sha1-wB3mPvsO7JeYgB1Ax+Da4ltYLIQ=" }, - "deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, "deep-is": { "version": "0.1.3", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", @@ -1261,24 +1229,6 @@ "integrity": "sha1-tYNXOScM/ias9jIJn97SoH8gnl4=", "dev": true }, - "dns-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", - "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=", - "dev": true - }, - "dns-packet": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.1.1.tgz", - "integrity": "sha1-I2nUUDivBF84mOb6VoYq7T9AKWw=", - "dev": true - }, - "dns-txt": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/dns-txt/-/dns-txt-2.0.2.tgz", - "integrity": "sha1-uR2Ab10nGI5Ks+fRB9iBocxGQrY=", - "dev": true - }, "doctrine": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.0.0.tgz", @@ -1303,12 +1253,6 @@ "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=", "dev": true }, - "electron-rebuild": { - "version": "1.5.11", - "resolved": "https://registry.npmjs.org/electron-rebuild/-/electron-rebuild-1.5.11.tgz", - "integrity": "sha1-bqZg3rVGpRbn76qBzVmF1WZPJFw=", - "dev": true - }, "elegant-spinner": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/elegant-spinner/-/elegant-spinner-1.0.1.tgz", @@ -1474,9 +1418,9 @@ "dev": true }, "eslint-loader": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-1.8.0.tgz", - "integrity": "sha512-+d9me9y9t+/k1pY5hsorY685H3yYoQT0t5pZT1TGB7L46VOoLv8+3uKHvkjpUx1aCTjeacbj4yz4s5/LcGolpg==", + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/eslint-loader/-/eslint-loader-1.7.1.tgz", + "integrity": "sha1-ULFY3WJy3O+5fphCVIN/gaWALOA=", "dev": true, "dependencies": { "loader-utils": { @@ -1608,10 +1552,18 @@ "dev": true }, "esrecurse": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.0.tgz", - "integrity": "sha1-+pVo2Y04I/mkHZHpAtyrnqblsWM=", - "dev": true + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.1.0.tgz", + "integrity": "sha1-RxO2U2rffyrE8yfVWed1a/9kgiA=", + "dev": true, + "dependencies": { + "estraverse": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.1.1.tgz", + "integrity": "sha1-9srKcokzqFDvkGYdDheYK6RxEaI=", + "dev": true + } + } }, "estraverse": { "version": "4.2.0", @@ -1701,12 +1653,6 @@ "integrity": "sha1-urZdDwOqgMNYQIly/HAPkWlEtmI=", "dev": true, "dependencies": { - "array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, "debug": { "version": "2.6.7", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.7.tgz", @@ -1867,18 +1813,6 @@ "resolved": "https://registry.npmjs.org/from2/-/from2-2.3.0.tgz", "integrity": "sha1-i/tVAr3kpNNs/e6gB/zKIdfjgq8=" }, - "fs-extra": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", - "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", - "dev": true - }, - "fs-promise": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/fs-promise/-/fs-promise-2.0.3.tgz", - "integrity": "sha1-9k5PhUvPaJqovdy6JokW2z20aFQ=", - "dev": true - }, "fs-readdir-recursive": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.0.0.tgz", @@ -2493,12 +2427,6 @@ } } }, - "gettext-parser": { - "version": "1.2.2", - "resolved": "https://registry.npmjs.org/gettext-parser/-/gettext-parser-1.2.2.tgz", - "integrity": "sha1-HvDadcHnWa4wicc++k0Z5AKYdI4=", - "dev": true - }, "glob": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", @@ -2591,9 +2519,9 @@ "dev": true }, "hash.js": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.1.tgz", - "integrity": "sha512-I2TYCUjYQMmqmRMCp6jKMC5bvdXxGIZ/heITRR/0F1u0OP920ImEj/cXt3WgcTKBnNYGn7enxUzdai3db829JA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.0.3.tgz", + "integrity": "sha1-EzL/ABVsCg/92CNgE9B7d6BFFXM=", "dev": true }, "hawk": { @@ -2702,12 +2630,6 @@ } } }, - "i18n-extract": { - "version": "0.4.4", - "resolved": "https://registry.npmjs.org/i18n-extract/-/i18n-extract-0.4.4.tgz", - "integrity": "sha1-/VyDA4mv91WNrLh1bpPv1lNIHV8=", - "dev": true - }, "iconv-lite": { "version": "0.4.18", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.18.tgz", @@ -2771,32 +2693,6 @@ "version": "0.12.0", "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-0.12.0.tgz", "integrity": "sha1-HvK/1jUE3wvHV4X/+MLEHfEvB34=", - "dev": true, - "dependencies": { - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true - } - } - }, - "internal-ip": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/internal-ip/-/internal-ip-1.2.0.tgz", - "integrity": "sha1-rp+/k7mEh4eF1QqN4bNWlWBYz1w=", "dev": true }, "interpret": { @@ -2815,12 +2711,6 @@ "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" }, - "ip": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz", - "integrity": "sha1-vd7XARQpCCjAoDnnLvJfWq7ENUo=", - "dev": true - }, "ipaddr.js": { "version": "1.3.0", "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.3.0.tgz", @@ -3086,12 +2976,6 @@ "resolved": "https://registry.npmjs.org/json5/-/json5-0.5.1.tgz", "integrity": "sha1-Hq3nrMASA0rYTiOWdn6tn6VJWCE=" }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true - }, "jsonify": { "version": "0.0.0", "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", @@ -3133,18 +3017,6 @@ "integrity": "sha1-OGchPo3Xm/Ho8jAMDPwe+xgsDfE=", "dev": true }, - "keytar": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/keytar/-/keytar-4.0.3.tgz", - "integrity": "sha1-RaNnQsHPzQchDSbRuUKOKXh5vPw=", - "dependencies": { - "nan": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.5.1.tgz", - "integrity": "sha1-1bAWkSUzJql6K77p5hxV2NYDUeI=" - } - } - }, "kind-of": { "version": "3.2.2", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", @@ -3182,39 +3054,7 @@ "version": "0.12.0", "resolved": "https://registry.npmjs.org/listr/-/listr-0.12.0.tgz", "integrity": "sha1-a84sD1YD+klYDqF81qAMwOX6RRo=", - "dev": true, - "dependencies": { - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true - }, - "cli-spinners": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/cli-spinners/-/cli-spinners-0.1.2.tgz", - "integrity": "sha1-u3ZNiOGF+54eaiofGXcjGPYF4xw=", - "dev": true - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "ora": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz", - "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true - } - } + "dev": true }, "listr-silent-renderer": { "version": "1.1.1", @@ -3240,27 +3080,7 @@ "version": "0.4.0", "resolved": "https://registry.npmjs.org/listr-verbose-renderer/-/listr-verbose-renderer-0.4.0.tgz", "integrity": "sha1-RNwBuww0oDxXIVTU0Izemx3FYg8=", - "dev": true, - "dependencies": { - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true - } - } + "dev": true }, "load-json-file": { "version": "1.1.0", @@ -3442,27 +3262,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/log-update/-/log-update-1.0.2.tgz", "integrity": "sha1-GZKfZMQJPS0ucHWh2tivWcKWuNE=", - "dev": true, - "dependencies": { - "cli-cursor": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-1.0.2.tgz", - "integrity": "sha1-ZNo/fValRBLll5S9Ytw1KV6PKYc=", - "dev": true - }, - "onetime": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", - "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", - "dev": true - }, - "restore-cursor": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", - "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", - "dev": true - } - } + "dev": true }, "longest": { "version": "1.0.1", @@ -3575,12 +3375,6 @@ "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.15.tgz", "integrity": "sha1-pOv1BkCUVpI3uM9wBGd20J/JKu0=" }, - "mimic-fn": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-1.1.0.tgz", - "integrity": "sha1-5md4PZLonb00KBi1IwudYqZyrRg=", - "dev": true - }, "minimalistic-assert": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz", @@ -3623,18 +3417,6 @@ "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" }, - "multicast-dns": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/multicast-dns/-/multicast-dns-6.1.1.tgz", - "integrity": "sha1-bn3oalcIcqsXBYrepxYLvsqBTd4=", - "dev": true - }, - "multicast-dns-service-types": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz", - "integrity": "sha1-iZ8R2WhuXgXLkbNdXw5jt3PPyQE=", - "dev": true - }, "multistream": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/multistream/-/multistream-2.1.0.tgz", @@ -3646,12 +3428,6 @@ "integrity": "sha1-j7+rsKmKJT0xhDMfno3rc3L6xsA=", "dev": true }, - "mz": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/mz/-/mz-2.6.0.tgz", - "integrity": "sha1-yLhSHZWN8KTydoAl22nHGe5O8c4=", - "dev": true - }, "nan": { "version": "2.6.2", "resolved": "https://registry.npmjs.org/nan/-/nan-2.6.2.tgz", @@ -3674,12 +3450,6 @@ "resolved": "https://registry.npmjs.org/next-event/-/next-event-1.0.0.tgz", "integrity": "sha1-53eKzeLlWALgrRh5w5z2917aYdg=" }, - "node-abi": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.0.3.tgz", - "integrity": "sha1-DKZ+XmZ7jhNDVJyhcVOoFdC7/ao=", - "dev": true - }, "node-emoji": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/node-emoji/-/node-emoji-1.5.1.tgz", @@ -3691,12 +3461,6 @@ "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz", "integrity": "sha512-j8XsFGCLw79vWXkZtMSmmLaOk9z5SQ9bV/tkbZVCqvgwzrjAGq66igobLofHtF63NvMTp2WjytpsNTGKa+XRIQ==" }, - "node-forge": { - "version": "0.6.33", - "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-0.6.33.tgz", - "integrity": "sha1-RjgRh59XPUUVWtap9D3ClujoXrw=", - "dev": true - }, "node-gyp": { "version": "3.6.2", "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-3.6.2.tgz", @@ -3716,12 +3480,6 @@ } } }, - "node-loader": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/node-loader/-/node-loader-0.6.0.tgz", - "integrity": "sha1-x5fvUQle1YWZArFX9jhPY2HgWug=", - "dev": true - }, "node-notifier": { "version": "4.6.1", "resolved": "https://registry.npmjs.org/node-notifier/-/node-notifier-4.6.1.tgz", @@ -3846,9 +3604,9 @@ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" }, "onetime": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-2.0.1.tgz", - "integrity": "sha1-BnQoIw/WdEOyeUsiu6UotoZ5YtQ=", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz", + "integrity": "sha1-ofeDj4MUxRbwXs78vEzP4EtO14k=", "dev": true }, "opn": { @@ -3878,9 +3636,9 @@ "dev": true }, "ora": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/ora/-/ora-1.3.0.tgz", - "integrity": "sha1-gAeN0rkqk0r2ajrXKluRBpTt5Ro=", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/ora/-/ora-0.2.3.tgz", + "integrity": "sha1-N1J9Igrc1Tw5tzVx11QVbV22V6Q=", "dev": true }, "original": { @@ -4123,9 +3881,9 @@ "dev": true }, "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==" + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.1.1.tgz", + "integrity": "sha1-SJZUxpJha4qlWwck+oCbt9tJxb8=" }, "prop-types": { "version": "15.5.10", @@ -4216,7 +3974,15 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.0.5.tgz", "integrity": "sha512-8T7Zn1AhMsQ/HI1SjcCfT/t4ii3eAqco3yOcSzS4mozsOz69lHLsoMXmF9nZgnFanYscnSlUSgs8uZyKzpE6kg==", - "dev": true + "dev": true, + "dependencies": { + "safe-buffer": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz", + "integrity": "sha512-aSLEDudu6OoRr/2rU609gRmnYboRLxgDG1z9o2Q0os7236FwvcqIOO8r8U5JUEwivZOhDaKlFO4SbPTJYyBEyQ==", + "dev": true + } + } }, "range-parser": { "version": "1.2.0", @@ -4235,24 +4001,19 @@ "integrity": "sha1-0xzLFJmuIjwNIdFIVlCqSg03TOA=" }, "react": { - "version": "15.6.1", - "resolved": "https://registry.npmjs.org/react/-/react-15.6.1.tgz", - "integrity": "sha1-uqhDTsZ4C96ZfNw4C3nNM7ljk98=" + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/react/-/react-15.6.0.tgz", + "integrity": "sha1-wjKZtI4w7TAlCM6J4aAskZ+Ca84=" }, "react-dom": { - "version": "15.6.1", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.6.1.tgz", - "integrity": "sha1-LLDtQZEDjlPCCes6eaI+Kkz5lHA=" - }, - "react-dom-factories": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/react-dom-factories/-/react-dom-factories-1.0.0.tgz", - "integrity": "sha1-9DwF5QUbME8zJRYY1byFmynka20=" + "version": "15.6.0", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-15.6.0.tgz", + "integrity": "sha1-i8I8sMgOcGNVt2yp+M5Hz3vfttE=" }, "react-modal": { - "version": "1.9.7", - "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-1.9.7.tgz", - "integrity": "sha512-oZNqI0ZnPD7NnfObrCMz2hxHTAw5oEuhZJ+gnyFNIQB2rR8h1YbLQTfhms1mtSJigb0J23OOWElHjXYYaKO+wg==" + "version": "1.9.4", + "resolved": "https://registry.npmjs.org/react-modal/-/react-modal-1.9.4.tgz", + "integrity": "sha512-ourtHswaEA/KyeI20AsCOSWTC23WF3z0b1C3qzQtA5UhBOdwQ2sEK2OPJGN8u7iFGJ83etmk605aeF/i4tGVEQ==" }, "react-redux": { "version": "5.0.5", @@ -4270,9 +4031,9 @@ "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=" }, "readable-stream": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.0.tgz", - "integrity": "sha512-c7KMXGd4b48nN3OJ1U9qOsn6pXNzf6kLd3kdZCkg2sxAcoiufInqF0XckwEnlrcwuaYwonlNK8GQUIOC/WC7sg==" + "version": "2.2.11", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.2.11.tgz", + "integrity": "sha512-h+8+r3MKEhkiVrwdKL8aWs1oc1VvBu33ueshOvS26RsZQ3Amhx/oO3TKe4lApSV9ueY6as8EAh7mtuFjdlhg9Q==" }, "readdirp": { "version": "2.1.0", @@ -4323,9 +4084,9 @@ } }, "redux": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/redux/-/redux-3.7.0.tgz", - "integrity": "sha512-GHjaOkEQtQnnuLoYPFkRKHIqs1i1tdTlisu/xUHfk2juzCobSy4STxs4Lz5bPkc07Owb6BeGKx/r76c9IVTkOw==" + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/redux/-/redux-3.6.0.tgz", + "integrity": "sha1-iHwrPQub2G7KK+cFccJ2VMGeGI0=" }, "redux-action-buffer": { "version": "1.1.0", @@ -4475,9 +4236,9 @@ "dev": true }, "restore-cursor": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-2.0.0.tgz", - "integrity": "sha1-n37ih/gv0ybU/RYpI9YhKe7g368=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-1.0.1.tgz", + "integrity": "sha1-NGYfRohjJ/7SmRR5FSJS35LapUE=", "dev": true }, "right-align": { @@ -4510,15 +4271,15 @@ "dev": true }, "rxjs": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.1.tgz", - "integrity": "sha1-ti91fyeURdJloYpY+wpw3JDpFiY=", + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-5.4.0.tgz", + "integrity": "sha1-p9sUqxV/nXqsalbmVeejhg05vyY=", "dev": true }, "safe-buffer": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.0.tgz", - "integrity": "sha512-aSLEDudu6OoRr/2rU609gRmnYboRLxgDG1z9o2Q0os7236FwvcqIOO8r8U5JUEwivZOhDaKlFO4SbPTJYyBEyQ==" + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", + "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" }, "sass-graph": { "version": "2.2.4", @@ -4543,12 +4304,6 @@ "integrity": "sha1-Yl2GWPhlr0Psliv8N2o3NZpJlMo=", "dev": true }, - "selfsigned": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-1.9.1.tgz", - "integrity": "sha1-zdpEktcNSGVw+HxlVGAjVY4d+lo=", - "dev": true - }, "semver": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz", @@ -4696,12 +4451,6 @@ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.4.15.tgz", "integrity": "sha1-AyAt9lwG0r2MfsI2KhkwVv7407E=" }, - "spawn-rx": { - "version": "2.0.11", - "resolved": "https://registry.npmjs.org/spawn-rx/-/spawn-rx-2.0.11.tgz", - "integrity": "sha1-ZUUa1lZigB2up1VJgyp4LeAEjb8=", - "dev": true - }, "spdx-correct": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-1.0.2.tgz", @@ -4790,14 +4539,7 @@ "string_decoder": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.0.2.tgz", - "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=", - "dependencies": { - "safe-buffer": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.0.1.tgz", - "integrity": "sha1-0mPKVGls2KMGtcplUekt5XkY++c=" - } - } + "integrity": "sha1-sp4fThEl+pehA4K4pTNze3SR4Xk=" }, "string-width": { "version": "1.0.2", @@ -4889,18 +4631,6 @@ "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", "dev": true }, - "thenify": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/thenify/-/thenify-3.3.0.tgz", - "integrity": "sha1-5p44obq+lpsBCCB5eLn2K4hgSDk=", - "dev": true - }, - "thenify-all": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/thenify-all/-/thenify-all-1.6.0.tgz", - "integrity": "sha1-GhkY1ALY/D+Y+/I02wvMjMEOlyY=", - "dev": true - }, "through": { "version": "2.3.8", "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", @@ -4928,12 +4658,6 @@ } } }, - "thunky": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/thunky/-/thunky-0.1.0.tgz", - "integrity": "sha1-vzAUaCTituZ7Dy16Ssi+smkIaE4=", - "dev": true - }, "timers-browserify": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.2.tgz", @@ -5124,9 +4848,9 @@ "dev": true }, "uuid": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.1.0.tgz", - "integrity": "sha512-DIWtzUkw04M4k3bf1IcpS2tngXEL26YUD2M0tMDUpnUrz2hgzUBlD55a4FjdLGPvfHxS6uluGWvaVEqgBcVa+g==" + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.0.1.tgz", + "integrity": "sha1-ZUS7ot/ajBzxfmKaOjBeK7H+5sE=" }, "v8flags": { "version": "2.1.1", @@ -5237,9 +4961,9 @@ "dev": true }, "webpack-dev-server": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.5.0.tgz", - "integrity": "sha1-TTanKLA7iyr6SO0wJCiEfOooQK0=", + "version": "2.4.5", + "resolved": "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-2.4.5.tgz", + "integrity": "sha1-MThM6BE2vhCAtLTN4OubkOVO5s8=", "dev": true, "dependencies": { "camelcase": { @@ -5248,32 +4972,6 @@ "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", "dev": true }, - "del": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/del/-/del-3.0.0.tgz", - "integrity": "sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU=", - "dev": true - }, - "globby": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/globby/-/globby-6.1.0.tgz", - "integrity": "sha1-9abXDoOV4hyFj7BInWTfAkJNUGw=", - "dev": true, - "dependencies": { - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", - "dev": true - } - } - }, - "pify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", - "integrity": "sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=", - "dev": true - }, "supports-color": { "version": "3.2.3", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", diff --git a/ui/package.json b/ui/package.json index 0face051b..2ffe670a8 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "lbry-web-ui", - "version": "0.12.2rc5", + "version": "0.12.2rc3", "description": "LBRY UI", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", @@ -16,11 +16,11 @@ "name": "LBRY Inc.", "email": "hello@lbry.io" }, - "license": "MIT", + "license": "SEE LICENSE IN LICENSE.md", "bugs": { "url": "https://github.com/lbryio/lbry-app/issues" }, - "homepage": "https://github.com/lbryio/lbry-app", + "homepage": "https://github.com/lbryio/lbry-app#readme", "dependencies": { "babel-cli": "^6.11.4", "babel-preset-es2015": "^6.13.2", @@ -28,7 +28,6 @@ "from2": "^2.3.0", "jshashes": "^1.0.6", "localforage": "^1.5.0", - "keytar": "^4.0.3", "node-sass": "^3.8.0", "rc-progress": "^2.0.6", "react": "^15.4.0", @@ -55,7 +54,6 @@ "babel-preset-es2015": "^6.18.0", "babel-preset-react": "^6.16.0", "babel-preset-stage-2": "^6.18.0", - "electron-rebuild": "^1.5.11", "eslint": "^3.10.2", "eslint-config-airbnb": "^13.0.0", "eslint-loader": "^1.6.1", @@ -66,7 +64,6 @@ "i18n-extract": "^0.4.4", "json-loader": "^0.5.4", "lint-staged": "^3.6.0", - "node-loader": "^0.6.0", "node-sass": "^3.13.0", "prettier": "^1.4.2", "webpack": "^2.6.1", diff --git a/ui/watch.sh b/ui/watch.sh index bb0cc6d7b..91893b1c6 100755 --- a/ui/watch.sh +++ b/ui/watch.sh @@ -7,19 +7,16 @@ set -euo pipefail DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -( - cd "$DIR" - mkdir -p $DIR/dist/css - mkdir -p $DIR/dist/js +mkdir -p $DIR/dist/css +mkdir -p $DIR/dist/js - if [ ! -d "$DIR/node_modules" ]; then - echo "Installing NPM modules" - npm install - fi +if [ ! -d "$DIR/node_modules" ]; then + echo "Installing NPM modules" + npm install +fi - # run sass once without --watch to force update. then run with --watch to keep watching - node_modules/.bin/node-sass --output $DIR/../app/dist/css --sourcemap=none $DIR/scss/ - node_modules/.bin/node-sass --output $DIR/../app/dist/css --sourcemap=none --watch $DIR/scss/ & +# run sass once without --watch to force update. then run with --watch to keep watching +$DIR/node_modules/.bin/node-sass --output $DIR/../app/dist/css --sourcemap=none $DIR/scss/ +$DIR/node_modules/.bin/node-sass --output $DIR/../app/dist/css --sourcemap=none --watch $DIR/scss/ & - node_modules/.bin/webpack --config webpack.dev.config.js --progress --colors --watch -) \ No newline at end of file +node_modules/.bin/webpack --config webpack.dev.config.js --progress --colors --watch diff --git a/ui/webpack.config.js b/ui/webpack.config.js index fd890022e..b0ab6f08a 100644 --- a/ui/webpack.config.js +++ b/ui/webpack.config.js @@ -33,10 +33,6 @@ module.exports = { // define an include so we check just the files we need include: PATHS.app }, - { - test: /\.node$/, - use: ["node-loader"] - }, { test: /\.css$/, use: ["style-loader", "css-loader"] diff --git a/ui/webpack.dev.config.js b/ui/webpack.dev.config.js index 604aa14d4..42107a3c5 100644 --- a/ui/webpack.dev.config.js +++ b/ui/webpack.dev.config.js @@ -41,10 +41,6 @@ module.exports = { // define an include so we check just the files we need include: PATHS.app }, - { - test: /\.node$/, - use: ["node-loader"] - }, { test: /\.css$/, use: ["style-loader", "css-loader"]