Compare commits
11 commits
fixesJan20
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
99c7b087d7 | ||
|
67e198db2f | ||
|
b410eb8c94 | ||
|
efc38529c7 | ||
|
dfa6db6276 | ||
|
9df4d29dda | ||
|
7940c61b17 | ||
|
5ed72b0e14 | ||
|
922a53cc30 | ||
|
d11ba6225e | ||
|
3d23635bf5 |
10 changed files with 69 additions and 73 deletions
2
LICENSE
2
LICENSE
|
@ -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,
|
||||||
|
|
|
@ -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} />
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import ErrorPage from '@pages/ErrorPage';
|
||||||
import ShowAssetLite from '@pages/ShowAssetLite';
|
import ShowAssetLite from '@pages/ShowAssetLite';
|
||||||
import ShowAssetDetails from '@pages/ShowAssetDetails';
|
import ShowAssetDetails from '@pages/ShowAssetDetails';
|
||||||
import ShowChannel from '@pages/ShowChannel';
|
import ShowChannel from '@pages/ShowChannel';
|
||||||
import { withRouter } from 'react-router-dom';
|
import { withRouter, Redirect } from 'react-router-dom';
|
||||||
|
|
||||||
import {
|
import {
|
||||||
CHANNEL,
|
CHANNEL,
|
||||||
|
@ -15,15 +15,24 @@ import {
|
||||||
class ContentPageWrapper extends React.Component {
|
class ContentPageWrapper extends React.Component {
|
||||||
componentDidMount () {
|
componentDidMount () {
|
||||||
const { onHandleShowPageUri, match, homeChannel } = this.props;
|
const { onHandleShowPageUri, match, homeChannel } = this.props;
|
||||||
onHandleShowPageUri(homeChannel ? { claim: homeChannel } : match.params);
|
//onHandleShowPageUri(homeChannel ? { claim: homeChannel } : match.params);
|
||||||
}
|
}
|
||||||
componentWillReceiveProps (nextProps) {
|
componentWillReceiveProps (nextProps) {
|
||||||
if (nextProps.match.params !== this.props.match.params) {
|
if (nextProps.match.params !== this.props.match.params) {
|
||||||
this.props.onHandleShowPageUri(nextProps.match.params);
|
//this.props.onHandleShowPageUri(nextProps.match.params);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
render () {
|
render () {
|
||||||
const { error, requestType } = this.props;
|
const { error, requestType, match } = this.props;
|
||||||
|
const { params } = match;
|
||||||
|
const { claim, identifier } = params;
|
||||||
|
if (identifier && claim) {
|
||||||
|
return <Redirect to={`https://lbry.tv/${identifier}/${claim}`} />;
|
||||||
|
} else if (identifier) {
|
||||||
|
// return <Redirect to={`https://lbry.tv/${identifier}/`} />
|
||||||
|
} else {
|
||||||
|
return <Redirect to={`https://lbry.tv/${claim}`} />;
|
||||||
|
}
|
||||||
if (error) {
|
if (error) {
|
||||||
return (
|
return (
|
||||||
<ErrorPage error={error} />
|
<ErrorPage error={error} />
|
||||||
|
@ -31,13 +40,13 @@ class ContentPageWrapper extends React.Component {
|
||||||
}
|
}
|
||||||
switch (requestType) {
|
switch (requestType) {
|
||||||
case CHANNEL:
|
case CHANNEL:
|
||||||
return <ShowChannel />;
|
// return <ShowChannel />;
|
||||||
case ASSET_LITE:
|
case ASSET_LITE:
|
||||||
return <ShowAssetLite />;
|
// return <ShowAssetLite />;
|
||||||
case ASSET_DETAILS:
|
case ASSET_DETAILS:
|
||||||
return <ShowAssetDetails />;
|
// return <ShowAssetDetails />;
|
||||||
case SPECIAL_ASSET:
|
case SPECIAL_ASSET:
|
||||||
return <ShowChannel />;
|
// return <ShowChannel />;
|
||||||
default:
|
default:
|
||||||
return <p>loading...</p>;
|
return <p>loading...</p>;
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,6 +82,7 @@ export default (db, table, sequelize) => ({
|
||||||
};
|
};
|
||||||
const selectWhere = {
|
const selectWhere = {
|
||||||
...whereClause,
|
...whereClause,
|
||||||
|
claim_type: 1,
|
||||||
publisher_id: channelClaimId,
|
publisher_id: channelClaimId,
|
||||||
};
|
};
|
||||||
return await table
|
return await table
|
||||||
|
@ -103,6 +104,7 @@ export default (db, table, sequelize) => ({
|
||||||
.findAll({
|
.findAll({
|
||||||
where: {
|
where: {
|
||||||
name: claimName,
|
name: claimName,
|
||||||
|
claim_type: 1,
|
||||||
publisher_id: channelClaimId,
|
publisher_id: channelClaimId,
|
||||||
bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] },
|
bid_state: { [sequelize.Op.or]: ['Controlling', 'Active', 'Accepted'] },
|
||||||
},
|
},
|
||||||
|
@ -214,6 +216,7 @@ export default (db, table, sequelize) => ({
|
||||||
.findAll({
|
.findAll({
|
||||||
where: {
|
where: {
|
||||||
name: claimName,
|
name: claimName,
|
||||||
|
claim_type: 1,
|
||||||
publisher_id: channelId,
|
publisher_id: channelId,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
|
@ -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({
|
||||||
|
|
|
@ -2,6 +2,6 @@ module.exports = {
|
||||||
...require('./pages').default,
|
...require('./pages').default,
|
||||||
...require('./api').default,
|
...require('./api').default,
|
||||||
...require('./auth').default,
|
...require('./auth').default,
|
||||||
...require('./assets').default,
|
// ...require('./assets').default,
|
||||||
...require('./fallback').default,
|
...require('./fallback').default,
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue