Skip to content

Commit aef0026

Browse files
AaronPlavedandelany
authored andcommitted
Make delete button for permanent confirm modal actions red (#1907)
* Make delete button for permanent confirm modal actions red * tweak delete confirmation modal --------- Co-authored-by: Dan Delany <daniel.t.delany@jpl.nasa.gov>
1 parent 02fd6ab commit aef0026

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

src/components/modals/ConfirmModal.svelte

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,19 @@
3838
<ModalContent>
3939
<span>{message}</span>
4040
{#if !actionCanBeUndone}
41-
<i>This action cannot be undone.</i>
41+
<strong>This action cannot be undone.</strong>
4242
{/if}
4343
</ModalContent>
4444
<ModalFooter>
4545
<button class="st-button secondary" on:click={() => dispatch('close')}>
4646
{cancelText}
4747
</button>
48-
<button class="st-button" on:click={() => dispatch('confirm')}>
48+
<button
49+
class="st-button {!actionCanBeUndone
50+
? 'bg-destructive text-destructive-foreground hover:!bg-destructive/90'
51+
: ''}"
52+
on:click={() => dispatch('confirm')}
53+
>
4954
{confirmText}
5055
</button>
5156
</ModalFooter>

src/utilities/effects.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4116,9 +4116,9 @@ const effects = {
41164116
}
41174117

41184118
const { confirm } = await showConfirmModal(
4119-
'Delete',
4120-
`This will permanently delete the selected ${typeDisplayString.toLowerCase()} from the workspace: ${workspace.name}`,
4121-
'Delete Permanently',
4119+
`Permanently Delete ${typeDisplayString}`,
4120+
`This will permanently delete the selected ${typeDisplayString.toLowerCase()} from the "${workspace.name}" workspace.`,
4121+
`Permanently Delete`,
41224122
);
41234123

41244124
let responses: BulkOperationResponses = [];

0 commit comments

Comments
 (0)