Skip to content
Snippets Groups Projects
Commit 889b52e8 authored by syuilo's avatar syuilo
Browse files

アカウントの閉鎖をクライアントから行えるように

parent 6c975275
No related branches found
No related tags found
No related merge requests found
......@@ -691,6 +691,7 @@ saveConfirm: "保存しますか?"
deleteConfirm: "削除しますか?"
invalidValue: "有効な値ではありません。"
registry: "レジストリ"
closeAccount: "アカウントを閉鎖する"
_registry:
scope: "スコープ"
......
......@@ -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();
});
});
}
}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment