mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 04:26:58 +00:00
move "request data export" from "other" to "accont data"
This commit is contained in:
parent
4d76243662
commit
ee79061384
2 changed files with 18 additions and 27 deletions
|
@ -168,6 +168,19 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</MkFolder>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker :keywords="['account', 'export', 'data']">
|
||||
<MkFolder>
|
||||
<template #icon><SearchIcon><i class="ph-database ph-bold ph-lg"></i></SearchIcon></template>
|
||||
<template #label><SearchLabel>{{ i18n.ts._dataRequest.title }}</SearchLabel></template>
|
||||
|
||||
<div class="_gaps_m">
|
||||
<FormInfo warn>{{ i18n.ts._dataRequest.warn }}</FormInfo>
|
||||
<FormInfo>{{ i18n.ts._dataRequest.text }}</FormInfo>
|
||||
<MkButton primary @click="exportData">{{ i18n.ts._dataRequest.button }}</MkButton>
|
||||
</div>
|
||||
</MkFolder>
|
||||
</SearchMarker>
|
||||
</div>
|
||||
</div>
|
||||
</SearchMarker>
|
||||
|
@ -179,6 +192,7 @@ 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 FormInfo from '@/components/MkInfo.vue';
|
||||
import * as os from '@/os.js';
|
||||
import { misskeyApi } from '@/utility/misskey-api.js';
|
||||
import { selectFile } from '@/utility/select-file.js';
|
||||
|
@ -250,6 +264,10 @@ const exportAntennas = () => {
|
|||
misskeyApi('i/export-antennas', {}).then(onExportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const exportData = () => {
|
||||
misskeyApi('i/export-data', {}).then(onExportSuccess).catch(onError);
|
||||
};
|
||||
|
||||
const importFollowing = async (ev) => {
|
||||
const file = await selectFile(ev.currentTarget ?? ev.target);
|
||||
misskeyApi('i/import-following', {
|
||||
|
|
|
@ -67,19 +67,6 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</MkFolder>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker :keywords="['account', 'export', 'data']">
|
||||
<MkFolder>
|
||||
<template #icon><i class="ph-database ph-bold ph-lg"></i></template>
|
||||
<template #label><SearchLabel>{{ i18n.ts._dataRequest.title }}</SearchLabel></template>
|
||||
|
||||
<div class="_gaps_m">
|
||||
<FormInfo warn>{{ i18n.ts._dataRequest.warn }}</FormInfo>
|
||||
<FormInfo>{{ i18n.ts._dataRequest.text }}</FormInfo>
|
||||
<MkButton primary @click="exportData">{{ i18n.ts._dataRequest.button }}</MkButton>
|
||||
</div>
|
||||
</MkFolder>
|
||||
</SearchMarker>
|
||||
|
||||
<SearchMarker :keywords="['account', 'close', 'delete']">
|
||||
<MkFolder>
|
||||
<template #icon><SearchIcon><i class="ti ti-alert-triangle"></i></SearchIcon></template>
|
||||
|
@ -211,20 +198,6 @@ function migrate() {
|
|||
migrateOldSettings();
|
||||
}
|
||||
|
||||
const exportData = () => {
|
||||
misskeyApi('i/export-data', {}).then(() => {
|
||||
os.alert({
|
||||
type: 'info',
|
||||
text: i18n.ts.exportRequested,
|
||||
});
|
||||
}).catch((ev) => {
|
||||
os.alert({
|
||||
type: 'error',
|
||||
text: ev.message,
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const headerActions = computed(() => []);
|
||||
|
||||
const headerTabs = computed(() => []);
|
||||
|
|
Loading…
Add table
Reference in a new issue