mirror of
https://github.com/open-webui/open-webui
synced 2025-01-18 00:30:51 +00:00
enh: user delete confirmation
This commit is contained in:
parent
91cec11500
commit
2abb6788fe
@ -18,6 +18,7 @@
|
||||
import Tooltip from '$lib/components/common/Tooltip.svelte';
|
||||
import UserChatsModal from '$lib/components/admin/UserChatsModal.svelte';
|
||||
import AddUserModal from '$lib/components/admin/AddUserModal.svelte';
|
||||
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
|
||||
@ -30,6 +31,7 @@
|
||||
|
||||
let page = 1;
|
||||
|
||||
let showDeleteConfirmDialog = false;
|
||||
let showAddUserModal = false;
|
||||
|
||||
let showUserChatsModal = false;
|
||||
@ -77,6 +79,13 @@
|
||||
});
|
||||
</script>
|
||||
|
||||
<ConfirmDialog
|
||||
bind:show={showDeleteConfirmDialog}
|
||||
on:confirm={() => {
|
||||
deleteUserHandler(selectedUser.id);
|
||||
}}
|
||||
/>
|
||||
|
||||
{#key selectedUser}
|
||||
<EditUserModal
|
||||
bind:show={showEditUserModal}
|
||||
@ -256,7 +265,8 @@
|
||||
<button
|
||||
class="self-center w-fit text-sm px-2 py-2 hover:bg-black/5 dark:hover:bg-white/5 rounded-xl"
|
||||
on:click={async () => {
|
||||
deleteUserHandler(user.id);
|
||||
showDeleteConfirmDialog = true;
|
||||
selectedUser = user;
|
||||
}}
|
||||
>
|
||||
<svg
|
||||
|
Loading…
Reference in New Issue
Block a user