summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2021-01-11 20:57:48 +0900
committersyuilo <syuilotan@yahoo.co.jp>2021-01-11 20:57:48 +0900
commit889b52e813600a1fb9720ed053d9c61967be3005 (patch)
treea55eefacf33e5f9f6beed07a67a15ce3d880ee56 /src
parentRegistry (#7073) (diff)
downloadmisskey-889b52e813600a1fb9720ed053d9c61967be3005.tar.gz
misskey-889b52e813600a1fb9720ed053d9c61967be3005.tar.bz2
misskey-889b52e813600a1fb9720ed053d9c61967be3005.zip
アカウントの閉鎖をクライアントから行えるように
Diffstat (limited to 'src')
-rw-r--r--src/client/pages/settings/other.vue19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/client/pages/settings/other.vue b/src/client/pages/settings/other.vue
index bc42b747d5..426d91ba01 100644
--- a/src/client/pages/settings/other.vue
+++ b/src/client/pages/settings/other.vue
@@ -20,6 +20,8 @@
</FormGroup>
<FormLink to="/settings/registry"><template #icon><Fa :icon="faCogs"/></template>{{ $ts.registry }}</FormLink>
+
+ <FormButton @click="closeAccount" danger>{{ $ts.closeAccount }}</FormButton>
</FormBase>
</template>
@@ -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();
+ });
+ });
}
}
});