From ed064b2193d2656644ac533bcd1ef9058a73feee Mon Sep 17 00:00:00 2001 From: Marie Date: Fri, 18 Oct 2024 01:09:46 +0200 Subject: [PATCH] upd: remove type username to confirm dialog resolves # 759 --- .../frontend/src/components/SkApprovalUser.vue | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) diff --git a/packages/frontend/src/components/SkApprovalUser.vue b/packages/frontend/src/components/SkApprovalUser.vue index a2dfc70c28..1ef0ac5b17 100644 --- a/packages/frontend/src/components/SkApprovalUser.vue +++ b/packages/frontend/src/components/SkApprovalUser.vue @@ -69,22 +69,10 @@ async function deleteAccount() { }); if (confirm.canceled) return; - const typed = await os.inputText({ - text: i18n.t('typeToConfirm', { x: props.user.username }), + await os.apiWithDialog('admin/decline-user', { + userId: props.user.id, }); - if (typed.canceled) return; - - if (typed.result === props.user.username) { - await os.apiWithDialog('admin/decline-user', { - userId: props.user.id, - }); - emits('deleted', props.user.id); - } else { - os.alert({ - type: 'error', - text: 'input not match', - }); - } + emits('deleted', props.user.id); } async function approveAccount() {