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.',
|
description: 'Open-source, decentralized image and video sharing.',
|
||||||
};
|
};
|
||||||
this.publishing = {
|
this.publishing = {
|
||||||
additionalClaimAddresses: [], // optional
|
additionalClaimAddresses: [],
|
||||||
disabled : false,
|
disabled : false,
|
||||||
|
disabledMessage : 'Please check back soon.',
|
||||||
primaryClaimAddress : 'default',
|
primaryClaimAddress : 'default',
|
||||||
thumbnailChannel : 'default',
|
thumbnailChannel : 'default',
|
||||||
thumbnailChannelId : 'default',
|
thumbnailChannelId : 'default',
|
||||||
|
@ -29,10 +30,10 @@ function SiteConfig () {
|
||||||
}
|
}
|
||||||
const {analytics, publishing, details, assetDefaults, auth} = config;
|
const {analytics, publishing, details, assetDefaults, auth} = config;
|
||||||
this.analytics = analytics;
|
this.analytics = analytics;
|
||||||
this.publishing = publishing;
|
|
||||||
this.details = details;
|
|
||||||
this.assetDefaults = assetDefaults;
|
this.assetDefaults = assetDefaults;
|
||||||
this.auth = auth;
|
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 Dropzone from 'containers/Dropzone';
|
||||||
import PublishDetails from 'containers/PublishDetails';
|
import PublishDetails from 'containers/PublishDetails';
|
||||||
import PublishStatus from 'containers/PublishStatus';
|
import PublishStatus from 'containers/PublishStatus';
|
||||||
|
import PublishDisabledMessage from 'containers/PublishDisabledMessage';
|
||||||
|
|
||||||
class PublishTool extends React.Component {
|
class PublishTool extends React.Component {
|
||||||
render () {
|
render () {
|
||||||
if (this.props.disabled) {
|
if (this.props.disabled) {
|
||||||
|
console.log('publish is disabled');
|
||||||
return (
|
return (
|
||||||
<div className='row dropzone--disabled row--tall flex-container--column flex-container--center-center'>
|
<PublishDisabledMessage />
|
||||||
<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>
|
|
||||||
);
|
);
|
||||||
}
|
} else {
|
||||||
if (this.props.file) {
|
console.log('publish is not disabled');
|
||||||
if (this.props.status) {
|
if (this.props.file) {
|
||||||
return (
|
if (this.props.status) {
|
||||||
<PublishStatus />
|
return (
|
||||||
);
|
<PublishStatus />
|
||||||
} else {
|
);
|
||||||
return <PublishDetails />;
|
} else {
|
||||||
|
return <PublishDetails />;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
return <Dropzone />;
|
||||||
}
|
}
|
||||||
return <Dropzone />;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,7 @@ const { publishing } = require('../../config/siteConfig.js');
|
||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
disabled : publishing.disabled,
|
disabled : publishing.disabled,
|
||||||
|
disabledMessage : publishing.disabledMessage,
|
||||||
publishInChannel : false,
|
publishInChannel : false,
|
||||||
selectedChannel : LOGIN,
|
selectedChannel : LOGIN,
|
||||||
showMetadataInputs: false,
|
showMetadataInputs: false,
|
||||||
|
|
Loading…
Add table
Reference in a new issue