diff --git a/app/soapbox/actions/import_follows.js b/app/soapbox/actions/import_data.js similarity index 90% rename from app/soapbox/actions/import_follows.js rename to app/soapbox/actions/import_data.js index ebae39827..e80ffa2d2 100644 --- a/app/soapbox/actions/import_follows.js +++ b/app/soapbox/actions/import_data.js @@ -11,7 +11,7 @@ export function importFollows(params) { return api(getState) .post('/api/pleroma/follow_import', params) .then(response => { - dispatch(showAlert('', 'Successful import')); + dispatch(showAlert('', 'Followers imported successfully')); dispatch({ type: IMPORT_FOLLOWS_SUCCESS, config: response.data }); }).catch(error => { dispatch({ type: IMPORT_FOLLOWS_FAIL, error }); diff --git a/app/soapbox/components/sidebar_menu.js b/app/soapbox/components/sidebar_menu.js index f81bc298f..ea9f753d4 100644 --- a/app/soapbox/components/sidebar_menu.js +++ b/app/soapbox/components/sidebar_menu.js @@ -29,7 +29,7 @@ const messages = defineMessages({ filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' }, admin_settings: { id: 'navigation_bar.admin_settings', defaultMessage: 'Admin settings' }, soapbox_config: { id: 'navigation_bar.soapbox_config', defaultMessage: 'Soapbox config' }, - import_follows: { id: 'navigation_bar.import_follows', defaultMessage: 'Import follows' }, + import_data: { id: 'navigation_bar.import_data', defaultMessage: 'Import data' }, security: { id: 'navigation_bar.security', defaultMessage: 'Security' }, logout: { id: 'navigation_bar.logout', defaultMessage: 'Logout' }, lists: { id: 'column.lists', defaultMessage: 'Lists' }, @@ -181,14 +181,14 @@ class SidebarMenu extends ImmutablePureComponent { {intl.formatMessage(messages.preferences)} + + + {intl.formatMessage(messages.import_data)} + {intl.formatMessage(messages.security)} - - - {intl.formatMessage(messages.import_follows)} -
diff --git a/app/soapbox/features/compose/components/action_bar.js b/app/soapbox/features/compose/components/action_bar.js index 32e8562d7..863d49f22 100644 --- a/app/soapbox/features/compose/components/action_bar.js +++ b/app/soapbox/features/compose/components/action_bar.js @@ -20,7 +20,7 @@ const messages = defineMessages({ filters: { id: 'navigation_bar.filters', defaultMessage: 'Muted words' }, admin_settings: { id: 'navigation_bar.admin_settings', defaultMessage: 'Admin settings' }, soapbox_config: { id: 'navigation_bar.soapbox_config', defaultMessage: 'Soapbox config' }, - import_follows: { id: 'navigation_bar.import_follows', defaultMessage: 'Import follows' }, + import_data: { id: 'navigation_bar.import_data', defaultMessage: 'Import data' }, security: { id: 'navigation_bar.security', defaultMessage: 'Security' }, logout: { id: 'navigation_bar.logout', defaultMessage: 'Logout' }, keyboard_shortcuts: { id: 'navigation_bar.keyboard_shortcuts', defaultMessage: 'Hotkeys' }, @@ -85,8 +85,8 @@ class ActionBar extends React.PureComponent { menu.push({ text: intl.formatMessage(messages.soapbox_config), to: '/soapbox/config' }); } menu.push({ text: intl.formatMessage(messages.preferences), to: '/settings/preferences' }); + menu.push({ text: intl.formatMessage(messages.import_data), to: '/settings/import' }); menu.push({ text: intl.formatMessage(messages.security), to: '/auth/edit' }); - menu.push({ text: intl.formatMessage(messages.import_follows), to: '/settings/import' }); menu.push({ text: intl.formatMessage(messages.logout), to: '/auth/sign_out', action: onClickLogOut }); return ( diff --git a/app/soapbox/features/import_follows/index.js b/app/soapbox/features/import_data/index.js similarity index 77% rename from app/soapbox/features/import_follows/index.js rename to app/soapbox/features/import_data/index.js index c612a2cb0..39e305c64 100644 --- a/app/soapbox/features/import_follows/index.js +++ b/app/soapbox/features/import_data/index.js @@ -9,19 +9,14 @@ import { FieldsGroup, FileChooserCSV, } from 'soapbox/features/forms'; -import { importFollows } from 'soapbox/actions/import_follows'; +import { importFollows } from 'soapbox/actions/import_data'; const messages = defineMessages({ - heading: { id: 'column.import_follows', defaultMessage: 'Import follows' }, + heading: { id: 'column.import_data', defaultMessage: 'Import data' }, }); -const mapStateToProps = state => ({ - follows: state.get('follows'), -}); - -export default @connect(mapStateToProps) -@injectIntl -class ImportFollows extends ImmutablePureComponent { +export default @injectIntl +class ImportData extends ImmutablePureComponent { constructor(props) { super(props); @@ -71,16 +66,16 @@ class ImportFollows extends ImmutablePureComponent { const { intl } = this.props; return ( - +
} + label={} name='follows' - hint={} + hint={} onChange={this.handleFileChange('follows')} />
diff --git a/app/soapbox/features/ui/index.js b/app/soapbox/features/ui/index.js index f7c00a442..70b891ce8 100644 --- a/app/soapbox/features/ui/index.js +++ b/app/soapbox/features/ui/index.js @@ -78,7 +78,7 @@ import { Preferences, EditProfile, SoapboxConfig, - ImportFollows, + ImportData, PasswordReset, SecurityForm, MfaForm, @@ -264,8 +264,8 @@ class SwitchingColumnsArea extends React.PureComponent { + - diff --git a/app/soapbox/features/ui/util/async-components.js b/app/soapbox/features/ui/util/async-components.js index 3da609a38..724a33e39 100644 --- a/app/soapbox/features/ui/util/async-components.js +++ b/app/soapbox/features/ui/util/async-components.js @@ -186,8 +186,8 @@ export function SoapboxConfig() { return import(/* webpackChunkName: "features/soapbox_config" */'../../soapbox_config'); } -export function ImportFollows() { - return import(/* webpackChunkName: "features/import_follows" */'../../import_follows'); +export function ImportData() { + return import(/* webpackChunkName: "features/import_follows" */'../../import_data'); } export function PasswordReset() {