From a058941aedcfe6a3e14e245b7270477a7a6e69be Mon Sep 17 00:00:00 2001
From: eal <eal@waifu.club>
Date: Sat, 23 Dec 2017 16:44:22 +0200
Subject: Add follow import to user settings.

---
 src/components/user_settings/user_settings.vue | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

(limited to 'src/components/user_settings/user_settings.vue')

diff --git a/src/components/user_settings/user_settings.vue b/src/components/user_settings/user_settings.vue
index 515fd253..da78cdc2 100644
--- a/src/components/user_settings/user_settings.vue
+++ b/src/components/user_settings/user_settings.vue
@@ -49,6 +49,23 @@
         <i class="base09 icon-spin4 animate-spin uploading" v-if="uploading[2]"></i>
         <button class="btn btn-default base05 base02-background" v-else-if="previews[2]" @click="submitBg">{{$t('general.submit')}}</button>
       </div>
+      <div class="setting-item" v-if="pleromaBackend">
+        <h3>{{$t('settings.follow_import')}}</h3>
+        <p>{{$t('settings.import_followers_from_a_csv_file')}}</p>
+        <form v-model="followImportForm">
+          <input type="file" ref="followlist" v-on:change="followListChange"></input>
+        </form>
+        <i class="base09 icon-spin4 animate-spin uploading" v-if="uploading[3]"></i>
+        <button class="btn btn-default base05 base02-background" v-else @click="importFollows">{{$t('general.submit')}}</button>
+        <div v-if="followsImported">
+          <i class="icon-cross" @click="dismissImported"></i>
+          <p>{{$t('settings.follows_imported')}}</p>
+        </div>
+        <div v-else-if="followImportError">
+          <i class="icon-cross" @click="dismissImported"</i>
+          <p>{{$t('settings.follow_import_error')}}</p>
+        </div>
+      </div>
     </div>
   </div>
 </template>
-- 
cgit v1.2.3-70-g09d2

