diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d265b9d6..9de0e171f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,6 @@ Web UI version numbers should always match the corresponding version of LBRY App ### Changed * The credit balance displayed in the main app navigation displays two decimal places instead of one. * Moved all redux code into /redux folder - * Channel names in pages are highlighted to indicate them being clickable(#814) - * ### Fixed * Long channel names causing inconsistent thumbnail sizes (#721) diff --git a/src/renderer/js/component/uriIndicator/view.jsx b/src/renderer/js/component/uriIndicator/view.jsx index 3bf850d11..cff4bd073 100644 --- a/src/renderer/js/component/uriIndicator/view.jsx +++ b/src/renderer/js/component/uriIndicator/view.jsx @@ -1,8 +1,7 @@ import React from "react"; import { Icon } from "component/common"; import Link from "component/link"; -import lbryuri from "lbryuri"; -import classnames from "classnames"; +import lbryuri from "lbryuri.js"; class UriIndicator extends React.PureComponent { componentWillMount() { @@ -61,12 +60,7 @@ class UriIndicator extends React.PureComponent { const inner = ( - + {channelName} {" "} {!signatureIsValid ? ( diff --git a/src/renderer/js/main.js b/src/renderer/js/main.js index 9c63a17f0..759b2a179 100644 --- a/src/renderer/js/main.js +++ b/src/renderer/js/main.js @@ -9,8 +9,6 @@ import { doDaemonReady } from "redux/actions/app"; import { doNavigate } from "redux/actions/navigation"; import { doDownloadLanguages } from "redux/actions/settings"; import * as types from "constants/action_types"; -import amplitude from "amplitude-js"; -import lbry from "lbry"; const env = ENV; const { remote, ipcRenderer, shell } = require("electron"); @@ -50,23 +48,6 @@ ipcRenderer.on("window-is-focused", (event, data) => { document.addEventListener("click", event => { var target = event.target; while (target && target !== document) { - if (target.matches("a") || target.matches("button")) { - // TODO: Look into using accessiblity labels (this would also make the app more accessible) - let hrefParts = window.location.href.split("#"); - let element = target.title || target.text.trim(); - if (element) { - amplitude.getInstance().logEvent("CLICK", { - target: element, - location: - hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/", - }); - } else { - amplitude.getInstance().logEvent("UNMARKED_CLICK", { - location: - hrefParts.length > 1 ? hrefParts[hrefParts.length - 1] : "/", - }); - } - } if ( target.matches('a[href^="http"]') || target.matches('a[href^="mailto"]') @@ -85,28 +66,18 @@ var init = function() { app.store.dispatch(doDownloadLanguages()); function onDaemonReady() { - lbry.status().then(info => { - amplitude.getInstance().init( - // Amplitude API Key - "0b130efdcbdbf86ec2f7f9eff354033e", - info.lbry_id, - null, - function() { - window.sessionStorage.setItem("loaded", "y"); //once we've made it here once per session, we don't need to show splash again - app.store.dispatch(doDaemonReady()); + window.sessionStorage.setItem("loaded", "y"); //once we've made it here once per session, we don't need to show splash again + app.store.dispatch(doDaemonReady()); - ReactDOM.render( - -
- - -
-
, - canvas - ); - } - ); - }); + ReactDOM.render( + +
+ + +
+
, + canvas + ); } if (window.sessionStorage.getItem("loaded") == "y") { diff --git a/src/renderer/js/redux/actions/content.js b/src/renderer/js/redux/actions/content.js index ab3b630a8..cb0b3d766 100644 --- a/src/renderer/js/redux/actions/content.js +++ b/src/renderer/js/redux/actions/content.js @@ -280,13 +280,17 @@ export function doLoadVideo(uri) { dispatch(doDownloadFile(uri, streamInfo)); } }) - .catch(error => { + .catch(() => { dispatch(doSetPlayingUri(null)); dispatch({ type: types.LOADING_VIDEO_FAILED, data: { uri }, }); - dispatch(doAlertError(error)); + dispatch( + doAlertError( + `Failed to download ${uri}, please try again. If this problem persists, visit https://lbry.io/faq/support for support.` + ) + ); }); }; } diff --git a/src/renderer/js/redux/reducers/navigation.js b/src/renderer/js/redux/reducers/navigation.js index e32658b76..00453f9de 100644 --- a/src/renderer/js/redux/reducers/navigation.js +++ b/src/renderer/js/redux/reducers/navigation.js @@ -1,6 +1,5 @@ import * as types from "constants/action_types"; import { parseQueryParams } from "util/query_params"; -import amplitude from "amplitude-js"; const currentPath = () => { const hash = document.location.hash; @@ -70,14 +69,6 @@ reducers[types.WINDOW_SCROLLED] = (state, action) => { export default function reducer(state = defaultState, action) { const handler = reducers[action.type]; - if (handler) { - let nextState = handler(state, action); - if (nextState.currentPath !== state.currentPath) { - amplitude - .getInstance() - .logEvent("NAVIGATION", { destination: nextState.currentPath }); - } - return nextState; - } + if (handler) return handler(state, action); return state; } diff --git a/src/renderer/package.json b/src/renderer/package.json index 9e1c39247..4de4e9282 100644 --- a/src/renderer/package.json +++ b/src/renderer/package.json @@ -22,7 +22,6 @@ }, "homepage": "https://github.com/lbryio/lbry-app", "dependencies": { - "amplitude-js": "^4.0.0", "bluebird": "^3.5.1", "classnames": "^2.2.5", "formik": "^0.10.4", diff --git a/src/renderer/scss/component/_channel-indicator.scss b/src/renderer/scss/component/_channel-indicator.scss index 50b7648d0..6c63a4235 100644 --- a/src/renderer/scss/component/_channel-indicator.scss +++ b/src/renderer/scss/component/_channel-indicator.scss @@ -1,9 +1,9 @@ .channel-name { - display: inline-flex; + display: inline-block; overflow: hidden; white-space: nowrap; - text-overflow: ellipsis; + text-overflow: ellipsis } // this shouldn't know about the card width diff --git a/src/renderer/yarn.lock b/src/renderer/yarn.lock index 4aca36930..21c2d6ab3 100644 --- a/src/renderer/yarn.lock +++ b/src/renderer/yarn.lock @@ -2,13 +2,6 @@ # yarn lockfile v1 -"@segment/top-domain@^3.0.0": - version "3.0.0" - resolved "https://registry.yarnpkg.com/@segment/top-domain/-/top-domain-3.0.0.tgz#02e5a5a4fd42a9f6cf886b05e82f104012a3c3a7" - dependencies: - component-cookie "^1.1.2" - component-url "^0.2.1" - abbrev@1: version "1.1.1" resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8" @@ -64,8 +57,8 @@ ajv@^4.7.0, ajv@^4.9.1: json-stable-stringify "^1.0.1" ajv@^5.0.0, ajv@^5.1.0, ajv@^5.1.5, ajv@^5.2.3: - version "5.5.1" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.1.tgz#b38bb8876d9e86bee994956a04e721e88b248eb2" + version "5.5.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.0.tgz#eb2840746e9dc48bd5e063a36e3fd400c5eab5a9" dependencies: co "^4.6.0" fast-deep-equal "^1.0.0" @@ -88,16 +81,6 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -amplitude-js@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/amplitude-js/-/amplitude-js-4.0.0.tgz#70bbc0ec893b01d00453d3765f78bc0f32a395cc" - dependencies: - "@segment/top-domain" "^3.0.0" - blueimp-md5 "^2.10.0" - json3 "^3.3.2" - lodash "^4.17.4" - ua-parser-js "github:amplitude/ua-parser-js#ed538f1" - ansi-escapes@^1.0.0, ansi-escapes@^1.1.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" @@ -1022,10 +1005,6 @@ bluebird@^3.5.1: version "3.5.1" resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9" -blueimp-md5@^2.10.0: - version "2.10.0" - resolved "https://registry.yarnpkg.com/blueimp-md5/-/blueimp-md5-2.10.0.tgz#02f0843921f90dca14f5b8920a38593201d6964d" - bn.js@^4.0.0, bn.js@^4.1.0, bn.js@^4.1.1, bn.js@^4.4.0: version "4.11.8" resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.8.tgz#2cde09eb5ee341f484746bb0309b3253b1b1442f" @@ -1239,8 +1218,8 @@ caniuse-api@^1.5.2: lodash.uniq "^4.5.0" caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639: - version "1.0.30000778" - resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000778.tgz#167c60e9542a2aa60537c446fb3881d853a3072a" + version "1.0.30000775" + resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000775.tgz#04bccdd0214edf25b97f61a096609f7ad6904333" cardinal@^1.0.0: version "1.0.0" @@ -1505,16 +1484,6 @@ commonmark@^0.24.0: mdurl "~ 1.0.1" string.prototype.repeat "^0.2.0" -component-cookie@^1.1.2: - version "1.1.3" - resolved "https://registry.yarnpkg.com/component-cookie/-/component-cookie-1.1.3.tgz#053e14a3bd7748154f55724fd39a60c01994ebed" - dependencies: - debug "*" - -component-url@^0.2.1: - version "0.2.1" - resolved "https://registry.yarnpkg.com/component-url/-/component-url-0.2.1.tgz#4e4f4799c43ead9fd3ce91b5a305d220208fee47" - compressible@~2.0.11: version "2.0.12" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.12.tgz#c59a5c99db76767e9876500e271ef63b3493bd66" @@ -1804,18 +1773,18 @@ date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" -debug@*, debug@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" - dependencies: - ms "2.0.0" - debug@2.6.9, debug@^2.1.1, debug@^2.2.0, debug@^2.5.1, debug@^2.6.3, debug@^2.6.6, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" dependencies: ms "2.0.0" +debug@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1914,8 +1883,8 @@ detect-node@^2.0.3: resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" detective@^4.3.1: - version "4.7.0" - resolved "https://registry.yarnpkg.com/detective/-/detective-4.7.0.tgz#6276e150f9e50829ad1f90ace4d9a2304188afcf" + version "4.6.0" + resolved "https://registry.yarnpkg.com/detective/-/detective-4.6.0.tgz#d1a793ad0bcc829fa225465061096b7bca040527" dependencies: acorn "^5.2.1" defined "^1.0.0" @@ -1995,8 +1964,8 @@ electron-rebuild@^1.5.11: yargs "^7.0.2" electron-to-chromium@^1.2.7: - version "1.3.28" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.28.tgz#8dd4e6458086644e9f9f0a1cf32e2a1f9dffd9ee" + version "1.3.27" + resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.27.tgz#78ecb8a399066187bb374eede35d9c70565a803d" elegant-spinner@^1.0.1: version "1.0.1" @@ -2445,10 +2414,14 @@ extglob@^0.3.1: dependencies: is-extglob "^1.0.0" -extsprintf@1.3.0, extsprintf@^1.2.0: +extsprintf@1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05" +extsprintf@^1.2.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f" + falafel@^1.0.1: version "1.2.0" resolved "https://registry.yarnpkg.com/falafel/-/falafel-1.2.0.tgz#c18d24ef5091174a497f318cd24b026a25cddab4" @@ -2699,8 +2672,8 @@ fs-extra@^3.0.1: universalify "^0.1.0" fs-extra@^4.0.0: - version "4.0.3" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.3.tgz#0d852122e5bc5beb453fb028e9c0c9bf36340c94" + version "4.0.2" + resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-4.0.2.tgz#f91704c53d1b461f893452b0c307d9997647ab6b" dependencies: graceful-fs "^4.1.2" jsonfile "^4.0.0" @@ -4029,8 +4002,8 @@ marked-terminal@^1.6.2: node-emoji "^1.4.1" marked@*, marked@^0.3.6: - version "0.3.7" - resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.7.tgz#80ef3bbf1bd00d1c9cfebe42ba1b8c85da258d0d" + version "0.3.6" + resolved "https://registry.yarnpkg.com/marked/-/marked-0.3.6.tgz#b2c6c618fccece4ef86c4fc6cb8a7cbf5aeda8d7" "match-stream@>= 0.0.2 < 1": version "0.0.2" @@ -4146,7 +4119,11 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -"mime-db@>= 1.30.0 < 2", mime-db@~1.30.0: +"mime-db@>= 1.30.0 < 2": + version "1.32.0" + resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.32.0.tgz#485b3848b01a3cda5f968b4882c0771e58e09414" + +mime-db@~1.30.0: version "1.30.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.30.0.tgz#74c643da2dd9d6a45399963465b26d5ca7d71f01" @@ -4192,7 +4169,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: dependencies: brace-expansion "^1.1.7" -minimist@0.0.8, minimist@~0.0.1: +minimist@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -4200,6 +4177,10 @@ minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" +minimist@~0.0.1: + version "0.0.10" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" + mkdirp@0.5, mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1: version "0.5.1" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" @@ -4252,8 +4233,8 @@ nan@^2.3.0, nan@^2.3.2: resolved "https://registry.yarnpkg.com/nan/-/nan-2.8.0.tgz#ed715f3fe9de02b57a5e6252d90a96675e1f085a" natives@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.1.tgz#011acce1f7cbd87f7ba6b3093d6cd9392be1c574" + version "1.1.0" + resolved "https://registry.yarnpkg.com/natives/-/natives-1.1.0.tgz#e9ff841418a6b2ec7a495e939984f78f163e6e31" natural-compare@^1.4.0: version "1.4.0" @@ -4975,8 +4956,8 @@ postcss-minify-selectors@^2.0.4: postcss-selector-parser "^2.0.0" postcss-modules-extract-imports@^1.0.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.2.0.tgz#66140ecece38ef06bf0d3e355d69bf59d141ea85" + version "1.1.0" + resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb" dependencies: postcss "^6.0.1" @@ -5111,8 +5092,8 @@ preserve@^0.2.0: resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b" prettier@^1.4.2: - version "1.9.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.9.1.tgz#41638a0d47c1efbd1b7d5a742aaa5548eab86d70" + version "1.8.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.8.2.tgz#bff83e7fd573933c607875e5ba3abbdffb96aeb8" private@^0.1.6, private@^0.1.7, private@~0.1.5: version "0.1.8" @@ -5329,8 +5310,8 @@ react-markdown@^2.5.0: prop-types "^15.5.1" react-modal@^3.1.5: - version "3.1.7" - resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.1.7.tgz#21feb937c95cd722bf2d375cada751fdc8189c0e" + version "3.1.6" + resolved "https://registry.yarnpkg.com/react-modal/-/react-modal-3.1.6.tgz#82e63f1ec86b80e242518250d066ee37fa035f8a" dependencies: exenv "^1.2.0" prop-types "^15.5.10" @@ -5800,10 +5781,10 @@ rx-lite@^3.1.2: resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" rxjs@^5.0.0-beta.11, rxjs@^5.1.1: - version "5.5.4" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.4.tgz#66a466acb21270b5f441645a1141f95fcae10ee6" + version "5.5.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.2.tgz#28d403f0071121967f18ad665563255d54236ac3" dependencies: - symbol-observable "1.0.1" + symbol-observable "^1.0.1" safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.1" @@ -6121,7 +6102,11 @@ staged-git-files@0.0.4: version "0.0.4" resolved "https://registry.yarnpkg.com/staged-git-files/-/staged-git-files-0.0.4.tgz#d797e1b551ca7a639dec0237dc6eb4bb9be17d35" -"statuses@>= 1.3.1 < 2", statuses@~1.3.1: +"statuses@>= 1.3.1 < 2": + version "1.4.0" + resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087" + +statuses@~1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.3.1.tgz#faf51b9eb74aaef3b3acf4ad5f61abf24cb7b93e" @@ -6272,11 +6257,7 @@ svgo@^0.7.0: sax "~1.2.1" whet.extend "~0.9.9" -symbol-observable@1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4" - -symbol-observable@^1.0.3: +symbol-observable@^1.0.1, symbol-observable@^1.0.3: version "1.1.0" resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.1.0.tgz#5c68fd8d54115d9dfb72a84720549222e8db9b32" @@ -6447,10 +6428,6 @@ ua-parser-js@^0.7.9: version "0.7.17" resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac" -"ua-parser-js@github:amplitude/ua-parser-js#ed538f1": - version "0.7.10" - resolved "https://codeload.github.com/amplitude/ua-parser-js/tar.gz/ed538f1" - uglify-js@^2.8.29: version "2.8.29" resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" @@ -6766,8 +6743,8 @@ webpack@^1.12.0: webpack-core "~0.6.9" webpack@^3.0.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.10.0.tgz#5291b875078cf2abf42bdd23afe3f8f96c17d725" + version "3.9.1" + resolved "https://registry.yarnpkg.com/webpack/-/webpack-3.9.1.tgz#9a60aa544ed5d4d454c069e3f521aa007e02643c" dependencies: acorn "^5.0.0" acorn-dynamic-import "^2.0.0"