"git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "e475f025b74250213b71b4c4853bfeae66573890"
Commit 2abb6788 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

enh: user delete confirmation

parent 91cec115
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment