diff --git a/CHANGELOG.md b/CHANGELOG.md index 1a2837a3a..709b0c70c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Admin: let admins configure media preview for attachment thumbnails. - Login: accept `?server` param in external login, eg `fe.soapbox.pub/login/external?server=gleasonator.com`. - Backups: restored Pleroma backups functionality. +- Export: restored "Export data" to CSV. ### Changed - Posts: letterbox images to 19:6 again. diff --git a/app/soapbox/features/settings/index.tsx b/app/soapbox/features/settings/index.tsx index c3c8cea10..f199170d1 100644 --- a/app/soapbox/features/settings/index.tsx +++ b/app/soapbox/features/settings/index.tsx @@ -29,6 +29,7 @@ const messages = defineMessages({ mfaDisabled: { id: 'mfa.disabled', defaultMessage: 'Disabled' }, backups: { id: 'column.backups', defaultMessage: 'Backups' }, importData: { id: 'navigation_bar.import_data', defaultMessage: 'Import data' }, + exportData: { id: 'settings.export_data', defaultMessage: 'Export data' }, }); /** User settings page. */ @@ -51,6 +52,7 @@ const Settings = () => { const navigateToAliases = () => history.push('/settings/aliases'); const navigateToBackups = () => history.push('/settings/backups'); const navigateToImportData = () => history.push('/settings/import'); + const navigateToExportData = () => history.push('/settings/export'); const isMfaEnabled = mfa.getIn(['settings', 'totp']); @@ -134,19 +136,23 @@ const Settings = () => { - {features.federating && (features.accountMoving ? ( - - ) : features.accountAliases && ( - - ))} + {features.importData && ( + + )} + + {features.exportData && ( + + )} {features.backups && ( )} - {features.importData && ( - - )} + {features.federating && (features.accountMoving ? ( + + ) : features.accountAliases && ( + + ))} {features.security && ( diff --git a/app/soapbox/features/ui/index.tsx b/app/soapbox/features/ui/index.tsx index 211fefc46..2fdfda3c9 100644 --- a/app/soapbox/features/ui/index.tsx +++ b/app/soapbox/features/ui/index.tsx @@ -76,7 +76,7 @@ import { EmailConfirmation, DeleteAccount, SoapboxConfig, - // ExportData, + ExportData, ImportData, Backups, MfaForm, @@ -273,8 +273,7 @@ const SwitchingColumnsArea: React.FC = ({ children }) => { {features.scheduledStatuses && } - {/* FIXME: this could DDoS our API? :\ */} - {/* */} + {features.exportData && } {features.importData && } {features.accountAliases && } {features.accountMoving && } diff --git a/app/soapbox/utils/features.ts b/app/soapbox/utils/features.ts index f625c4f37..e59cdfff3 100644 --- a/app/soapbox/utils/features.ts +++ b/app/soapbox/utils/features.ts @@ -388,6 +388,9 @@ const getInstanceFeatures = (instance: Instance) => { v.software === TRUTHSOCIAL, ]), + /** Whether to allow exporting follows/blocks/mutes to CSV by paginating the API. */ + exportData: true, + /** Whether the accounts who favourited or emoji-reacted to a status can be viewed through the API. */ exposableReactions: any([ v.software === MASTODON,