diff options
| author | taehoon <th.dev91@gmail.com> | 2019-03-29 21:58:20 -0400 |
|---|---|---|
| committer | taehoon <th.dev91@gmail.com> | 2019-04-27 08:31:06 -0400 |
| commit | 562120ae48945d87a24f2248f9b16185b49159d0 (patch) | |
| tree | 6dd44cb102078b7ebf29cb05956df0710501f8c5 /src/components/user_settings/user_settings.js | |
| parent | 9e2fa50b74eb83e3c3eadb9a68d24ddaa1d9da48 (diff) | |
split out follow’s importer as a separate component
Diffstat (limited to 'src/components/user_settings/user_settings.js')
| -rw-r--r-- | src/components/user_settings/user_settings.js | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/src/components/user_settings/user_settings.js b/src/components/user_settings/user_settings.js index e88ee612..a213650b 100644 --- a/src/components/user_settings/user_settings.js +++ b/src/components/user_settings/user_settings.js @@ -13,6 +13,7 @@ import SelectableList from '../selectable_list/selectable_list.vue' import ProgressButton from '../progress_button/progress_button.vue' import EmojiInput from '../emoji-input/emoji-input.vue' import Autosuggest from '../autosuggest/autosuggest.vue' +import Importer from '../importer/importer.vue' import withSubscription from '../../hocs/with_subscription/with_subscription' import userSearchApi from '../../services/new_api/user_search.js' @@ -40,14 +41,10 @@ const UserSettings = { hideFollowers: this.$store.state.users.currentUser.hide_followers, showRole: this.$store.state.users.currentUser.show_role, role: this.$store.state.users.currentUser.role, - followList: null, - followImportError: false, - followsImported: false, enableFollowsExport: true, pickAvatarBtnVisible: true, bannerUploading: false, backgroundUploading: false, - followListUploading: false, bannerPreview: null, backgroundPreview: null, bannerUploadError: null, @@ -75,7 +72,8 @@ const UserSettings = { Autosuggest, BlockCard, MuteCard, - ProgressButton + ProgressButton, + Importer }, computed: { user () { @@ -236,19 +234,6 @@ const UserSettings = { this.backgroundUploading = false }) }, - importFollows () { - this.followListUploading = true - const followList = this.followList - this.$store.state.api.backendInteractor.followImport({params: followList}) - .then((status) => { - if (status) { - this.followsImported = true - } else { - this.followImportError = true - } - this.followListUploading = false - }) - }, /* This function takes an Array of Users * and outputs a file with all the addresses for the user to download */ @@ -283,16 +268,6 @@ const UserSettings = { setTimeout(() => { this.enableFollowsExport = true }, 2000) }) }, - followListChange () { - // eslint-disable-next-line no-undef - let formData = new FormData() - formData.append('list', this.$refs.followlist.files[0]) - this.followList = formData - }, - dismissImported () { - this.followsImported = false - this.followImportError = false - }, confirmDelete () { this.deletingAccount = true }, |
