From 889b52e813600a1fb9720ed053d9c61967be3005 Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 11 Jan 2021 20:57:48 +0900 Subject: [PATCH] =?UTF-8?q?=E3=82=A2=E3=82=AB=E3=82=A6=E3=83=B3=E3=83=88?= =?UTF-8?q?=E3=81=AE=E9=96=89=E9=8E=96=E3=82=92=E3=82=AF=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E3=82=A2=E3=83=B3=E3=83=88=E3=81=8B=E3=82=89=E8=A1=8C=E3=81=88?= =?UTF-8?q?=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/ja-JP.yml | 1 + src/client/pages/settings/other.vue | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 26e055f5c..d451ad72b 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -691,6 +691,7 @@ saveConfirm: "保存しますか?" deleteConfirm: "削除しますか?" invalidValue: "有効な値ではありません。" registry: "レジストリ" +closeAccount: "アカウントを閉鎖する" _registry: scope: "スコープ" diff --git a/src/client/pages/settings/other.vue b/src/client/pages/settings/other.vue index bc42b747d..426d91ba0 100644 --- a/src/client/pages/settings/other.vue +++ b/src/client/pages/settings/other.vue @@ -20,6 +20,8 @@ {{ $ts.registry }} + + {{ $ts.closeAccount }} @@ -35,6 +37,7 @@ import FormButton from '@/components/form/button.vue'; import * as os from '@/os'; import { debug } from '@/config'; import { defaultStore } from '@/store'; +import { signout } from '@/account'; export default defineComponent({ components: { @@ -83,6 +86,22 @@ export default defineComponent({ taskmanager() { os.popup(import('@/components/taskmanager.vue'), { }, {}, 'closed'); + }, + + closeAccount() { + os.dialog({ + title: this.$ts.password, + input: { + type: 'password' + } + }).then(({ canceled, result: password }) => { + if (canceled) return; + os.api('i/delete-account', { + password: password + }).then(() => { + signout(); + }); + }); } } });