diff --git a/src/renderer/component/button/view.jsx b/src/renderer/component/button/view.jsx index 8b496ea12..5cbc17917 100644 --- a/src/renderer/component/button/view.jsx +++ b/src/renderer/component/button/view.jsx @@ -23,6 +23,7 @@ type Props = { noPadding: ?boolean, // to remove padding and allow circular buttons uppercase: ?boolean, iconColor: ?string, + tourniquet: ?boolean, // to shorten the button and ellipsis, only use for links }; class Button extends React.PureComponent { @@ -50,6 +51,7 @@ class Button extends React.PureComponent { noPadding, uppercase, iconColor, + tourniquet, ...otherProps } = this.props; @@ -69,6 +71,7 @@ class Button extends React.PureComponent { 'btn--link': button === 'link', 'btn--external-link': button === 'link' && href, 'btn--uppercase': uppercase, + 'btn--tourniquet': tourniquet, } : 'btn--no-style', className diff --git a/src/renderer/component/publishForm/internal/bid-help-text.jsx b/src/renderer/component/publishForm/internal/bid-help-text.jsx index 9686020d1..baf45d2ff 100644 --- a/src/renderer/component/publishForm/internal/bid-help-text.jsx +++ b/src/renderer/component/publishForm/internal/bid-help-text.jsx @@ -25,11 +25,13 @@ class BidHelpText extends React.PureComponent { } = this.props; if (!uri) { - return __('Create a URL for this content'); + return __('Create a URL for this content.'); } if (isStillEditing) { - return __('You are currently editing this claim'); + return __( + 'You are currently editing this claim. If you change the URL, you will need reselect a file.' + ); } if (isResolvingUri) { @@ -61,10 +63,10 @@ class BidHelpText extends React.PureComponent { {__('A deposit greater than')} {winningBidForClaimUri} {__('is needed to win')} {` ${uri}. `} - {__('However, you can still get this URL for any amount')} + {__('However, you can still get this URL for any amount.')} ) : ( - __('Any amount will give you the winning bid') + __('Any amount will give you the winning bid.') ); } } diff --git a/src/renderer/component/publishForm/view.jsx b/src/renderer/component/publishForm/view.jsx index 522b3efbb..1844df616 100644 --- a/src/renderer/component/publishForm/view.jsx +++ b/src/renderer/component/publishForm/view.jsx @@ -244,32 +244,54 @@ class PublishForm extends React.PureComponent { } checkIsFormValid() { - const { name, nameError, title, bid, bidError, tosAccepted } = this.props; - return name && !nameError && title && bid && !bidError && tosAccepted; + const { + name, + nameError, + title, + bid, + bidError, + tosAccepted, + editingURI, + isStillEditing, + filePath, + } = this.props; + + // If they are editing, they don't need a new file chosen + const formValidLessFile = name && !nameError && title && bid && !bidError && tosAccepted; + return editingURI && !filePath ? isStillEditing && formValidLessFile : formValidLessFile; } renderFormErrors() { - const { name, nameError, title, bid, bidError, tosAccepted } = this.props; + const { + name, + nameError, + title, + bid, + bidError, + tosAccepted, + editingURI, + filePath, + isStillEditing, + } = this.props; - if (nameError || bidError) { - // There will be inline errors if either of these exist - // These are just extra help at the bottom of the screen - // There could be multiple bid errors, so just duplicate it at the bottom - return ( -
- {nameError &&
{__('The URL you created is not valid.')}
} - {bidError &&
{bidError}
} -
- ); - } + const isFormValid = this.checkIsFormValid(); + // These are extra help + // If there is an error it will be presented as an inline error as well return ( -
- {!title &&
{__('A title is required')}
} - {!name &&
{__('A URL is required')}
} - {!bid &&
{__('A bid amount is required')}
} - {!tosAccepted &&
{__('You must agree to the terms of service')}
} -
+ !isFormValid && ( +
+ {!title &&
{__('A title is required')}
} + {!name &&
{__('A URL is required')}
} + {name && nameError &&
{__('The URL you created is not valid')}
} + {!bid &&
{__('A bid amount is required')}
} + {!!bid && bidError &&
{bidError}
} + {!tosAccepted &&
{__('You must agree to the terms of service')}
} + {!!editingURI && + !isStillEditing && + !filePath &&
{__('You need to reselect a file after changing the LBRY URL')}
} +
+ ) ); } @@ -319,10 +341,10 @@ class PublishForm extends React.PureComponent { return (
-
+
{__('Content')}
- {editingURI ? __('Editing a claim') : __('What are you publishing?')} + {isStillEditing ? __('Editing a claim') : __('What are you publishing?')}
{(filePath || !!editingURI) && (
@@ -335,7 +357,7 @@ class PublishForm extends React.PureComponent {
)} - {!!editingURI && ( + {!!isStillEditing && (

{__("If you don't choose a file, the file from your existing claim")} {` "${name}" `} @@ -379,7 +401,7 @@ class PublishForm extends React.PureComponent { ) : ( {__( - 'Upload your thumbnail to spee.ch, or enter the URL manually. Learn more about spee.ch ' + 'Upload your thumbnail (.png/.jpg/.gif) to spee.ch, or enter the URL manually. Learn more about spee.ch ' )}