Confirmation modals about missing image descriptions
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
parent
ddf9f3c4fe
commit
9527c0b939
|
@ -0,0 +1,3 @@
|
||||||
|
NODE_ENV=development
|
||||||
|
# BACKEND_URL="https://example.com"
|
||||||
|
# PROXY_HTTPS_INSECURE=false
|
|
@ -203,7 +203,6 @@ export function submitCompose(routerHistory, group) {
|
||||||
|
|
||||||
if (missingDescriptionModal && media.filter(item => !item.get('description')).size) {
|
if (missingDescriptionModal && media.filter(item => !item.get('description')).size) {
|
||||||
dispatch(openModal('MISSING_DESCRIPTION', {
|
dispatch(openModal('MISSING_DESCRIPTION', {
|
||||||
some: media.filter(item => !item.get('description')).size !== media.size,
|
|
||||||
onContinue: () => onModalSubmitCompose(),
|
onContinue: () => onModalSubmitCompose(),
|
||||||
}));
|
}));
|
||||||
} else onModalSubmitCompose();
|
} else onModalSubmitCompose();
|
||||||
|
|
|
@ -203,7 +203,7 @@ class Preferences extends ImmutablePureComponent {
|
||||||
path={['deleteModal']}
|
path={['deleteModal']}
|
||||||
/>
|
/>
|
||||||
<SettingsCheckbox
|
<SettingsCheckbox
|
||||||
label={<FormattedMessage id='preferences.fields.missing_description_modal_label' defaultMessage='Show confirmation dialog before sending a post without media description' />}
|
label={<FormattedMessage id='preferences.fields.missing_description_modal_label' defaultMessage='Show confirmation dialog before sending a post without media descriptions' />}
|
||||||
path={['missingDescriptionModal']}
|
path={['missingDescriptionModal']}
|
||||||
/>
|
/>
|
||||||
</FieldsGroup>
|
</FieldsGroup>
|
||||||
|
|
|
@ -7,7 +7,6 @@ export default @injectIntl
|
||||||
class MissingDescriptionModal extends React.PureComponent {
|
class MissingDescriptionModal extends React.PureComponent {
|
||||||
|
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
some: PropTypes.bool,
|
|
||||||
onClose: PropTypes.func,
|
onClose: PropTypes.func,
|
||||||
onContinue: PropTypes.func.isRequired,
|
onContinue: PropTypes.func.isRequired,
|
||||||
intl: PropTypes.object.isRequired,
|
intl: PropTypes.object.isRequired,
|
||||||
|
@ -31,14 +30,10 @@ class MissingDescriptionModal extends React.PureComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { some } = this.props;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='modal-root__modal confirmation-modal'>
|
<div className='modal-root__modal confirmation-modal'>
|
||||||
<div className='confirmation-modal__container'>
|
<div className='confirmation-modal__container'>
|
||||||
{some
|
<FormattedMessage id='missing_description_modal.text' defaultMessage='You have not entered a description for all attachments. Continue anyway?' />
|
||||||
? <FormattedMessage id='missing_description_modal.some' defaultMessage='Some of media you are going to post lacks media description. Are you sure you want to continue?' />
|
|
||||||
: <FormattedMessage id='missing_description_modal.all' defaultMessage='You are about to post undescribed media. Are you sure you want to continue?' />}
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className='confirmation-modal__action-bar'>
|
<div className='confirmation-modal__action-bar'>
|
||||||
|
@ -46,7 +41,7 @@ class MissingDescriptionModal extends React.PureComponent {
|
||||||
<FormattedMessage id='missing_description_modal.cancel' defaultMessage='Cancel' />
|
<FormattedMessage id='missing_description_modal.cancel' defaultMessage='Cancel' />
|
||||||
</Button>
|
</Button>
|
||||||
<Button onClick={this.handleContinue}>
|
<Button onClick={this.handleContinue}>
|
||||||
<FormattedMessage id='missing_description_modal.continue' defaultMessage='Continue' />
|
<FormattedMessage id='missing_description_modal.continue' defaultMessage='Post' />
|
||||||
</Button>
|
</Button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -421,10 +421,9 @@
|
||||||
"mfa.setup_otp_title": "Wyłączono OTP",
|
"mfa.setup_otp_title": "Wyłączono OTP",
|
||||||
"mfa.setup_recoverycodes": "Kody przywracania",
|
"mfa.setup_recoverycodes": "Kody przywracania",
|
||||||
"mfa.setup_warning": "Zapisz te kody gdzieś w bezpiecznym miejscu – jeżeli tego nie zrobisz, już ich nie zobaczysz. Jeśli utracisz dostęp do aplikacji 2FA i tych kodów, stracisz dostęp do swojego konta.",
|
"mfa.setup_warning": "Zapisz te kody gdzieś w bezpiecznym miejscu – jeżeli tego nie zrobisz, już ich nie zobaczysz. Jeśli utracisz dostęp do aplikacji 2FA i tych kodów, stracisz dostęp do swojego konta.",
|
||||||
"missing_description_modal.all": "Zamierzasz opublikować media, które nie zawierają opisu. Czy na pewno chcesz kontynuować?",
|
|
||||||
"missing_description_modal.cancel": "Anuluj",
|
"missing_description_modal.cancel": "Anuluj",
|
||||||
"missing_description_modal.continue": "Kontynuuj",
|
"missing_description_modal.continue": "Opublikuj",
|
||||||
"missing_description_modal.some": "Niektóre media które zamierzasz opublikować nie zawierają opisu. Czy na pewno chcesz kontynuować?",
|
"missing_description_modal.text": "Nie podałeś(-aś) opisu dla wszystkich załączników. Czy na pewno chcesz kontynuować?",
|
||||||
"missing_indicator.label": "Nie znaleziono",
|
"missing_indicator.label": "Nie znaleziono",
|
||||||
"missing_indicator.sublabel": "Nie można odnaleźć tego zasobu",
|
"missing_indicator.sublabel": "Nie można odnaleźć tego zasobu",
|
||||||
"morefollows.followers_label": "…i {count} więcej {count, plural, one {obserwujący(-a)} few {obserwujących} many {obserwujących} other {obserwujących}} na zdalnych stronach.",
|
"morefollows.followers_label": "…i {count} więcej {count, plural, one {obserwujący(-a)} few {obserwujących} many {obserwujących} other {obserwujących}} na zdalnych stronach.",
|
||||||
|
|
Loading…
Reference in New Issue