Skip to content

Commit

Permalink
Don't allow deleting processing message
Browse files Browse the repository at this point in the history
  • Loading branch information
stnguyen90 committed Feb 7, 2024
1 parent 5d35185 commit 79886b4
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { BoxAvatar, CardGrid, Heading } from '$lib/components';
import { Button } from '$lib/elements/forms';
import { toLocaleDateTime } from '$lib/helpers/date';
import { MessageType } from '@appwrite.io/console';
import DeleteModal from './deleteModal.svelte';
import { message } from './store';
Expand Down Expand Up @@ -31,7 +32,11 @@
</svelte:fragment>

<svelte:fragment slot="actions">
<Button secondary on:click={() => (showDelete = true)} event="delete_file">Delete</Button>
<Button
disabled={$message.status === MessageType.Processing}
secondary
on:click={() => (showDelete = true)}
event="delete_file">Delete</Button>
</svelte:fragment>
</CardGrid>

Expand Down

0 comments on commit 79886b4

Please sign in to comment.