add “block import” feature

This commit is contained in:
taehoon 2019-03-30 07:27:53 -04:00
parent 6ea4154084
commit 0ab2f9dfa5
5 changed files with 32 additions and 0 deletions

View file

@ -242,6 +242,14 @@ const UserSettings = {
}
})
},
importBlocks (file) {
return this.$store.state.api.backendInteractor.importBlocks(file)
.then((status) => {
if (!status) {
throw new Error('failed')
}
})
},
/* This function takes an Array of Users
* and outputs a file with all the addresses for the user to download
*/

View file

@ -180,6 +180,11 @@
<div class="setting-item" v-else>
<h2>{{$t('settings.follow_export_processing')}}</h2>
</div>
<div class="setting-item">
<h2>{{$t('settings.block_import')}}</h2>
<p>{{$t('settings.import_blocks_from_a_csv_file')}}</p>
<Importer :submitHandler="importFollows" :successMessage="$t('settings.blocks_imported')" :errorMessage="$t('settings.block_import_error')" />
</div>
</div>
<div :label="$t('settings.blocks_tab')">