diff --git a/packages/frontend/src/components/SkApprovalUser.vue b/packages/frontend/src/components/SkApprovalUser.vue index 332997ca6b..39987272c9 100644 --- a/packages/frontend/src/components/SkApprovalUser.vue +++ b/packages/frontend/src/components/SkApprovalUser.vue @@ -19,8 +19,8 @@
- {{ i18n.ts.approveAccount }} - {{ i18n.ts.denyAccount }} + {{ i18n.ts.approveAccount }} + {{ i18n.ts.denyAccount }}
@@ -54,7 +54,7 @@ const emits = defineEmits<{ (event: 'deleted', value: string): void; }>(); -async function deleteAccount(user) { +async function deleteAccount() { const confirm = await os.confirm({ type: 'warning', text: i18n.ts.deleteAccountConfirm, @@ -62,15 +62,15 @@ async function deleteAccount(user) { if (confirm.canceled) return; const typed = await os.inputText({ - text: i18n.t('typeToConfirm', { x: user?.username }), + text: i18n.t('typeToConfirm', { x: props.user.username }), }); if (typed.canceled) return; - if (typed.result === user?.username) { + if (typed.result === props.user.username) { await os.apiWithDialog('admin/delete-account', { - userId: user.id, + userId: props.user.id, }); - emits('deleted', user.id); + emits('deleted', props.user.id); } else { os.alert({ type: 'error', @@ -79,14 +79,14 @@ async function deleteAccount(user) { } } -async function approveAccount(user) { +async function approveAccount() { const confirm = await os.confirm({ type: 'warning', text: i18n.ts.approveConfirm, }); if (confirm.canceled) return; - await os.api('admin/approve-user', { userId: user.id }); - emits('deleted', user.id); + await os.api('admin/approve-user', { userId: props.user.id }); + emits('deleted', props.user.id); } @@ -111,4 +111,4 @@ async function approveAccount(user) { display: flex; gap: 8px; } - \ No newline at end of file +