diff --git a/packages/frontend/src/pages/settings/account-data.vue b/packages/frontend/src/pages/settings/account-data.vue
index 14bea577a3..84c5400603 100644
--- a/packages/frontend/src/pages/settings/account-data.vue
+++ b/packages/frontend/src/pages/settings/account-data.vue
@@ -11,7 +11,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
{{ i18n.ts._exportOrImport.allNotes }}
@@ -23,6 +23,22 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+
+ {{ i18n.ts.import }}
+
+
+ Origin
+
+
+
+
+
+
+ {{ i18n.ts.import }}
+
+
+
@@ -162,6 +178,7 @@ import { ref, computed } from 'vue';
import MkButton from '@/components/MkButton.vue';
import MkFolder from '@/components/MkFolder.vue';
import MkSwitch from '@/components/MkSwitch.vue';
+import MkRadios from '@/components/MkRadios.vue';
import * as os from '@/os.js';
import { misskeyApi } from '@/utility/misskey-api.js';
import { selectFile } from '@/utility/select-file.js';
@@ -173,6 +190,7 @@ import { prefer } from '@/preferences.js';
const excludeMutingUsers = ref(false);
const excludeInactiveUsers = ref(false);
+const noteType = ref(null);
const withReplies = ref(prefer.s.defaultFollowWithReplies);
const onExportSuccess = () => {
@@ -240,6 +258,14 @@ const importFollowing = async (ev) => {
}).then(onImportSuccess).catch(onError);
};
+const importNotes = async (ev) => {
+ const file = await selectFile(ev.currentTarget ?? ev.target);
+ misskeyApi('i/import-notes', {
+ fileId: file.id,
+ type: noteType.value,
+ }).then(onImportSuccess).catch(onError);
+};
+
const importUserLists = async (ev) => {
const file = await selectFile(ev.currentTarget ?? ev.target);
misskeyApi('i/import-user-lists', { fileId: file.id }).then(onImportSuccess).catch(onError);