From c3d34bda37ca3b48214b094d54ee22d987a42574 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Mar 2019 19:43:58 +0900 Subject: Resolve #4259 --- .../common/views/components/settings/profile.vue | 26 ++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'src/client') diff --git a/src/client/app/common/views/components/settings/profile.vue b/src/client/app/common/views/components/settings/profile.vue index 16e7a3b259..c49b465ce3 100644 --- a/src/client/app/common/views/components/settings/profile.vue +++ b/src/client/app/common/views/components/settings/profile.vue @@ -89,7 +89,7 @@
-
{{ $t('export') }}
+
{{ $t('export-and-import') }}
@@ -99,7 +99,10 @@ - {{ $t('export') }} + + {{ $t('export') }} + {{ $t('import') }} +
@@ -119,7 +122,7 @@ import { apiUrl, host } from '../../../../config'; import { toUnicode } from 'punycode'; import langmap from 'langmap'; import { unique } from '../../../../../../prelude/array'; -import { faDownload } from '@fortawesome/free-solid-svg-icons'; +import { faDownload, faUpload } from '@fortawesome/free-solid-svg-icons'; export default Vue.extend({ i18n: i18n('common/views/components/profile-editor.vue'), @@ -148,7 +151,7 @@ export default Vue.extend({ avatarUploading: false, bannerUploading: false, exportTarget: 'notes', - faDownload + faDownload, faUpload }; }, @@ -294,6 +297,21 @@ export default Vue.extend({ }); }, + doImport() { + this.$chooseDriveFile().then(file => { + this.$root.api( + this.exportTarget == 'user-lists' ? 'i/import-user-lists' : + null, { + fileId: file.id + }); + + this.$root.dialog({ + type: 'info', + text: this.$t('import-requested') + }); + }); + }, + async deleteAccount() { const { canceled: canceled, result: password } = await this.$root.dialog({ title: this.$t('enter-password'), -- cgit v1.2.3-freya