Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
fix: dialog now owning there own close states, cause mutiple to show at one time
Kyle Mendelld253fc5d7c08
diff --git a/frontend/src/lib/components/confirm-dialog/confirm-dialog.svelte b/frontend/src/lib/components/confirm-dialog/confirm-dialog.svelteindex ce23ce0f1..b678e66ea 100644--- a/frontend/src/lib/components/confirm-dialog/confirm-dialog.svelte+++ b/frontend/src/lib/components/confirm-dialog/confirm-dialog.svelte@@ -22,8 +22,10 @@});function handleConfirm() {- $confirmDialogStore.confirm.action(checkboxStates);+ const action = $confirmDialogStore.confirm.action;+ const states = $state.snapshot(checkboxStates);$confirmDialogStore.open = false;+ action(states);}</script>diff --git a/frontend/src/lib/components/confirm-dialog/store.ts b/frontend/src/lib/components/confirm-dialog/store.tsindex 771acdb87..1943fb874 100644--- a/frontend/src/lib/components/confirm-dialog/store.ts+++ b/frontend/src/lib/components/confirm-dialog/store.ts@@ -47,13 +47,14 @@ export function openConfirmDialog({initialState?: boolean;}>;}) {- confirmDialogStore.update((val) => ({+ confirmDialogStore.update(() => ({open: true,title,message,confirm: {- ...val.confirm,- ...confirm+ label: confirm.label ?? m.common_confirm(),+ destructive: confirm.destructive ?? false,+ action: confirm.action},checkboxes}));diff --git a/frontend/src/lib/components/ui/responsive-dialog/responsive-dialog.svelte b/frontend/src/lib/components/ui/responsive-dialog/responsive-dialog.svelteindex 21ff7310f..3df065883 100644--- a/frontend/src/lib/components/ui/responsive-dialog/responsive-dialog.svelte+++ b/frontend/src/lib/components/ui/responsive-dialog/responsive-dialog.svelte@@ -1,4 +1,6 @@<script lang="ts">+ // Close convention: the component that owns `open` must close it in the+ // success path. Dialogs delegate closing to their parent and never self-close on submit.import { MediaQuery } from 'svelte/reactivity';import * as Dialog from '$lib/components/ui/dialog/index.js';import * as Drawer from '$lib/components/ui/drawer/index.js';