added a publish disabled message component
This commit is contained in:
parent
bf836c83df
commit
3aa7ae3940
9 changed files with 58664 additions and 26 deletions
|
@ -16,8 +16,9 @@ function SiteConfig () {
|
|||
description: 'Open-source, decentralized image and video sharing.',
|
||||
};
|
||||
this.publishing = {
|
||||
additionalClaimAddresses: [], // optional
|
||||
additionalClaimAddresses: [],
|
||||
disabled : false,
|
||||
disabledMessage : 'Please check back soon.',
|
||||
primaryClaimAddress : 'default',
|
||||
thumbnailChannel : 'default',
|
||||
thumbnailChannelId : 'default',
|
||||
|
@ -29,10 +30,10 @@ function SiteConfig () {
|
|||
}
|
||||
const {analytics, publishing, details, assetDefaults, auth} = config;
|
||||
this.analytics = analytics;
|
||||
this.publishing = publishing;
|
||||
this.details = details;
|
||||
this.assetDefaults = assetDefaults;
|
||||
this.auth = auth;
|
||||
this.details = details;
|
||||
this.publishing = publishing;
|
||||
};
|
||||
};
|
||||
|
||||
|
|
10860
index.js
10860
index.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
47765
public/bundle/bundle.js
47765
public/bundle/bundle.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
10
react/containers/PublishDisabledMessage/index.js
Normal file
10
react/containers/PublishDisabledMessage/index.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import {connect} from 'react-redux';
|
||||
import View from './view';
|
||||
|
||||
const mapStateToProps = ({ publish }) => {
|
||||
return {
|
||||
message: publish.disabledMessage,
|
||||
};
|
||||
};
|
||||
|
||||
export default connect(mapStateToProps, null)(View);
|
16
react/containers/PublishDisabledMessage/view.jsx
Normal file
16
react/containers/PublishDisabledMessage/view.jsx
Normal file
|
@ -0,0 +1,16 @@
|
|||
import React from 'react';
|
||||
|
||||
class PublishDisabledMessage extends React.Component {
|
||||
render () {
|
||||
const message = this.props.message;
|
||||
console.log('this.props.message:', message);
|
||||
return (
|
||||
<div className='row dropzone--disabled row--tall flex-container--column flex-container--center-center'>
|
||||
<p className='text--disabled'>Publishing is currently disabled.</p>
|
||||
<p className='text--disabled'>{message}</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default PublishDisabledMessage;
|
|
@ -2,27 +2,28 @@ import React from 'react';
|
|||
import Dropzone from 'containers/Dropzone';
|
||||
import PublishDetails from 'containers/PublishDetails';
|
||||
import PublishStatus from 'containers/PublishStatus';
|
||||
import PublishDisabledMessage from 'containers/PublishDisabledMessage';
|
||||
|
||||
class PublishTool extends React.Component {
|
||||
render () {
|
||||
if (this.props.disabled) {
|
||||
console.log('publish is disabled');
|
||||
return (
|
||||
<div className='row dropzone--disabled row--tall flex-container--column flex-container--center-center'>
|
||||
<p className='text--disabled'>Publishing is temporarily disabled.</p>
|
||||
<p className='text--disabled'>Please check back soon or join our <a className='link--disabled-text' href='https://discord.gg/YjYbwhS'>discord channel</a> for updates.</p>
|
||||
</div>
|
||||
<PublishDisabledMessage />
|
||||
);
|
||||
}
|
||||
if (this.props.file) {
|
||||
if (this.props.status) {
|
||||
return (
|
||||
<PublishStatus />
|
||||
);
|
||||
} else {
|
||||
return <PublishDetails />;
|
||||
} else {
|
||||
console.log('publish is not disabled');
|
||||
if (this.props.file) {
|
||||
if (this.props.status) {
|
||||
return (
|
||||
<PublishStatus />
|
||||
);
|
||||
} else {
|
||||
return <PublishDetails />;
|
||||
}
|
||||
}
|
||||
return <Dropzone />;
|
||||
}
|
||||
return <Dropzone />;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@ const { publishing } = require('../../config/siteConfig.js');
|
|||
|
||||
const initialState = {
|
||||
disabled : publishing.disabled,
|
||||
disabledMessage : publishing.disabledMessage,
|
||||
publishInChannel : false,
|
||||
selectedChannel : LOGIN,
|
||||
showMetadataInputs: false,
|
||||
|
|
Loading…
Reference in a new issue