Merge pull request #11423 from silentoplayz/confirmation-prompts

feat: add more confirmation prompts
This commit is contained in:
Timothy Jaeryang Baek
2025-03-09 07:40:36 -03:00
committed by GitHub
5 changed files with 64 additions and 6 deletions

View File

@@ -6,6 +6,7 @@
import SensitiveInput from '$lib/components/common/SensitiveInput.svelte';
import Cog6 from '$lib/components/icons/Cog6.svelte';
import AddConnectionModal from '$lib/components/AddConnectionModal.svelte';
import ConfirmDialog from '$lib/components/common/ConfirmDialog.svelte';
export let onDelete = () => {};
export let onSubmit = () => {};
@@ -17,6 +18,7 @@
export let config = {};
let showConfigModal = false;
let showDeleteConfirmDialog = false;
</script>
<AddConnectionModal
@@ -28,7 +30,9 @@
key,
config
}}
{onDelete}
onDelete={() => {
showDeleteConfirmDialog = true;
}}
onSubmit={(connection) => {
url = connection.url;
key = connection.key;
@@ -37,6 +41,14 @@
}}
/>
<ConfirmDialog
bind:show={showDeleteConfirmDialog}
on:confirm={() => {
onDelete();
showConfigModal = false;
}}
/>
<div class="flex w-full gap-2 items-center">
<Tooltip
className="w-full relative"