Merge pull request #388 from lbryio/publish-disable-config

Publish disable config
This commit is contained in:
Bill Bittner 2018-03-12 13:59:40 -07:00 committed by GitHub
commit b8d0b2297f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 17 additions and 7 deletions

View file

@ -3,12 +3,12 @@ module.exports = {
googleId: null, // google id for analytics tracking; leave `null` if not applicable googleId: null, // google id for analytics tracking; leave `null` if not applicable
}, },
sql: { sql: {
database: null, // name of mysql database database: 'lbry',
username: null, // username for mysql username: null, // username for mysql
password: null, // password for mysql password: null, // password for mysql
}, },
logging: { logging: {
logLevel : null, // options: silly, debug, verbose, info logLevel : 'debug', // options: silly, debug, verbose, info
slackWebHook : null, // enter a webhook if you wish to push logs to slack; otherwise leave as `null` slackWebHook : null, // enter a webhook if you wish to push logs to slack; otherwise leave as `null`
slackErrorChannel: null, // enter a slack channel (#example) for errors to be sent to; otherwise leave null slackErrorChannel: null, // enter a slack channel (#example) for errors to be sent to; otherwise leave null
slackInfoChannel : null, // enter a slack channel (#info) for info level logs to be sent to otherwise leave null slackInfoChannel : null, // enter a slack channel (#info) for info level logs to be sent to otherwise leave null
@ -26,8 +26,9 @@ module.exports = {
description: 'Open-source, decentralized image and video sharing.', description: 'Open-source, decentralized image and video sharing.',
}, },
publish: { publish: {
primaryClaimAddress : null, // choose any address from your lbry wallet
additionalClaimAddresses: [], // // optional: add previously used claim addresses additionalClaimAddresses: [], // // optional: add previously used claim addresses
disabled : false,
primaryClaimAddress : null, // choose any address from your lbry wallet
thumbnailChannel : '@channelName', // create a channel to use for thumbnail images thumbnailChannel : '@channelName', // create a channel to use for thumbnail images
thumbnailChannelId : 'xyz123...', // the channel_id (claim id) for the channel above thumbnailChannelId : 'xyz123...', // the channel_id (claim id) for the channel above
}, },

View file

@ -3,8 +3,9 @@ import View from './view';
const mapStateToProps = ({ publish }) => { const mapStateToProps = ({ publish }) => {
return { return {
file : publish.file, disabled: publish.disabled,
status: publish.status.status, file : publish.file,
status : publish.status.status,
}; };
}; };

View file

@ -5,6 +5,14 @@ import PublishStatus from 'containers/PublishStatus';
class PublishTool extends React.Component { class PublishTool extends React.Component {
render () { render () {
if (this.props.disabled) {
return (
<div className='row row--tall flex-container--column flex-container--center-center'>
<p>Publishing is temporarily disabled.</p>
<p>Please check back soon or join our <a className='link--primary' href='https://discord.gg/YjYbwhS'>discord channel</a> for updates.</p>
</div>
);
}
if (this.props.file) { if (this.props.file) {
if (this.props.status) { if (this.props.status) {
return ( return (
@ -13,9 +21,8 @@ class PublishTool extends React.Component {
} else { } else {
return <PublishDetails />; return <PublishDetails />;
} }
} else {
return <Dropzone />;
} }
return <Dropzone />;
} }
}; };

View file

@ -3,6 +3,7 @@ import { LOGIN } from 'constants/publish_channel_select_states';
const { publish } = require('../../config/speechConfig.js'); const { publish } = require('../../config/speechConfig.js');
const initialState = { const initialState = {
disabled : publish.disabled,
publishInChannel : false, publishInChannel : false,
selectedChannel : LOGIN, selectedChannel : LOGIN,
showMetadataInputs: false, showMetadataInputs: false,