Staging #1066

Merged
jessopb merged 55 commits from staging into release 2020-05-16 17:08:51 +02:00
11 changed files with 60 additions and 69 deletions
Showing only changes of commit 3d36f136f1 - Show all commits

View file

@ -1,4 +1,3 @@
sudo: true
dist: xenial dist: xenial
#addons: #addons:
# apt: # apt:
@ -9,7 +8,7 @@ dist: xenial
# - mysql-client # - mysql-client
language: node_js language: node_js
node_js: node_js:
- "lts/*" - "lts/dubnium"
cache: cache:
directories: directories:
- "node_modules" - "node_modules"

View file

@ -1,6 +1,6 @@
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2017-2019 LBRY Inc. Copyright (c) 2017-2020 LBRY Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,

View file

@ -3,6 +3,8 @@
spee.ch provides a user-friendly, custom-designed, image and video hosting site backed by a decentralized network and spee.ch provides a user-friendly, custom-designed, image and video hosting site backed by a decentralized network and
blockchain ([LBRY](https://lbry.tech/)). Via just a small set of config files, you can spin your an entire spee.ch site back up including assets. blockchain ([LBRY](https://lbry.tech/)). Via just a small set of config files, you can spin your an entire spee.ch site back up including assets.
**Please note: the spee.ch code base and setup instructions are no longer actively maintained now that we have lbry.tv. Proceed at your own caution. Setup will require dev ops skills.**
![App GIF](https://spee.ch/e/speechgif.gif) ![App GIF](https://spee.ch/e/speechgif.gif)
For a completely open, unrestricted example of a spee.ch site, check out https://www.spee.ch. For a completely open, unrestricted example of a spee.ch site, check out https://www.spee.ch.
@ -105,7 +107,7 @@ $ npm run start
#### Customize your app #### Customize your app
Check out the [customization guide](https://github.com/lbryio/spee.ch/blob/readme-update/customize.md) to change your app's appearance and components Check out the [customization guide](https://github.com/lbryio/spee.ch/blob/master/customize.md) to change your app's appearance and components
#### (optional) add custom components and update the styles #### (optional) add custom components and update the styles

View file

@ -16,7 +16,7 @@ import EditPage from '@pages/EditPage';
const App = () => { const App = () => {
return ( return (
<Switch> <Switch>
<Route exact path='/' component={HomePage} /> <Route exact path='/' component={AboutPage} />
<Route exact path='/about' component={AboutPage} /> <Route exact path='/about' component={AboutPage} />
<Route exact path='/tos' component={TosPage} /> <Route exact path='/tos' component={TosPage} />
<Route exact path='/faq' component={FaqPage} /> <Route exact path='/faq' component={FaqPage} />

View file

@ -1,32 +1,13 @@
import React from 'react'; import React from 'react';
import Row from '@components/Row'; import Row from '@components/Row';
import {Link} from 'react-router-dom';
const AboutSpeechDetails = () => { const AboutSpeechDetails = () => {
return ( return (
<div> <div>
<Row> <Row>
<p className={'text--large'}> <p className={'text--large'}>
<Link className={'link--primary'} to='/tos'>Terms of Service</Link> Spee.ch's journey may be on hold, but LBRY is still on mission. We'd like to thank all of our testers and early adopters for helping us explore this use case.
<br /> We're really excited about <a className='link--primary' href='https://lbry.tv' target='_blank'>lbry.tv</a> and can't wait to see you over there for a fully featured experience.
<Link className={'link--primary'} to='/faq'>Frequently Asked Questions</Link>
</p>
</Row>
<Row>
<p className={'text--large'}>
Spee.ch is a media-hosting site that reads from and publishes content to the <a className='link--primary' href='https://lbry.com'>LBRY</a> blockchain.
</p>
<p className={'text--large'}>
Spee.ch is a hosting service, but with the added benefit that it stores your content on a decentralized network of computers -- the <a className='link--primary' href='https://lbry.com/get'>LBRY</a> network. This means that your images are stored in multiple locations without a single point of failure.
</p>
</Row>
<Row>
<h3>Contribute</h3>
<p className={'text--large'}>
If you have an idea for your own spee.ch-like site on top of LBRY, fork our <a className='link--primary' href='https://github.com/lbryio/spee.ch'>github repo</a> and go to town!
</p>
<p className={'text--large'}>
If you want to improve spee.ch, join our <a className='link--primary' href='https://chat.lbry.com'>discord channel</a> or solve one of our <a className='link--primary' href='https://github.com/lbryio/spee.ch/issues'>github issues</a>.
</p> </p>
</Row> </Row>
</div> </div>

View file

@ -5,14 +5,13 @@ const AboutSpeechOverview = () => {
return ( return (
<div> <div>
<Row> <Row>
<p className={'text--extra-large'}>Spee.ch is an open-source project. Please contribute to the existing site, or fork it and make your own.</p> <p className={'text--extra-large'}>Lbry is no longer supporting Spee.ch. However, we're excited to show you <a className='link--primary' href='https://lbry.tv' target='_blank'>lbry.tv</a>!</p>
</Row> </Row>
<Row> <Row>
<div className={'text--large'}> <div className={'text--large'}>
<a className='link--primary' target='_blank' href='https://twitter.com/spee_ch'>TWITTER</a><br/> <a className='link--primary' target='_blank' href='https://twitter.com/lbry'>TWITTER</a><br/>
<a className='link--primary' target='_blank' href='https://github.com/lbryio/spee.ch'>GITHUB</a><br/> <a className='link--primary' target='_blank' href='https://github.com/lbryio/'>GITHUB</a><br/>
<a className='link--primary' target='_blank' href='https://discord.gg/YjYbwhS'>DISCORD CHANNEL</a><br/> <a className='link--primary' target='_blank' href='https://discord.gg/YjYbwhS'>DISCORD CHANNEL</a><br/>
<a className='link--primary' target='_blank' href='https://github.com/lbryio/spee.ch/blob/master/README.md'>DOCUMENTATION</a><br/>
</div> </div>
</Row> </Row>
</div> </div>

View file

@ -33,14 +33,14 @@ class NavigationLinks extends React.Component {
const { channelName, showPublish, closedRegistration } = this.props; const { channelName, showPublish, closedRegistration } = this.props;
return ( return (
<div className='navigation-links'> <div className='navigation-links'>
{showPublish && <NavLink {/*{showPublish && <NavLink*/}
className='nav-bar-link link--nav' {/* className='nav-bar-link link--nav'*/}
activeClassName='link--nav-active' {/* activeClassName='link--nav-active'*/}
to='/' {/* to='/'*/}
exact {/* exact*/}
> {/*>*/}
Publish {/* Publish*/}
</NavLink>} {/*</NavLink>}*/}
<NavLink <NavLink
className='nav-bar-link link--nav' className='nav-bar-link link--nav'
activeClassName='link--nav-active' activeClassName='link--nav-active'
@ -48,24 +48,24 @@ class NavigationLinks extends React.Component {
> >
About About
</NavLink> </NavLink>
{ channelName ? ( {/*{ channelName ? (*/}
<NavBarChannelOptionsDropdown {/* <NavBarChannelOptionsDropdown*/}
channelName={this.props.channelName} {/* channelName={this.props.channelName}*/}
handleSelection={this.handleSelection} {/* handleSelection={this.handleSelection}*/}
defaultSelection={this.props.channelName} {/* defaultSelection={this.props.channelName}*/}
VIEW={VIEW} {/* VIEW={VIEW}*/}
LOGOUT={LOGOUT} {/* LOGOUT={LOGOUT}*/}
/> {/* />*/}
) : !closedRegistration && ( {/*) : !closedRegistration && (*/}
<NavLink {/* <NavLink*/}
id='nav-bar-login-link' {/* id='nav-bar-login-link'*/}
className='nav-bar-link link--nav' {/* className='nav-bar-link link--nav'*/}
activeClassName='link--nav-active' {/* activeClassName='link--nav-active'*/}
to='/login' {/* to='/login'*/}
> {/* >*/}
Channel {/* Channel*/}
</NavLink> {/* </NavLink>*/}
)} {/*)}*/}
</div> </div>
); );
} }

View file

@ -7,6 +7,9 @@ class PublishDisabledMessage extends React.Component {
<div className={'publish-disabled-message'}> <div className={'publish-disabled-message'}>
<div className={'message'}> <div className={'message'}>
<p className={'text--secondary'}>Publishing is currently disabled.</p> <p className={'text--secondary'}>Publishing is currently disabled.</p>
<p className={'text--secondary'}>
Try <a className='link--primary' href='https://lbry.tv' target='_blank'>lbry.tv</a>
</p>
<p className={'text--secondary'}>{message}</p> <p className={'text--secondary'}>{message}</p>
</div> </div>
</div> </div>

View file

@ -201,6 +201,10 @@ export default (db, table, sequelize) => ({
} }
return claimArray[0]; return claimArray[0];
})
.catch(error => {
logger.verbose(`resolveClaim failed: ${error}`)
reject(error);
}); });
}, },

View file

@ -64,18 +64,19 @@ const getClaimIdAndServeAsset = (
claimDataValues.outpoint || claimDataValues.outpoint ||
`${claimDataValues.transaction_hash_id}:${claimDataValues.vout}`; `${claimDataValues.transaction_hash_id}:${claimDataValues.vout}`;
logger.debug('Outpoint:', outpoint); logger.debug('Outpoint:', outpoint);
return db.Blocked.isNotBlocked(outpoint).then(() => { return db.Blocked.isNotBlocked(outpoint)
// .then(() => {
// If content was found, is approved, and not blocked - log a view. // If content was found, is approved, and not blocked - log a view.
if (headers && headers['user-agent'] && /LBRY/.test(headers['user-agent']) === false) { // if (headers && headers['user-agent'] && /LBRY/.test(headers['user-agent']) === false) {
db.Views.create({ // db.Views.create({
time: Date.now(), // time: Date.now(),
isChannel: false, // isChannel: false,
claimId: claimDataValues.claim_id || claimDataValues.claimId, // claimId: claimDataValues.claim_id || claimDataValues.claimId,
publisherId: claimDataValues.publisher_id || claimDataValues.certificateId, // publisherId: claimDataValues.publisher_id || claimDataValues.certificateId,
ip, // ip,
}); // });
} // }
}); // });
}) })
.then(() => { .then(() => {
return db.File.findOne({ return db.File.findOne({

View file

@ -13,8 +13,10 @@ const awaitFileSize = (outpoint, size, interval, timeout) => {
function checkFileList() { function checkFileList() {
logger.debug('checkFileList'); logger.debug('checkFileList');
return getFileListFileByOutpoint(outpoint).then(result => { return getFileListFileByOutpoint(outpoint).then(result => {
logger.debug('File List Result', result); const { items: fileInfos } = result;
if (result[0]['completed'] === true || result[0]['written_bytes'] > size) { const fileInfo = fileInfos[0];
logger.debug('File List Result', fileInfo);
if (fileInfo.completed === true || fileInfo.written_bytes > size) {
logger.debug('FILE READY'); logger.debug('FILE READY');
return 'ready'; return 'ready';
} else if (timeout !== 0 && Date.now() - start > timeout) { } else if (timeout !== 0 && Date.now() - start > timeout) {