diff --git a/README.md b/README.md index 33aee954..f32e93d7 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # Spee.ch Spee.ch is a web app that reads and publishes images and videos to and from the [LBRY](https://lbry.io/) blockchain. -## how to run this repository locally +## How to run this repository locally * start mysql * install mysql * create a database called `lbry` @@ -9,8 +9,6 @@ Spee.ch is a web app that reads and publishes images and videos to and from the * start lbrynet daemon * install the [`lbry`](https://github.com/lbryio/lbry) daemon * start the `lbry` daemon -* start spee.ch-sync - * install and run this [`speech-sync`](https://github.com/billbitt/spee.ch-sync) tool * start spee.ch * clone this repo * run `npm install` @@ -20,6 +18,9 @@ Spee.ch is a web app that reads and publishes images and videos to and from the * build the app by running `npm run build-prod` * to start the server, run `npm run start` * visit [localhost:3000](http://localhost:3000) +* start spee.ch-sync (optional, recommended) + * Note: this tool will decode blocks from the `lbry` blockchain and update the Claim and Certificate tables in mysql with all the claims from the blockchain. This is not necessary if you only want to host and resolve content published through your version of spee.ch, but it is required if you want to retrieve and host other content from the lbry network. + * install and run this [`speech-sync`](https://github.com/billbitt/spee.ch-sync) tool ## Tests * Spee.ch uses `mocha` with `chai` for testing. @@ -30,19 +31,19 @@ Spee.ch is a web app that reads and publishes images and videos to and from the #### GET * /api/claim/resolve/:name/:claimId - * example: `curl https://spee.ch/api/claim/resolve/doitlive/xyz` + * example: `curl https://spee.ch/api/claim/resolve/doitlive/xyz` * /api/claim/list/:name - * example: `curl https://spee.ch/api/claim/list/doitlive` -* /api/claim/availability/:name ( - * returns `true`/`false` for whether a name is available through spee.ch - * example: `curl https://spee.ch/api/claim/availability/doitlive` -* /api/channel/availability/:name ( - * returns `true`/`false` for whether a channel is available through spee.ch - * example: `curl https://spee.ch/api/channel/availability/@CoolChannel` + * example: `curl https://spee.ch/api/claim/list/doitlive` +* /api/claim/availability/:name + * returns the name if it is available + * example: `curl https://spee.ch/api/claim/availability/doitlive` +* /api/channel/availability/:name + * returns the name if it is available + * example: `curl https://spee.ch/api/channel/availability/@CoolChannel` #### POST * /api/claim/publish - * example: `curl -X POST -F 'name=MyPictureName' -F 'file=@/path/to/myPicture.jpeg' https://spee.ch/api/claim/publish` + * example: `curl -F 'name=MyPictureName' -F 'file=@/path/to/myPicture.jpeg' https://spee.ch/api/claim/publish` * Parameters: * `name` * `file` (must be type .mp4, .jpeg, .jpg, .gif, or .png) @@ -54,5 +55,5 @@ Spee.ch is a web app that reads and publishes images and videos to and from the * `channelName`(optional) * `channelPassword` (optional,; required if `channelName` is provided) -## bugs +## Bugs If you find a bug or experience a problem, please report your issue here on github and find us in the lbry discord! diff --git a/config/speechConfig.js.example b/config/speechConfig.js.example index 21c32be5..fe0d5e76 100644 --- a/config/speechConfig.js.example +++ b/config/speechConfig.js.example @@ -20,17 +20,17 @@ module.exports = { uploadDirectory: null, // enter file path to where uploads/publishes should be stored }, site: { - title: 'Spee.ch', - name : 'Spee.ch', - host : 'https://spee.ch', - description: 'Open-source, decentralized image and video sharing.' + title : 'Spee.ch', + name : 'Spee.ch', + host : 'https://spee.ch', + description: 'Open-source, decentralized image and video sharing.', }, publish: { primaryClaimAddress : null, // choose any address from your lbry wallet additionalClaimAddresses: [], // // optional: add previously used claim addresses thumbnailChannel : '@channelName', // create a channel to use for thumbnail images thumbnailChannelId : 'xyz123...', // the channel_id (claim id) for the channel above - } + }, claim: { defaultTitle : 'Spee.ch', defaultThumbnail : 'https://spee.ch/assets/img/video_thumb_default.png', diff --git a/public/assets/css/general.css b/public/assets/css/general.css index 4cae081a..1dcc2676 100644 --- a/public/assets/css/general.css +++ b/public/assets/css/general.css @@ -158,6 +158,13 @@ a, a:visited { color: #4156C5; } +.link--secondary, .link--secondary:visited { + font-size: medium; + margin: 0px; + padding: 0.3em; + color: #9b9b9b; +} + .link--nav { color: black; border-bottom: 2px solid white; @@ -461,6 +468,10 @@ button { color: #9b9b9b; } +.button--wide { + width: 100%; +} + /* TABLES */ table { diff --git a/react/components/AboutPage/index.js b/react/components/AboutPage/index.jsx similarity index 100% rename from react/components/AboutPage/index.js rename to react/components/AboutPage/index.jsx diff --git a/react/components/ActiveStatusBar/index.jsx b/react/components/ActiveStatusBar/index.jsx index 4f3737f5..69a98440 100644 --- a/react/components/ActiveStatusBar/index.jsx +++ b/react/components/ActiveStatusBar/index.jsx @@ -1,7 +1,7 @@ import React from 'react'; const ActiveStatusBar = () => { - return | ; -} + return | ; +}; export default ActiveStatusBar; diff --git a/react/components/AssetInfo/view.jsx b/react/components/AssetInfo/view.jsx deleted file mode 100644 index 0f1f3efe..00000000 --- a/react/components/AssetInfo/view.jsx +++ /dev/null @@ -1,165 +0,0 @@ -import React from 'react'; -import { Link } from 'react-router-dom'; - -class AssetInfo extends React.Component { - constructor (props) { - super(props); - this.state = { - showDetails: false, - }; - this.toggleDetails = this.toggleDetails.bind(this); - this.copyToClipboard = this.copyToClipboard.bind(this); - } - toggleDetails () { - if (this.state.showDetails) { - return this.setState({showDetails: false}); - } - this.setState({showDetails: true}); - } - copyToClipboard (event) { - var elementToCopy = event.target.dataset.elementtocopy; - var element = document.getElementById(elementToCopy); - element.select(); - try { - document.execCommand('copy'); - } catch (err) { - this.setState({error: 'Oops, unable to copy'}); - } - } - render () { - const { asset: { shortId, claimData : { channelName, certificateId, description, name, claimId, fileExt, contentType, thumbnail, host } } } = this.props; - return ( -
- {channelName && -
-
- Channel: -
-
- {channelName} -
-
- } - - {description && -
- {description} -
- } - -
- -
-
- Embed: -
-
-
-
- - {(contentType === 'video/mp4') ? ( - `}/> - ) : ( - `} - /> - )} -
-
-
- -
-
-
-
-
- -
-
-
- Share: -
-
-
- twitter - facebook - tumblr - reddit -
-
-
-
- - { this.state.showDetails && -
-
-
-
- Claim Name: -
- {name} -
-
-
-
- Claim Id: -
- {claimId} -
-
-
-
- File Type: -
- {contentType ? `${contentType}` : 'unknown'} -
-
-
-
-
- Report -
-
-
- } -
- -
-
- ); - } -}; - -export default AssetInfo; diff --git a/react/components/AssetPreview/index.js b/react/components/AssetPreview/index.jsx similarity index 100% rename from react/components/AssetPreview/index.js rename to react/components/AssetPreview/index.jsx diff --git a/react/components/ErrorPage/index.js b/react/components/ErrorPage/index.jsx similarity index 100% rename from react/components/ErrorPage/index.js rename to react/components/ErrorPage/index.jsx diff --git a/react/components/ExpandingTextArea/index.jsx b/react/components/ExpandingTextArea/index.jsx index c6a3fdaf..db83c5d8 100644 --- a/react/components/ExpandingTextArea/index.jsx +++ b/react/components/ExpandingTextArea/index.jsx @@ -2,31 +2,32 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; class ExpandingTextarea extends Component { + constructor (props) { + super(props); + this._handleChange = this._handleChange.bind(this); + } componentDidMount () { this.adjustTextarea({}); } - - render () { - const { onChange, ...rest } = this.props; - return ( -