Misc fixes (#101)
* fix env var bug * fix #99 * fix #97 * fix #96 * fix #95, #94 * restrict commenting to live proposals
This commit is contained in:
parent
98dce6c5ea
commit
95102842a7
|
@ -78,11 +78,19 @@ class ProposalDetailNaked extends React.Component<Props, State> {
|
||||||
return (
|
return (
|
||||||
<Popconfirm
|
<Popconfirm
|
||||||
title={
|
title={
|
||||||
<p>
|
isVersionTwo ? (
|
||||||
Are you sure you want to cancel proposal and begin
|
<p>
|
||||||
<br />
|
Are you sure you want to cancel proposal?
|
||||||
the refund process? This cannot be undone.
|
<br />
|
||||||
</p>
|
This cannot be undone.
|
||||||
|
</p>
|
||||||
|
) : (
|
||||||
|
<p>
|
||||||
|
Are you sure you want to cancel proposal and begin
|
||||||
|
<br />
|
||||||
|
the refund process? This cannot be undone.
|
||||||
|
</p>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
placement="left"
|
placement="left"
|
||||||
cancelText="cancel"
|
cancelText="cancel"
|
||||||
|
|
|
@ -110,6 +110,9 @@ def post_proposal_comments(proposal_id, comment, parent_comment_id):
|
||||||
if not proposal:
|
if not proposal:
|
||||||
return {"message": "No proposal matching id"}, 404
|
return {"message": "No proposal matching id"}, 404
|
||||||
|
|
||||||
|
if proposal.status != ProposalStatus.LIVE:
|
||||||
|
return {"message": "Proposal must be live to comment"}, 400
|
||||||
|
|
||||||
# Make sure the parent comment exists
|
# Make sure the parent comment exists
|
||||||
parent = None
|
parent = None
|
||||||
if parent_comment_id:
|
if parent_comment_id:
|
||||||
|
|
|
@ -60,7 +60,7 @@ LINKEDIN_CLIENT_SECRET = env.str("LINKEDIN_CLIENT_SECRET")
|
||||||
BLOCKCHAIN_REST_API_URL = env.str("BLOCKCHAIN_REST_API_URL")
|
BLOCKCHAIN_REST_API_URL = env.str("BLOCKCHAIN_REST_API_URL")
|
||||||
BLOCKCHAIN_API_SECRET = env.str("BLOCKCHAIN_API_SECRET")
|
BLOCKCHAIN_API_SECRET = env.str("BLOCKCHAIN_API_SECRET")
|
||||||
|
|
||||||
STAGING_PASSWORD = env.str("STAGING_PASSWORD")
|
STAGING_PASSWORD = env.str("STAGING_PASSWORD", default=None)
|
||||||
|
|
||||||
EXPLORER_URL = env.str("EXPLORER_URL", default="https://chain.so/tx/ZECTEST/<txid>")
|
EXPLORER_URL = env.str("EXPLORER_URL", default="https://chain.so/tx/ZECTEST/<txid>")
|
||||||
|
|
||||||
|
|
|
@ -127,7 +127,8 @@ class SignUp extends React.Component<Props> {
|
||||||
ev.preventDefault();
|
ev.preventDefault();
|
||||||
const { createUser } = this.props;
|
const { createUser } = this.props;
|
||||||
this.props.form.validateFieldsAndScroll((err: any, values: any) => {
|
this.props.form.validateFieldsAndScroll((err: any, values: any) => {
|
||||||
if (!err) {
|
const hasAgreed = this.props.form.getFieldValue('hasAgreed')
|
||||||
|
if (!err && hasAgreed) {
|
||||||
delete values.passwordConfirm;
|
delete values.passwordConfirm;
|
||||||
createUser(values);
|
createUser(values);
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,11 @@ interface Props {
|
||||||
|
|
||||||
export default class CancelModal extends React.Component<Props> {
|
export default class CancelModal extends React.Component<Props> {
|
||||||
render() {
|
render() {
|
||||||
const { isVisible, handleClose } = this.props;
|
const {
|
||||||
|
isVisible,
|
||||||
|
handleClose,
|
||||||
|
proposal: { isVersionTwo },
|
||||||
|
} = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Modal
|
<Modal
|
||||||
|
@ -23,13 +27,15 @@ export default class CancelModal extends React.Component<Props> {
|
||||||
onCancel={handleClose}
|
onCancel={handleClose}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
Are you sure you would like to cancel this proposal, and refund any
|
Are you sure you would like to cancel this proposal
|
||||||
contributors? <strong>This cannot be undone</strong>.
|
{isVersionTwo ? '' : ', and refund any contributors'}?{' '}
|
||||||
|
<strong>This cannot be undone</strong>.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
Canceled proposals cannot be deleted and will still be viewable by contributors
|
Canceled proposals cannot be deleted and will still be viewable by{' '}
|
||||||
or anyone with a direct link. However, they will be de-listed everywhere else on
|
{isVersionTwo ? '' : 'contributors or '}
|
||||||
ZF Grants.
|
anyone with a direct link. However, they will be de-listed everywhere else on ZF
|
||||||
|
Grants.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
If you're sure you'd like to cancel, please{' '}
|
If you're sure you'd like to cancel, please{' '}
|
||||||
|
|
|
@ -110,7 +110,7 @@ export class ProposalDetail extends React.Component<Props, State> {
|
||||||
const milestonesDisabled = proposal.isVersionTwo
|
const milestonesDisabled = proposal.isVersionTwo
|
||||||
? !proposal.acceptedWithFunding
|
? !proposal.acceptedWithFunding
|
||||||
: false;
|
: false;
|
||||||
const defaultTab = milestonesDisabled ? 'discussions' : 'milestones';
|
const defaultTab = !milestonesDisabled || !isLive ? 'milestones' : 'discussions';
|
||||||
|
|
||||||
const adminMenu = (
|
const adminMenu = (
|
||||||
<Menu>
|
<Menu>
|
||||||
|
|
|
@ -77,7 +77,7 @@ export default class TipJarAddress extends React.Component<Props, State> {
|
||||||
<Form.Item label="Tip jar address" validateStatus={status} help={help}>
|
<Form.Item label="Tip jar address" validateStatus={status} help={help}>
|
||||||
<Input
|
<Input
|
||||||
value={tipJarAddress || ''}
|
value={tipJarAddress || ''}
|
||||||
placeholder="Z or T address"
|
placeholder="Z address"
|
||||||
onChange={this.handleChange}
|
onChange={this.handleChange}
|
||||||
disabled={isFetching || isSaving || errorFetching}
|
disabled={isFetching || isSaving || errorFetching}
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -106,7 +106,7 @@ class TipJarProposalSettingsModalBase extends React.Component<Props, State> {
|
||||||
>
|
>
|
||||||
<Input
|
<Input
|
||||||
value={address || ''}
|
value={address || ''}
|
||||||
placeholder="Z or T address"
|
placeholder="Z address"
|
||||||
onChange={this.handleTipJarAddressChange}
|
onChange={this.handleTipJarAddressChange}
|
||||||
disabled={addressInputDisabled}
|
disabled={addressInputDisabled}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Reference in New Issue