mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-27 02:53:08 +02:00
アカウントの閉鎖をクライアントから行えるように
This commit is contained in:
parent
6c975275f8
commit
889b52e813
2 changed files with 20 additions and 0 deletions
|
@ -691,6 +691,7 @@ saveConfirm: "保存しますか?"
|
||||||
deleteConfirm: "削除しますか?"
|
deleteConfirm: "削除しますか?"
|
||||||
invalidValue: "有効な値ではありません。"
|
invalidValue: "有効な値ではありません。"
|
||||||
registry: "レジストリ"
|
registry: "レジストリ"
|
||||||
|
closeAccount: "アカウントを閉鎖する"
|
||||||
|
|
||||||
_registry:
|
_registry:
|
||||||
scope: "スコープ"
|
scope: "スコープ"
|
||||||
|
|
|
@ -20,6 +20,8 @@
|
||||||
</FormGroup>
|
</FormGroup>
|
||||||
|
|
||||||
<FormLink to="/settings/registry"><template #icon><Fa :icon="faCogs"/></template>{{ $ts.registry }}</FormLink>
|
<FormLink to="/settings/registry"><template #icon><Fa :icon="faCogs"/></template>{{ $ts.registry }}</FormLink>
|
||||||
|
|
||||||
|
<FormButton @click="closeAccount" danger>{{ $ts.closeAccount }}</FormButton>
|
||||||
</FormBase>
|
</FormBase>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -35,6 +37,7 @@ import FormButton from '@/components/form/button.vue';
|
||||||
import * as os from '@/os';
|
import * as os from '@/os';
|
||||||
import { debug } from '@/config';
|
import { debug } from '@/config';
|
||||||
import { defaultStore } from '@/store';
|
import { defaultStore } from '@/store';
|
||||||
|
import { signout } from '@/account';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
components: {
|
components: {
|
||||||
|
@ -83,6 +86,22 @@ export default defineComponent({
|
||||||
taskmanager() {
|
taskmanager() {
|
||||||
os.popup(import('@/components/taskmanager.vue'), {
|
os.popup(import('@/components/taskmanager.vue'), {
|
||||||
}, {}, 'closed');
|
}, {}, '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();
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue