diff --git a/locales/en-US.yml b/locales/en-US.yml index 041ac2178..730e7450d 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -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" diff --git a/locales/index.d.ts b/locales/index.d.ts index 56a9f9bc2..d4934b77a 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -2509,6 +2509,12 @@ export interface Locale { "confirm": string; }; }; + "_dataRequest": { + "title": string; + "warn": string; + "text": string; + "button": string; + }; } declare const locales: { [lang: string]: Locale; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index c45a820e3..36521c881 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -2395,3 +2395,9 @@ _animatedMFM: _alert: text: "アニメーションMFMには、点滅するライトや高速で動くテキスト/絵文字を含めることができる。" confirm: "アニメイト" + +_dataRequest: + title: "リクエストデータ" + warn: "データのリクエストは3日ごとにしかできない。" + text: "データのダウンロードが完了すると、このアカウントに登録されているEメールアドレスにEメールが送信されます。" + button: "リクエスト" diff --git a/packages/frontend/src/pages/settings/other.vue b/packages/frontend/src/pages/settings/other.vue index 3bd3ddbe9..eb2ee2760 100644 --- a/packages/frontend/src/pages/settings/other.vue +++ b/packages/frontend/src/pages/settings/other.vue @@ -34,6 +34,17 @@ SPDX-License-Identifier: AGPL-3.0-only + + + + +
+ {{ i18n.ts._dataRequest.warn }} + {{ i18n.ts._dataRequest.text }} + {{ i18n.ts._dataRequest.button }} +
+
+ @@ -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 () => {