feat: make possible to export favorited notes

#9331
This commit is contained in:
syuilo
2023-01-01 16:53:10 +09:00
parent 0d34d28c56
commit e414737179
10 changed files with 230 additions and 2 deletions

View File

@@ -8,6 +8,14 @@
<MkButton primary :class="$style.button" inline @click="exportNotes()"><i class="ti ti-download"></i> {{ i18n.ts.export }}</MkButton>
</FormFolder>
</FormSection>
<FormSection>
<template #label>{{ i18n.ts._exportOrImport.favoritedNotes }}</template>
<FormFolder>
<template #label>{{ i18n.ts.export }}</template>
<template #icon><i class="ti ti-download"></i></template>
<MkButton primary :class="$style.button" inline @click="exportFavorites()"><i class="ti ti-download"></i> {{ i18n.ts.export }}</MkButton>
</FormFolder>
</FormSection>
<FormSection>
<template #label>{{ i18n.ts._exportOrImport.followingList }}</template>
<FormFolder class="_formBlock">
@@ -108,6 +116,10 @@ const exportNotes = () => {
os.api('i/export-notes', {}).then(onExportSuccess).catch(onError);
};
const exportFavorites = () => {
os.api('i/export-favorites', {}).then(onExportSuccess).catch(onError);
};
const exportFollowing = () => {
os.api('i/export-following', {
excludeMuting: excludeMutingUsers.value,