Move "Import data" under settings

This commit is contained in:
Alex Gleason 2023-01-11 17:30:32 -06:00
parent 98f311873c
commit ebfd7bdc94
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7
4 changed files with 7 additions and 13 deletions

View file

@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Posts: letterbox images to 19:6 again. - Posts: letterbox images to 19:6 again.
- Status Info: moved context (repost, pinned) to improve UX. - Status Info: moved context (repost, pinned) to improve UX.
- Posts: remove file icon from empty link previews. - Posts: remove file icon from empty link previews.
- Settings: moved "Import data" under settings.
### Fixed ### Fixed
- Layout: use accent color for "floating action button" (mobile compose button). - Layout: use accent color for "floating action button" (mobile compose button).

View file

@ -28,7 +28,6 @@ const messages = defineMessages({
mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' }, mutes: { id: 'navigation_bar.mutes', defaultMessage: 'Muted users' },
filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' }, filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' },
soapboxConfig: { id: 'navigation_bar.soapbox_config', defaultMessage: 'Soapbox config' }, soapboxConfig: { id: 'navigation_bar.soapbox_config', defaultMessage: 'Soapbox config' },
importData: { id: 'navigation_bar.import_data', defaultMessage: 'Import data' },
accountMigration: { id: 'navigation_bar.account_migration', defaultMessage: 'Move account' }, accountMigration: { id: 'navigation_bar.account_migration', defaultMessage: 'Move account' },
accountAliases: { id: 'navigation_bar.account_aliases', defaultMessage: 'Account aliases' }, accountAliases: { id: 'navigation_bar.account_aliases', defaultMessage: 'Account aliases' },
logout: { id: 'navigation_bar.logout', defaultMessage: 'Logout' }, logout: { id: 'navigation_bar.logout', defaultMessage: 'Logout' },
@ -305,15 +304,6 @@ const SidebarMenu: React.FC = (): JSX.Element | null => {
/> />
)} )}
{features.import && (
<SidebarLink
to='/settings/import'
icon={require('@tabler/icons/cloud-upload.svg')}
text={intl.formatMessage(messages.importData)}
onClick={onClose}
/>
)}
<Divider /> <Divider />
<SidebarLink <SidebarLink

View file

@ -28,6 +28,7 @@ const messages = defineMessages({
mfaEnabled: { id: 'mfa.enabled', defaultMessage: 'Enabled' }, mfaEnabled: { id: 'mfa.enabled', defaultMessage: 'Enabled' },
mfaDisabled: { id: 'mfa.disabled', defaultMessage: 'Disabled' }, mfaDisabled: { id: 'mfa.disabled', defaultMessage: 'Disabled' },
backups: { id: 'column.backups', defaultMessage: 'Backups' }, backups: { id: 'column.backups', defaultMessage: 'Backups' },
importData: { id: 'navigation_bar.import_data', defaultMessage: 'Import data' },
}); });
/** User settings page. */ /** User settings page. */
@ -49,6 +50,7 @@ const Settings = () => {
const navigateToMoveAccount = () => history.push('/settings/migration'); const navigateToMoveAccount = () => history.push('/settings/migration');
const navigateToAliases = () => history.push('/settings/aliases'); const navigateToAliases = () => history.push('/settings/aliases');
const navigateToBackups = () => history.push('/settings/backups'); const navigateToBackups = () => history.push('/settings/backups');
const navigateToImportData = () => history.push('/settings/import');
const isMfaEnabled = mfa.getIn(['settings', 'totp']); const isMfaEnabled = mfa.getIn(['settings', 'totp']);
@ -142,6 +144,10 @@ const Settings = () => {
<ListItem label={intl.formatMessage(messages.backups)} onClick={navigateToBackups} /> <ListItem label={intl.formatMessage(messages.backups)} onClick={navigateToBackups} />
)} )}
{features.importData && (
<ListItem label={intl.formatMessage(messages.importData)} onClick={navigateToImportData} />
)}
{features.security && ( {features.security && (
<ListItem label={intl.formatMessage(messages.deleteAccount)} onClick={navigateToDeleteAccount} /> <ListItem label={intl.formatMessage(messages.deleteAccount)} onClick={navigateToDeleteAccount} />
)} )}

View file

@ -56,9 +56,6 @@ const LinkFooter: React.FC = (): JSX.Element => {
{account.locked && ( {account.locked && (
<FooterLink to='/follow_requests'><FormattedMessage id='navigation_bar.follow_requests' defaultMessage='Follow requests' /></FooterLink> <FooterLink to='/follow_requests'><FormattedMessage id='navigation_bar.follow_requests' defaultMessage='Follow requests' /></FooterLink>
)} )}
{features.import && (
<FooterLink to='/settings/import'><FormattedMessage id='navigation_bar.import_data' defaultMessage='Import data' /></FooterLink>
)}
<FooterLink to='/logout' onClick={onClickLogOut}><FormattedMessage id='navigation_bar.logout' defaultMessage='Logout' /></FooterLink> <FooterLink to='/logout' onClick={onClickLogOut}><FormattedMessage id='navigation_bar.logout' defaultMessage='Logout' /></FooterLink>
</>} </>}
</div> </div>