upd: add frontend option to export data
This commit is contained in:
parent
fabb876256
commit
e409abdd40
4 changed files with 43 additions and 0 deletions
|
@ -2401,3 +2401,9 @@ _animatedMFM:
|
|||
_alert:
|
||||
text: "Animated MFMs could include flashing lights and fast moving text/emojis."
|
||||
confirm: "Animate"
|
||||
|
||||
_dataRequest:
|
||||
title: "Request Data"
|
||||
warn: "Data requests are only possible every 3 days."
|
||||
text: "Once the data is ready to download, an email will be sent to the email address registered to this account."
|
||||
button: "Request"
|
||||
|
|
6
locales/index.d.ts
vendored
6
locales/index.d.ts
vendored
|
@ -2509,6 +2509,12 @@ export interface Locale {
|
|||
"confirm": string;
|
||||
};
|
||||
};
|
||||
"_dataRequest": {
|
||||
"title": string;
|
||||
"warn": string;
|
||||
"text": string;
|
||||
"button": string;
|
||||
};
|
||||
}
|
||||
declare const locales: {
|
||||
[lang: string]: Locale;
|
||||
|
|
|
@ -2395,3 +2395,9 @@ _animatedMFM:
|
|||
_alert:
|
||||
text: "アニメーションMFMには、点滅するライトや高速で動くテキスト/絵文字を含めることができる。"
|
||||
confirm: "アニメイト"
|
||||
|
||||
_dataRequest:
|
||||
title: "リクエストデータ"
|
||||
warn: "データのリクエストは3日ごとにしかできない。"
|
||||
text: "データのダウンロードが完了すると、このアカウントに登録されているEメールアドレスにEメールが送信されます。"
|
||||
button: "リクエスト"
|
||||
|
|
|
@ -34,6 +34,17 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
</div>
|
||||
</MkFolder>
|
||||
|
||||
<MkFolder>
|
||||
<template #icon><i class="ph-database ph-bold ph-lg"></i></template>
|
||||
<template #label>{{ i18n.ts._dataRequest.title }}</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>
|
||||
|
||||
<MkFolder>
|
||||
<template #icon><i class="ph-warning ph-bold ph-lg"></i></template>
|
||||
<template #label>{{ i18n.ts.closeAccount }}</template>
|
||||
|
@ -156,6 +167,20 @@ async function updateRepliesAll(withReplies: boolean) {
|
|||
await os.api('following/update-all', { withReplies });
|
||||
}
|
||||
|
||||
const exportData = () => {
|
||||
os.api('i/export-data', {}).then(() => {
|
||||
os.alert({
|
||||
type: 'info',
|
||||
text: i18n.ts.exportRequested,
|
||||
});
|
||||
}).catch((ev) => {
|
||||
os.alert({
|
||||
type: 'error',
|
||||
text: ev.message,
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
watch([
|
||||
enableCondensedLineForAcct,
|
||||
], async () => {
|
||||
|
|
Loading…
Reference in a new issue