A focused Docker Compose management web application.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: add user deletion confirmation

Brooke 2c8d0be9 c1a70178

+5 -3
+1 -1
packages/panel/src/lib/component/LoaderButton.svelte
··· 42 42 43 43 <style lang="scss"> 44 44 button { 45 - display: flex; 45 + display: inline-flex; 46 46 align-items: center; 47 47 justify-content: center; 48 48 gap: 10px;
+4 -2
packages/panel/src/routes/(authenticated)/server/UserList.svelte
··· 4 4 import CopyBox from "$lib/component/CopyBox.svelte"; 5 5 import { api, isMobile, openDialog } from "$lib"; 6 6 import Fa from "svelte-fa"; 7 + import PromiseButton from "$lib/component/PromiseButton.svelte"; 7 8 8 9 type LuminaryUser = api.components["schemas"]["luminary.api.auth.LuminaryUser"]; 9 10 ··· 36 37 } 37 38 38 39 async function delete_user(uuid: string) { 40 + if (!confirm(`Are you sure you want to delete this user? This action is irreversible.`)) return; 39 41 await api.client.DELETE("/api/auth/users/{user}", { params: { path: { user: uuid } } }); 40 42 refresh(); 41 43 } ··· 88 90 {/if} 89 91 <td>{user.username}</td> 90 92 <td class="actions-col"> 91 - <button class="outline" onclick={() => delete_user(user.uuid)}> 93 + <PromiseButton fit style="outline" onclick={() => delete_user(user.uuid)}> 92 94 <Fa icon={faBan} /> Delete 93 - </button> 95 + </PromiseButton> 94 96 </td> 95 97 </tr> 96 98 {/each}