From 35a09dff0fbdd2e8fdf661e956897e46821137d6 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Thu, 12 Jan 2017 21:03:07 -0500 Subject: [PATCH 1/3] Bypass check for Flash being installed in MediaElement.js Needed because Safari now reports that Flash isn't installed, even when it is: https://webkit.org/blog/6589/next-steps-for-legacy-plug-ins --- dist/index.html | 2 +- dist/js/mediaelement/mediaelement-and-player.js | 10 ++++++++++ js/page/watch.js | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/dist/index.html b/dist/index.html index 79c4e9bc2..b4239bc9a 100644 --- a/dist/index.html +++ b/dist/index.html @@ -21,7 +21,7 @@
- + diff --git a/dist/js/mediaelement/mediaelement-and-player.js b/dist/js/mediaelement/mediaelement-and-player.js index dd8dbdb28..50cb73069 100755 --- a/dist/js/mediaelement/mediaelement-and-player.js +++ b/dist/js/mediaelement/mediaelement-and-player.js @@ -309,6 +309,16 @@ mejs.PluginDetector = { // main public function to test a plug version number PluginDetector.hasPluginVersion('flash',[9,0,125]); hasPluginVersion: function(plugin, v) { + /** + * Workaround for LBRY: Safari now reports Flash being disabled even when it's installed. + * So we have to pretend we know it's installed. (This also makes sure that users of all + * browsers get a "missing plugin" message if they don't have Flash installed.) + */ + + if (plugin == 'flash') { + return true; + } + var pv = this.plugins[plugin]; v[1] = v[1] || 0; v[2] = v[2] || 0; diff --git a/js/page/watch.js b/js/page/watch.js index c0bc2b67c..b145f1a65 100644 --- a/js/page/watch.js +++ b/js/page/watch.js @@ -34,7 +34,7 @@ var WatchPage = React.createClass({ mimeType: status.mime_type, }) var player = new MediaElementPlayer(this.refs.player, { - mode: 'auto_plugin', + mode: 'shim', plugins: ['flash'], setDimensions: false, }); From 5fa158f771556750a2d1db1a17395e8c20ef53d0 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Fri, 13 Jan 2017 16:58:46 -0500 Subject: [PATCH 2/3] Remove startup notice code The API method for this (get_start_notice()) is now deprecated --- js/app.js | 14 -------------- js/lbry.js | 4 ---- 2 files changed, 18 deletions(-) diff --git a/js/app.js b/js/app.js index 19c97994e..0bcbb883f 100644 --- a/js/app.js +++ b/js/app.js @@ -43,21 +43,10 @@ var App = React.createClass({ pageArgs: typeof val !== 'undefined' ? val : null, errorInfo: null, modal: null, - startNotice: null, updateUrl: null, isOldOSX: null, }; }, - componentDidMount: function() { - lbry.getStartNotice(function(notice) { - if (notice) { - this.setState({ - modal: 'startNotice', - startNotice: notice - }); - } - }); - }, componentWillMount: function() { document.addEventListener('unhandledError', (event) => { this.alertError(event.detail); @@ -212,9 +201,6 @@ var App = React.createClass({
{mainContent} - - {this.state.startNotice} -

Your version of LBRY is out of date and may be unreliable or insecure.

diff --git a/js/lbry.js b/js/lbry.js index 5dbf338ae..9563d4195 100644 --- a/js/lbry.js +++ b/js/lbry.js @@ -124,10 +124,6 @@ lbry.getDaemonStatus = function (callback) { lbry.call('daemon_status', {}, callback); }; -lbry.getStartNotice = function(callback) { - lbry.call('get_start_notice', {}, callback); -} - lbry.checkFirstRun = function(callback) { lbry.call('is_first_run', {}, callback); } From 9f5c57f93af2c5969341aefab679a3eb0169cfef Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Fri, 13 Jan 2017 17:05:09 -0500 Subject: [PATCH 3/3] Add ARIA labels for all modals --- js/app.js | 8 +++++--- js/component/link.js | 12 ++++++++---- js/page/claim_code.js | 18 ++++++++++++------ js/page/my_files.js | 2 +- js/page/publish.js | 6 ++++-- js/page/referral.js | 9 ++++++--- js/page/report.js | 3 ++- js/page/wallet.js | 3 ++- 8 files changed, 40 insertions(+), 21 deletions(-) diff --git a/js/app.js b/js/app.js index 0bcbb883f..c87017c28 100644 --- a/js/app.js +++ b/js/app.js @@ -201,15 +201,17 @@ var App = React.createClass({
{mainContent} - +

Your version of LBRY is out of date and may be unreliable or insecure.

{this.state.isOldOSX ?

Before installing the new version, make sure to exit LBRY. If you started the app, click the LBRY icon in your status bar and choose "Quit."

: null}
- +

Error

diff --git a/js/component/link.js b/js/component/link.js index e1ddff543..99ce1e627 100644 --- a/js/component/link.js +++ b/js/component/link.js @@ -144,14 +144,17 @@ export let DownloadLink = React.createClass({ - +

Downloading to:

{this.state.filePath}
- + You don't have enough LBRY credits to pay for this stream. - + LBRY was unable to download the stream lbry://{this.props.streamName}.
@@ -208,7 +211,8 @@ export let WatchLink = React.createClass({ - + You don't have enough LBRY credits to pay for this stream. diff --git a/js/page/claim_code.js b/js/page/claim_code.js index 5294bd6e2..41b1e571a 100644 --- a/js/page/claim_code.js +++ b/js/page/claim_code.js @@ -119,16 +119,20 @@ var ClaimCodePage = React.createClass({
- + Please enter an invitation code or choose "Skip." - + Please enter an email address or choose "Skip." - + {this.state.failureReason} - + Your invite code has been redeemed. {this.state.referralCredits > 0 ? `You have also earned ${referralCredits} credits from referrals. A total of ${activationCredits + referralCredits} @@ -137,10 +141,12 @@ var ClaimCodePage = React.createClass({ ? `${this.state.activationCredits} credits will be added to your balance shortly.` : 'The credits will be added to your balance shortly.')} - + Welcome to LBRY! You can visit the Wallet page to redeem an invite code at any time. - +

LBRY couldn't connect to our servers to confirm your invitation code. Please check your internet connection.

If you continue to have problems, you can still browse LBRY and visit the Settings page to redeem your code later.
diff --git a/js/page/my_files.js b/js/page/my_files.js index fb55a7f23..2d6b28e66 100644 --- a/js/page/my_files.js +++ b/js/page/my_files.js @@ -56,7 +56,7 @@ var MyFilesRowMoreMenu = React.createClass({ - Are you sure you'd like to delete {this.props.title}? This will {this.props.completed ? ' stop the download and ' : ''} permanently remove the file from your system. diff --git a/js/page/publish.js b/js/page/publish.js index 26567b9f6..70e1b851d 100644 --- a/js/page/publish.js +++ b/js/page/publish.js @@ -493,11 +493,13 @@ var PublishPage = React.createClass({ - +

Your file has been published to LBRY at the address lbry://{this.state.name}!

You will now be taken to your My Files page, where your newly published file will be listed. The file will take a few minutes to appear for other LBRY users; until then it will be listed as "pending."
- + The following error occurred when attempting to publish your file: {this.state.errorMessage} diff --git a/js/page/referral.js b/js/page/referral.js index 4a04a2718..f3eb0cab1 100644 --- a/js/page/referral.js +++ b/js/page/referral.js @@ -108,15 +108,18 @@ var ReferralPage = React.createClass({ - + {this.state.referralCredits > 0 ? `You have earned ${response.referralCredits} credits from referrals. We will credit your account shortly. Thanks!` : 'You have not earned any new referral credits since the last time you checked. Please check back in a week or two.'} - + {this.state.failureReason} - + LBRY couldn't connect to our servers to confirm your referral code. Please check your internet connection. diff --git a/js/page/report.js b/js/page/report.js index 6cac655a7..47a4d2a7a 100644 --- a/js/page/report.js +++ b/js/page/report.js @@ -49,7 +49,8 @@ var ReportPage = React.createClass({

Developer?

You can also . - + Your bug report has been submitted! Thank you for your feedback. diff --git a/js/page/wallet.js b/js/page/wallet.js index bbc0505a6..05ee8db9e 100644 --- a/js/page/wallet.js +++ b/js/page/wallet.js @@ -151,7 +151,8 @@ var SendToAddressSection = React.createClass({ : '' } - + Insufficient balance: after this transaction you would have less than 1 LBC in your wallet.