diff --git a/app/soapbox/actions/compose.js b/app/soapbox/actions/compose.js index 9f1555ae9..becb39b81 100644 --- a/app/soapbox/actions/compose.js +++ b/app/soapbox/actions/compose.js @@ -236,7 +236,10 @@ export function submitCompose(routerHistory, force = false) { if (!force && needsDescriptions(state)) { dispatch(openModal('MISSING_DESCRIPTION', { - onContinue: () => dispatch(submitCompose(routerHistory, true)), + onContinue: () => { + dispatch(closeModal('MISSING_DESCRIPTION')); + dispatch(submitCompose(routerHistory, true)); + }, })); return; } diff --git a/app/soapbox/components/attachment_list.js b/app/soapbox/components/attachment_list.js deleted file mode 100644 index 52d4e6d77..000000000 --- a/app/soapbox/components/attachment_list.js +++ /dev/null @@ -1,59 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import ImmutablePropTypes from 'react-immutable-proptypes'; -import ImmutablePureComponent from 'react-immutable-pure-component'; - -import Icon from 'soapbox/components/icon'; - -const filename = url => url.split('/').pop().split('#')[0].split('?')[0]; - -export default class AttachmentList extends ImmutablePureComponent { - - static propTypes = { - media: ImmutablePropTypes.list.isRequired, - compact: PropTypes.bool, - }; - - render() { - const { media, compact } = this.props; - - if (compact) { - return ( -
- -
- ); - } - - return ( -
-
- -
- - -
- ); - } - -} diff --git a/app/soapbox/components/attachment_list.tsx b/app/soapbox/components/attachment_list.tsx new file mode 100644 index 000000000..94c496819 --- /dev/null +++ b/app/soapbox/components/attachment_list.tsx @@ -0,0 +1,54 @@ +import React from 'react'; + +import Icon from 'soapbox/components/icon'; + +import type { Attachment as AttachmentEntity } from 'soapbox/types/entities'; + +const filename = (url: string) => url.split('/').pop()!.split('#')[0].split('?')[0]; + +interface IAttachmentList { + media: AttachmentEntity[], + compact?: boolean, +} + +const AttachmentList: React.FC = ({ media, compact }) => { + if (compact) { + return ( +
+ +
+ ); + } + + return ( +
+
+ +
+ + +
+ ); +}; + +export default AttachmentList; diff --git a/app/soapbox/components/birthday_reminders.js b/app/soapbox/components/birthday_reminders.js index 12fa249fd..c6991dfc7 100644 --- a/app/soapbox/components/birthday_reminders.js +++ b/app/soapbox/components/birthday_reminders.js @@ -11,6 +11,7 @@ import { Link } from 'react-router-dom'; import { fetchBirthdayReminders } from 'soapbox/actions/accounts'; import { openModal } from 'soapbox/actions/modals'; import Icon from 'soapbox/components/icon'; +import { HStack, Text } from 'soapbox/components/ui'; import { makeGetAccount } from 'soapbox/selectors'; const mapStateToProps = (state, props) => { @@ -72,7 +73,7 @@ class BirthdayReminders extends ImmutablePureComponent { const link = (
-
-
- -
+
+ + - - {this.renderMessage()} - + + {this.renderMessage()} + +
diff --git a/app/soapbox/components/status.tsx b/app/soapbox/components/status.tsx index ffb3fba09..5285c4eaf 100644 --- a/app/soapbox/components/status.tsx +++ b/app/soapbox/components/status.tsx @@ -379,7 +379,7 @@ class Status extends ImmutablePureComponent { prepend = (
- + diff --git a/app/soapbox/components/ui/card/card.tsx b/app/soapbox/components/ui/card/card.tsx index 9dce21b8a..8c69b3bd9 100644 --- a/app/soapbox/components/ui/card/card.tsx +++ b/app/soapbox/components/ui/card/card.tsx @@ -28,7 +28,7 @@ const Card: React.FC = React.forwardRef(({ children, variant, size = 'md' {...filteredProps} className={classNames({ 'space-y-4': true, - 'bg-white dark:bg-slate-800 sm:shadow-lg dark:sm:shadow-inset overflow-hidden': variant === 'rounded', + 'bg-white dark:bg-slate-800 text-black dark:text-white sm:shadow-lg dark:sm:shadow-inset overflow-hidden': variant === 'rounded', [sizes[size]]: true, }, className)} > diff --git a/app/soapbox/components/ui/column/column.tsx b/app/soapbox/components/ui/column/column.tsx index c647aa1f3..c27a867dd 100644 --- a/app/soapbox/components/ui/column/column.tsx +++ b/app/soapbox/components/ui/column/column.tsx @@ -34,7 +34,7 @@ const Column: React.FC = React.forwardRef((props, ref: React.ForwardedR const renderChildren = () => { if (transparent) { - return
{children}
; + return
{children}
; } return ( diff --git a/app/soapbox/components/ui/modal/modal.tsx b/app/soapbox/components/ui/modal/modal.tsx index efe580c23..4270465fc 100644 --- a/app/soapbox/components/ui/modal/modal.tsx +++ b/app/soapbox/components/ui/modal/modal.tsx @@ -46,7 +46,7 @@ const Modal: React.FC = ({ }, [buttonRef]); return ( -
+
diff --git a/app/soapbox/features/direct_timeline/index.js b/app/soapbox/features/direct_timeline/index.js index 3c81c5d14..b09a58158 100644 --- a/app/soapbox/features/direct_timeline/index.js +++ b/app/soapbox/features/direct_timeline/index.js @@ -75,6 +75,7 @@ class DirectTimeline extends React.PureComponent { timelineId='direct' onLoadMore={this.handleLoadMore} emptyMessage={} + divideType='space' /> ); diff --git a/app/soapbox/features/ui/components/confirmation_modal.js b/app/soapbox/features/ui/components/confirmation_modal.js index 76327ed73..ab740a940 100644 --- a/app/soapbox/features/ui/components/confirmation_modal.js +++ b/app/soapbox/features/ui/components/confirmation_modal.js @@ -61,7 +61,7 @@ class ConfirmationModal extends React.PureComponent { cancelText={} cancelAction={this.handleCancel} secondaryText={secondary} - sectondaryAction={this.handleSecondary} + secondaryAction={this.props.onSecondary && this.handleSecondary} >

{message}

diff --git a/app/soapbox/features/ui/components/missing_description_modal.js b/app/soapbox/features/ui/components/missing_description_modal.js deleted file mode 100644 index d7b472bec..000000000 --- a/app/soapbox/features/ui/components/missing_description_modal.js +++ /dev/null @@ -1,52 +0,0 @@ -import PropTypes from 'prop-types'; -import React from 'react'; -import { injectIntl, FormattedMessage } from 'react-intl'; - -import { Button } from '../../../components/ui'; - -export default @injectIntl -class MissingDescriptionModal extends React.PureComponent { - - static propTypes = { - onClose: PropTypes.func, - onContinue: PropTypes.func.isRequired, - intl: PropTypes.object.isRequired, - }; - - componentDidMount() { - this.button.focus(); - } - - handleContinue = () => { - this.props.onClose(); - this.props.onContinue(); - } - - handleCancel = () => { - this.props.onClose(); - } - - setRef = (c) => { - this.button = c; - } - - render() { - return ( -
-
- -
- -
- - -
-
- ); - } - -} diff --git a/app/soapbox/features/ui/components/missing_description_modal.tsx b/app/soapbox/features/ui/components/missing_description_modal.tsx new file mode 100644 index 000000000..8268ff3e8 --- /dev/null +++ b/app/soapbox/features/ui/components/missing_description_modal.tsx @@ -0,0 +1,35 @@ +import React from 'react'; +import { injectIntl, FormattedMessage, IntlShape, defineMessages } from 'react-intl'; + +import { Modal } from 'soapbox/components/ui'; + +const messages = defineMessages({ + modalTitle: { id: 'missing_description_modal.text', defaultMessage: 'You have not entered a description for all attachments.' }, + post: { id: 'missing_description_modal.continue', defaultMessage: 'Post' }, + cancel: { id: 'missing_description_modal.cancel', defaultMessage: 'Cancel' }, +}); + +interface IMissingDescriptionModal { + onClose: () => void, + onContinue: () => void, + intl: IntlShape, +} + +const MissingDescriptionModal: React.FC = ({ onClose, onContinue, intl }) => { + return ( + +

+ +

+
+ ); +}; + +export default injectIntl(MissingDescriptionModal); diff --git a/app/soapbox/features/ui/components/profile_info_panel.js b/app/soapbox/features/ui/components/profile_info_panel.js index ce89ee6cb..57dfcf48e 100644 --- a/app/soapbox/features/ui/components/profile_info_panel.js +++ b/app/soapbox/features/ui/components/profile_info_panel.js @@ -92,7 +92,7 @@ class ProfileInfoPanel extends ImmutablePureComponent { @@ -191,7 +191,7 @@ class ProfileInfoPanel extends ImmutablePureComponent { @@ -208,7 +208,7 @@ class ProfileInfoPanel extends ImmutablePureComponent { @@ -221,13 +221,13 @@ class ProfileInfoPanel extends ImmutablePureComponent {
{isSafeUrl(account.get('website')) ? ( - {account.get('website')} + {account.get('website')} ) : ( account.get('website') )} diff --git a/app/soapbox/features/ui/components/reactions_modal.js b/app/soapbox/features/ui/components/reactions_modal.js index bea2c3567..36f79ea66 100644 --- a/app/soapbox/features/ui/components/reactions_modal.js +++ b/app/soapbox/features/ui/components/reactions_modal.js @@ -107,6 +107,7 @@ class ReactionsModal extends React.PureComponent { {accounts.map((account) => , diff --git a/app/soapbox/locales/en-Shaw.json b/app/soapbox/locales/en-Shaw.json index ae0b73eb2..584c53c8d 100644 --- a/app/soapbox/locales/en-Shaw.json +++ b/app/soapbox/locales/en-Shaw.json @@ -595,7 +595,8 @@ "mfa.setup_warning": "๐‘ฎ๐‘ฒ๐‘‘ ๐‘ž๐‘ฐ๐‘Ÿ ๐‘’๐‘ด๐‘›๐‘Ÿ ๐‘›๐‘ฌ๐‘ฏ ๐‘น ๐‘•๐‘ฑ๐‘ ๐‘ž๐‘ง๐‘ฅ ๐‘•๐‘ณ๐‘ฅ๐‘ข๐‘บ ๐‘•๐‘ฆ๐‘’๐‘˜๐‘ซ๐‘ผ - ๐‘ณ๐‘ž๐‘ผ๐‘ข๐‘ฒ๐‘Ÿ ๐‘ฟ ๐‘ข๐‘ด๐‘ฏ๐‘‘ ๐‘•๐‘ฐ ๐‘ž๐‘ง๐‘ฅ ๐‘ฉ๐‘œ๐‘ฑ๐‘ฏ. ๐‘ฆ๐‘“ ๐‘ฟ ๐‘ค๐‘ต๐‘Ÿ ๐‘จ๐‘’๐‘•๐‘ง๐‘• ๐‘‘ ๐‘˜๐‘น 2FA ๐‘จ๐‘ ๐‘ฏ ๐‘ฎ๐‘ฆ๐‘’๐‘ณ๐‘๐‘ผ๐‘ฆ ๐‘’๐‘ด๐‘›๐‘Ÿ ๐‘ฟ๐‘ค ๐‘š๐‘ฐ ๐‘ค๐‘ช๐‘’๐‘‘ ๐‘ฌ๐‘‘ ๐‘ ๐‘˜๐‘น ๐‘ฉ๐‘’๐‘ฌ๐‘ฏ๐‘‘.", "missing_description_modal.cancel": "๐‘’๐‘จ๐‘ฏ๐‘•๐‘ฉ๐‘ค", "missing_description_modal.continue": "๐‘๐‘ด๐‘•๐‘‘", - "missing_description_modal.text": "๐‘ฟ ๐‘ฃ๐‘จ๐‘ ๐‘ฏ๐‘ช๐‘‘ ๐‘ง๐‘ฏ๐‘‘๐‘ผ๐‘› ๐‘ฉ ๐‘›๐‘ฆ๐‘•๐‘’๐‘ฎ๐‘ฆ๐‘๐‘–๐‘ฉ๐‘ฏ ๐‘“ ๐‘ท๐‘ค ๐‘ฉ๐‘‘๐‘จ๐‘—๐‘ฅ๐‘ฉ๐‘ฏ๐‘‘๐‘•. ๐‘’๐‘ฉ๐‘ฏ๐‘‘๐‘ฆ๐‘ฏ๐‘ฟ ๐‘ง๐‘ฏ๐‘ฆ๐‘ข๐‘ฑ?", + "missing_description_modal.description": "๐‘’๐‘ฉ๐‘ฏ๐‘‘๐‘ฆ๐‘ฏ๐‘ฟ ๐‘ง๐‘ฏ๐‘ฆ๐‘ข๐‘ฑ?", + "missing_description_modal.text": "๐‘ฟ ๐‘ฃ๐‘จ๐‘ ๐‘ฏ๐‘ช๐‘‘ ๐‘ง๐‘ฏ๐‘‘๐‘ผ๐‘› ๐‘ฉ ๐‘›๐‘ฆ๐‘•๐‘’๐‘ฎ๐‘ฆ๐‘๐‘–๐‘ฉ๐‘ฏ ๐‘“ ๐‘ท๐‘ค ๐‘ฉ๐‘‘๐‘จ๐‘—๐‘ฅ๐‘ฉ๐‘ฏ๐‘‘๐‘•.", "missing_indicator.label": "๐‘ฏ๐‘ช๐‘‘ ๐‘“๐‘ฌ๐‘ฏ๐‘›", "missing_indicator.sublabel": "๐‘ž๐‘ฆ๐‘• ๐‘ฎ๐‘ฆ๐‘Ÿ๐‘น๐‘• ๐‘’๐‘ซ๐‘› ๐‘ฏ๐‘ช๐‘‘ ๐‘š๐‘ฐ ๐‘“๐‘ฌ๐‘ฏ๐‘›", "morefollows.followers_label": "โ€ฆ๐‘ฏ {count} ๐‘ฅ๐‘น {count, plural, one {follower} other {followers}} ๐‘ช๐‘ฏ ๐‘ฎ๐‘ฆ๐‘ฅ๐‘ด๐‘‘ ๐‘•๐‘ฒ๐‘‘๐‘•.", diff --git a/app/soapbox/locales/he.json b/app/soapbox/locales/he.json index a454c56de..62c4fce07 100644 --- a/app/soapbox/locales/he.json +++ b/app/soapbox/locales/he.json @@ -598,7 +598,8 @@ "mfa.setup_warning": "ืจืฉื•ื ืืช ื”ืงื•ื“ื™ื ื”ืืœื” ืื• ืฉืžื•ืจ ืื•ืชื ื‘ืžืงื•ื ืžืื•ื‘ื˜ื— - ืื—ืจืช ืœื ืชืจืื” ืื•ืชื ืฉื•ื‘. ืื ืชืื‘ื“ ืืช ื”ื’ื™ืฉื” ืœืืคืœื™ืงืฆื™ื™ืช 2FA ื•ืœืงื•ื“ื™ ื”ืฉื—ื–ื•ืจ ืฉืœืš ืชื™ื ืขืœ ืžื—ื•ืฅ ืœื—ืฉื‘ื•ืŸ ืฉืœืš.", "missing_description_modal.cancel": "ื‘ื˜ืœ", "missing_description_modal.continue": "ืฉืœื—", - "missing_description_modal.text": "ืœื ื”ื–ื ืช ืชื™ืื•ืจ ืขื‘ื•ืจ ื›ืœ ื”ืงื‘ืฆื™ื ื”ืžืฆื•ืจืคื™ื. ื”ืžืฉืš ื‘ื›ืœ ื–ืืช?", + "missing_description_modal.description": "ื”ืžืฉืš ื‘ื›ืœ ื–ืืช?", + "missing_description_modal.text": "ืœื ื”ื–ื ืช ืชื™ืื•ืจ ืขื‘ื•ืจ ื›ืœ ื”ืงื‘ืฆื™ื ื”ืžืฆื•ืจืคื™ื.", "missing_indicator.label": "ืœื ื ืžืฆื", "missing_indicator.sublabel": "ืžืฉืื‘ ื–ื” ืœื ื ืžืฆื", "morefollows.followers_label": "ื•-{count} ืขื•ื“ {count, plural, one {ืขื•ืงื‘} other {ืขื•ืงื‘ื™ื}} ื‘ืืชืจื™ื ืžืจื•ื—ืงื™ื.", diff --git a/app/soapbox/locales/pl.json b/app/soapbox/locales/pl.json index ebb61e18e..d4feae868 100644 --- a/app/soapbox/locales/pl.json +++ b/app/soapbox/locales/pl.json @@ -640,7 +640,8 @@ "migration.submit": "Przenieล› obserwujฤ…cych", "missing_description_modal.cancel": "Anuluj", "missing_description_modal.continue": "Opublikuj", - "missing_description_modal.text": "Nie podaล‚eล›(-aล›) opisu dla wszystkich zaล‚ฤ…cznikรณw. Czy na pewno chcesz kontynuowaฤ‡?", + "missing_description_modal.description": "Czy na pewno chcesz kontynuowaฤ‡?", + "missing_description_modal.text": "Nie podaล‚eล›(-aล›) opisu dla wszystkich zaล‚ฤ…cznikรณw.", "missing_indicator.label": "Nie znaleziono", "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.", diff --git a/app/soapbox/locales/zh-CN.json b/app/soapbox/locales/zh-CN.json index 86e92a1c4..2a62dfa38 100644 --- a/app/soapbox/locales/zh-CN.json +++ b/app/soapbox/locales/zh-CN.json @@ -595,7 +595,8 @@ "mfa.setup_warning": "่ฏท็ซ‹ๅณๅฐ†ๆขๅคไปฃ็ ไฟๅญ˜ๆˆ–ๅ†™ๅˆฐ็บธไธŠ๏ผŒๅฆๅˆ™ไฝ ๅฏ่ƒฝๆ— ๆณ•็™ปๅฝ•ๅธๅทใ€‚", "missing_description_modal.cancel": "ๅ–ๆถˆ", "missing_description_modal.continue": "ๅ‘ๅธƒ", - "missing_description_modal.text": "้™„ไปถๆฒกๆœ‰ๆ่ฟฐไฟกๆฏ๏ผŒไป็„ถ็ปง็ปญๅ‘ๅธƒๅ—๏ผŸ", + "missing_description_modal.description": "ไป็„ถ็ปง็ปญๅ‘ๅธƒๅ—๏ผŸ", + "missing_description_modal.text": "้™„ไปถๆฒกๆœ‰ๆ่ฟฐไฟกๆฏใ€‚", "missing_indicator.label": "ๆ‰พไธๅˆฐๅ†…ๅฎน", "missing_indicator.sublabel": "ๆ— ๆณ•ๆ‰พๅˆฐๆญค่ต„ๆบ", "morefollows.followers_label": "ๅ’Œ{count} ๆฅ่‡ชๅ…ถไป–็ซ™็‚น็š„ {count, plural, one {ๅ…ณๆณจ่€…} other {ๅ…ณๆณจ่€…}} ใ€‚",