diff --git a/app/soapbox/actions/admin.js b/app/soapbox/actions/admin.js index ad56f1fbb..b3e382352 100644 --- a/app/soapbox/actions/admin.js +++ b/app/soapbox/actions/admin.js @@ -143,7 +143,7 @@ export function fetchReports(params = {}) { dispatch({ type: ADMIN_REPORTS_FETCH_REQUEST, params }); - if (features.mastodonAdminApi) { + if (features.mastodonAdmi) { return dispatch(fetchMastodonReports(params)); } else { const { resolved } = params; @@ -191,7 +191,7 @@ function patchReports(ids, reportState) { dispatch({ type: ADMIN_REPORTS_PATCH_REQUEST, reports }); - if (features.mastodonAdminApi) { + if (features.mastodonAdmin) { return dispatch(patchMastodonReports(reports)); } else { return dispatch(patchPleromaReports(reports)); @@ -258,7 +258,7 @@ export function fetchUsers(filters = [], page = 1, query, pageSize = 50, next) { dispatch({ type: ADMIN_USERS_FETCH_REQUEST, filters, page, pageSize }); - if (features.mastodonAdminApi) { + if (features.mastodonAdmi) { return dispatch(fetchMastodonUsers(filters, page, query, pageSize, next)); } else { return dispatch(fetchPleromaUsers(filters, page, query, pageSize)); @@ -305,7 +305,7 @@ export function deactivateUsers(accountIds, reportId) { dispatch({ type: ADMIN_USERS_DEACTIVATE_REQUEST, accountIds }); - if (features.mastodonAdminApi) { + if (features.mastodonAdmi) { return dispatch(deactivateMastodonUsers(accountIds, reportId)); } else { return dispatch(deactivatePleromaUsers(accountIds)); @@ -363,7 +363,7 @@ export function approveUsers(accountIds) { dispatch({ type: ADMIN_USERS_APPROVE_REQUEST, accountIds }); - if (features.mastodonAdminApi) { + if (features.mastodonAdmi) { return dispatch(approveMastodonUsers(accountIds)); } else { return dispatch(approvePleromaUsers(accountIds)); diff --git a/app/soapbox/components/sidebar_menu.tsx b/app/soapbox/components/sidebar_menu.tsx index 2f8be96b1..7d47baa47 100644 --- a/app/soapbox/components/sidebar_menu.tsx +++ b/app/soapbox/components/sidebar_menu.tsx @@ -311,7 +311,7 @@ const SidebarMenu: React.FC = (): JSX.Element | null => { /> )} - {features.importAPI && ( + {features.import && ( { /> )} - {features.federating && (features.accountMoving ? ( - - ) : features.accountAliasesAPI && ( - - ))} -
{ const navigateToSessions = () => history.push('/settings/tokens'); const navigateToEditProfile = () => history.push('/settings/profile'); const navigateToDeleteAccount = () => history.push('/settings/account'); + const navigateToMoveAccount = () => history.push('/settings/migration'); + const navigateToAliases = () => history.push('/settings/aliases'); const isMfaEnabled = mfa.getIn(['settings', 'totp']); @@ -69,24 +73,32 @@ const Settings = () => { - - - + {features.security || features.sessions && ( + <> + + + - - - - - - {isMfaEnabled ? - intl.formatMessage(messages.mfaEnabled) : - intl.formatMessage(messages.mfaDisabled)} - - {features.sessionsAPI && ( - - )} - - + + + {features.security && ( + <> + + + + {isMfaEnabled ? + intl.formatMessage(messages.mfaEnabled) : + intl.formatMessage(messages.mfaDisabled)} + + + )} + {features.sessions && ( + + )} + + + + )} @@ -96,15 +108,26 @@ const Settings = () => { - - - + {features.security || features.accountAliases && ( + <> + + + - - - - - + + + {features.security && ( + + )} + {features.federating && (features.accountMoving ? ( + + ) : features.accountAliases && ( + + ))} + + + + )} ); diff --git a/app/soapbox/features/ui/components/action-button.tsx b/app/soapbox/features/ui/components/action-button.tsx index 51348ee1d..205aed90f 100644 --- a/app/soapbox/features/ui/components/action-button.tsx +++ b/app/soapbox/features/ui/components/action-button.tsx @@ -118,7 +118,7 @@ const ActionButton: React.FC = ({ account, actionType, small }) = /** Render a remote follow button, depending on features. */ const renderRemoteFollow = () => { // Remote follow through the API. - if (features.remoteInteractionsAPI) { + if (features.remoteInteractions) { return (