summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2019-03-11 19:43:58 +0900
committersyuilo <syuilotan@yahoo.co.jp>2019-03-11 19:43:58 +0900
commitc3d34bda37ca3b48214b094d54ee22d987a42574 (patch)
treecc5c7bb9d1883563e83c3a0165b2c5e6380da9ba /src/client
parent10.92.4 (diff)
downloadmisskey-c3d34bda37ca3b48214b094d54ee22d987a42574.tar.gz
misskey-c3d34bda37ca3b48214b094d54ee22d987a42574.tar.bz2
misskey-c3d34bda37ca3b48214b094d54ee22d987a42574.zip
Resolve #4259
Diffstat (limited to 'src/client')
-rw-r--r--src/client/app/common/views/components/settings/profile.vue26
1 files changed, 22 insertions, 4 deletions
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 @@
</section>
<section>
- <header>{{ $t('export') }}</header>
+ <header>{{ $t('export-and-import') }}</header>
<div>
<ui-select v-model="exportTarget">
@@ -99,7 +99,10 @@
<option value="blocking">{{ $t('export-targets.blocking-list') }}</option>
<option value="user-lists">{{ $t('export-targets.user-lists') }}</option>
</ui-select>
- <ui-button @click="doExport()"><fa :icon="faDownload"/> {{ $t('export') }}</ui-button>
+ <ui-horizon-group class="fit-bottom">
+ <ui-button @click="doExport()"><fa :icon="faDownload"/> {{ $t('export') }}</ui-button>
+ <ui-button @click="doImport()" :disabled="!['user-lists'].includes(exportTarget)"><fa :icon="faUpload"/> {{ $t('import') }}</ui-button>
+ </ui-horizon-group>
</div>
</section>
@@ -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'),