Restore export data CSV (behind a feature flag)
This commit is contained in:
parent
ebfd7bdc94
commit
e50e4b8e60
4 changed files with 20 additions and 11 deletions
|
@ -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.
|
||||
|
|
|
@ -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 = () => {
|
|||
|
||||
<CardBody>
|
||||
<List>
|
||||
{features.federating && (features.accountMoving ? (
|
||||
<ListItem label={intl.formatMessage(messages.accountMigration)} onClick={navigateToMoveAccount} />
|
||||
) : features.accountAliases && (
|
||||
<ListItem label={intl.formatMessage(messages.accountAliases)} onClick={navigateToAliases} />
|
||||
))}
|
||||
{features.importData && (
|
||||
<ListItem label={intl.formatMessage(messages.importData)} onClick={navigateToImportData} />
|
||||
)}
|
||||
|
||||
{features.exportData && (
|
||||
<ListItem label={intl.formatMessage(messages.exportData)} onClick={navigateToExportData} />
|
||||
)}
|
||||
|
||||
{features.backups && (
|
||||
<ListItem label={intl.formatMessage(messages.backups)} onClick={navigateToBackups} />
|
||||
)}
|
||||
|
||||
{features.importData && (
|
||||
<ListItem label={intl.formatMessage(messages.importData)} onClick={navigateToImportData} />
|
||||
)}
|
||||
{features.federating && (features.accountMoving ? (
|
||||
<ListItem label={intl.formatMessage(messages.accountMigration)} onClick={navigateToMoveAccount} />
|
||||
) : features.accountAliases && (
|
||||
<ListItem label={intl.formatMessage(messages.accountAliases)} onClick={navigateToAliases} />
|
||||
))}
|
||||
|
||||
{features.security && (
|
||||
<ListItem label={intl.formatMessage(messages.deleteAccount)} onClick={navigateToDeleteAccount} />
|
||||
|
|
|
@ -76,7 +76,7 @@ import {
|
|||
EmailConfirmation,
|
||||
DeleteAccount,
|
||||
SoapboxConfig,
|
||||
// ExportData,
|
||||
ExportData,
|
||||
ImportData,
|
||||
Backups,
|
||||
MfaForm,
|
||||
|
@ -273,8 +273,7 @@ const SwitchingColumnsArea: React.FC = ({ children }) => {
|
|||
{features.scheduledStatuses && <WrappedRoute path='/scheduled_statuses' page={DefaultPage} component={ScheduledStatuses} content={children} />}
|
||||
|
||||
<WrappedRoute path='/settings/profile' page={DefaultPage} component={EditProfile} content={children} />
|
||||
{/* FIXME: this could DDoS our API? :\ */}
|
||||
{/* <WrappedRoute path='/settings/export' page={DefaultPage} component={ExportData} content={children} /> */}
|
||||
{features.exportData && <WrappedRoute path='/settings/export' page={DefaultPage} component={ExportData} content={children} />}
|
||||
{features.importData && <WrappedRoute path='/settings/import' page={DefaultPage} component={ImportData} content={children} />}
|
||||
{features.accountAliases && <WrappedRoute path='/settings/aliases' page={DefaultPage} component={Aliases} content={children} />}
|
||||
{features.accountMoving && <WrappedRoute path='/settings/migration' page={DefaultPage} component={Migration} content={children} />}
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue