Merge pull request #134 from lbryio/development
Merge development into master
This commit is contained in:
commit
8ce5e23c8f
12 changed files with 52 additions and 41 deletions
2
dist/index.html
vendored
2
dist/index.html
vendored
|
@ -21,7 +21,7 @@
|
|||
<body>
|
||||
<div id="canvas"></div>
|
||||
<script src="./js/mediaelement/jquery.js"></script>
|
||||
<script src="./js/mediaelement/mediaelement-and-player.min.js"></script>
|
||||
<script src="./js/mediaelement/mediaelement-and-player.js"></script>
|
||||
<script src="./js/bundle.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
10
dist/js/mediaelement/mediaelement-and-player.js
vendored
10
dist/js/mediaelement/mediaelement-and-player.js
vendored
|
@ -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;
|
||||
|
|
22
js/app.js
22
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,18 +201,17 @@ var App = React.createClass({
|
|||
<Header onOpenDrawer={this.openDrawer} onSearch={this.onSearch} links={headerLinks} viewingPage={this.state.viewingPage} />
|
||||
{mainContent}
|
||||
</div>
|
||||
<Modal isOpen={this.state.modal == 'startNotice'} onConfirmed={this.closeModal}>
|
||||
{this.state.startNotice}
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'upgrade'} type="confirm" confirmButtonLabel="Upgrade" abortButtonLabel="Skip"
|
||||
onConfirmed={this.handleUpgradeClicked} onAborted={this.handleSkipClicked} >
|
||||
<Modal isOpen={this.state.modal == 'upgrade'} contentLabel="Update available"
|
||||
type="confirm" confirmButtonLabel="Upgrade" abortButtonLabel="Skip"
|
||||
onConfirmed={this.handleUpgradeClicked} onAborted={this.handleSkipClicked}>
|
||||
<p>Your version of LBRY is out of date and may be unreliable or insecure.</p>
|
||||
{this.state.isOldOSX
|
||||
? <p>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."</p>
|
||||
: null}
|
||||
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'error'} type="custom" className="error-modal" overlayClassName="error-modal-overlay" >
|
||||
<Modal isOpen={this.state.modal == 'error'} contentLabel="Error" type="custom"
|
||||
className="error-modal" overlayClassName="error-modal-overlay" >
|
||||
<h3 className="modal__header">Error</h3>
|
||||
|
||||
<div className="error-modal__content">
|
||||
|
|
|
@ -144,14 +144,17 @@ export let DownloadLink = React.createClass({
|
|||
<span className="button-container">
|
||||
<Link button={this.props.button} hidden={this.props.hidden} style={this.props.style}
|
||||
disabled={this.state.downloading} label={label} icon={this.props.icon} onClick={this.handleClick} />
|
||||
<Modal className="download-started-modal" isOpen={this.state.modal == 'downloadStarted'} onConfirmed={this.closeModal}>
|
||||
<Modal className="download-started-modal" isOpen={this.state.modal == 'downloadStarted'}
|
||||
contentLabel="Download started" onConfirmed={this.closeModal}>
|
||||
<p>Downloading to:</p>
|
||||
<div className="download-started-modal__file-path">{this.state.filePath}</div>
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'notEnoughCredits'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'notEnoughCredits'} contentLabel="Not enough credits"
|
||||
onConfirmed={this.closeModal}>
|
||||
You don't have enough LBRY credits to pay for this stream.
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'timedOut'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'timedOut'} contentLabel="Download failed"
|
||||
onConfirmed={this.closeModal}>
|
||||
LBRY was unable to download the stream <strong>lbry://{this.props.streamName}</strong>.
|
||||
</Modal>
|
||||
</span>
|
||||
|
@ -208,7 +211,8 @@ export let WatchLink = React.createClass({
|
|||
<Link button={this.props.button} hidden={this.props.hidden} style={this.props.style}
|
||||
disabled={this.state.loading} label={this.props.label} icon={this.props.icon}
|
||||
onClick={this.handleClick} />
|
||||
<Modal isOpen={this.state.modal == 'notEnoughCredits'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'notEnoughCredits'} contentLabel="Not enough credits"
|
||||
onConfirmed={this.closeModal}>
|
||||
You don't have enough LBRY credits to pay for this stream.
|
||||
</Modal>
|
||||
</span>
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -119,16 +119,20 @@ var ClaimCodePage = React.createClass({
|
|||
</section>
|
||||
</div>
|
||||
</form>
|
||||
<Modal isOpen={this.state.modal == 'missingCode'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'missingCode'} contentLabel="Invitation code required"
|
||||
onConfirmed={this.closeModal}>
|
||||
Please enter an invitation code or choose "Skip."
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'missingEmail'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'missingEmail'} contentLabel="Email required"
|
||||
onConfirmed={this.closeModal}>
|
||||
Please enter an email address or choose "Skip."
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'codeRedeemFailed'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'codeRedeemFailed'} contentLabel="Failed to redeem code"
|
||||
onConfirmed={this.closeModal}>
|
||||
{this.state.failureReason}
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'codeRedeemed'} onConfirmed={this.handleFinished}>
|
||||
<Modal isOpen={this.state.modal == 'codeRedeemed'} contentLabel="Code redeemed"
|
||||
onConfirmed={this.handleFinished}>
|
||||
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.')}
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'skipped'} onConfirmed={this.handleFinished}>
|
||||
<Modal isOpen={this.state.modal == 'skipped'} contentLabel="Welcome to LBRY"
|
||||
onConfirmed={this.handleFinished}>
|
||||
Welcome to LBRY! You can visit the Wallet page to redeem an invite code at any time.
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'couldNotConnect'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'couldNotConnect'} contentLabel="Could not connect"
|
||||
onConfirmed={this.closeModal}>
|
||||
<p>LBRY couldn't connect to our servers to confirm your invitation code. Please check your internet connection.</p>
|
||||
If you continue to have problems, you can still browse LBRY and visit the Settings page to redeem your code later.
|
||||
</Modal>
|
||||
|
|
|
@ -56,7 +56,7 @@ var MyFilesRowMoreMenu = React.createClass({
|
|||
<MenuItem onClick={this.handleDeleteClicked} label="Remove and delete file" />
|
||||
</section>
|
||||
</Menu>
|
||||
<Modal isOpen={this.state.modal == 'confirmDelete'} type="confirm" confirmButtonLabel="Delete File"
|
||||
<Modal isOpen={this.state.modal == 'confirmDelete'} contentLabel="Confirm delete" type="confirm" confirmButtonLabel="Delete File"
|
||||
onConfirmed={this.handleDeleteConfirmed} onAborted={this.closeModal}>
|
||||
Are you sure you'd like to delete <cite>{this.props.title}</cite>? This will {this.props.completed ? ' stop the download and ' : ''}
|
||||
permanently remove the file from your system.
|
||||
|
|
|
@ -493,11 +493,13 @@ var PublishPage = React.createClass({
|
|||
</div>
|
||||
</form>
|
||||
|
||||
<Modal isOpen={this.state.modal == 'publishStarted'} onConfirmed={this.handlePublishStartedConfirmed}>
|
||||
<Modal isOpen={this.state.modal == 'publishStarted'} contentLabel="File published"
|
||||
onConfirmed={this.handlePublishStartedConfirmed}>
|
||||
<p>Your file has been published to LBRY at the address <code>lbry://{this.state.name}</code>!</p>
|
||||
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."
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'error'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'error'} contentLabel="Error publishing file"
|
||||
onConfirmed={this.closeModal}>
|
||||
The following error occurred when attempting to publish your file: {this.state.errorMessage}
|
||||
</Modal>
|
||||
</main>
|
||||
|
|
|
@ -108,15 +108,18 @@ var ReferralPage = React.createClass({
|
|||
</section>
|
||||
</div>
|
||||
</form>
|
||||
<Modal isOpen={this.state.modal == 'referralInfo'} onConfirmed={this.handleFinished}>
|
||||
<Modal isOpen={this.state.modal == 'referralInfo'} contentLabel="Credit earnings"
|
||||
onConfirmed={this.handleFinished}>
|
||||
{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.'}
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'lookupFailed'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'lookupFailed'} contentLabel={failureReason}
|
||||
onConfirmed={this.closeModal}>
|
||||
{this.state.failureReason}
|
||||
</Modal>
|
||||
<Modal isOpen={this.state.modal == 'couldNotConnect'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'couldNotConnect'} contentLabel="Couldn't confirm referral code"
|
||||
onConfirmed={this.closeModal}>
|
||||
LBRY couldn't connect to our servers to confirm your referral code. Please check your internet connection.
|
||||
</Modal>
|
||||
</main>
|
||||
|
|
|
@ -49,7 +49,8 @@ var ReportPage = React.createClass({
|
|||
<h3>Developer?</h3>
|
||||
You can also <Link href="https://github.com/lbryio/lbry/issues" label="submit an issue on GitHub"/>.
|
||||
</section>
|
||||
<Modal isOpen={this.state.modal == 'submitted'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal == 'submitted'} contentLabel="Bug report submitted"
|
||||
onConfirmed={this.closeModal}>
|
||||
Your bug report has been submitted! Thank you for your feedback.
|
||||
</Modal>
|
||||
</main>
|
||||
|
|
|
@ -151,7 +151,8 @@ var SendToAddressSection = React.createClass({
|
|||
: ''
|
||||
}
|
||||
</form>
|
||||
<Modal isOpen={this.state.modal === 'insufficientBalance'} onConfirmed={this.closeModal}>
|
||||
<Modal isOpen={this.state.modal === 'insufficientBalance'} contentLabel="Insufficient balance"
|
||||
onConfirmed={this.closeModal}>
|
||||
Insufficient balance: after this transaction you would have less than 1 LBC in your wallet.
|
||||
</Modal>
|
||||
</section>
|
||||
|
|
|
@ -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,
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue