diff --git a/web/src/lib/components/reaction/Reaction.svelte b/web/src/lib/components/reaction/Reaction.svelte index 567e0ae6b..560c77731 100644 --- a/web/src/lib/components/reaction/Reaction.svelte +++ b/web/src/lib/components/reaction/Reaction.svelte @@ -1,6 +1,7 @@ -{#if ontoggle} - -{:else} - - {reaction.kind} - {formatCount(reaction.count)} - -{/if} + diff --git a/web/src/lib/components/reaction/ReactionPicker.svelte b/web/src/lib/components/reaction/ReactionPicker.svelte index 49d4c866f..c7c873624 100644 --- a/web/src/lib/components/reaction/ReactionPicker.svelte +++ b/web/src/lib/components/reaction/ReactionPicker.svelte @@ -7,6 +7,7 @@ import type { ReactionRecord } from "$lib/api/reaction"; import Button from "$lib/components/ui/Button.svelte"; import { ORDERED_REACTION_KINDS, type ReactionKind } from "$lib/components/reaction/reactions"; + import Dropdown from "../ui/Dropdown.svelte"; interface Props { subjectUri: string; @@ -53,23 +54,11 @@ }; - + + {#snippet trigger()} + + {/snippet} -
{#each ORDERED_REACTION_KINDS as kind (kind)}
-
+
diff --git a/web/src/lib/components/repo/tickets/Ticket.svelte b/web/src/lib/components/repo/tickets/Ticket.svelte index e3ee90aed..036b129ff 100644 --- a/web/src/lib/components/repo/tickets/Ticket.svelte +++ b/web/src/lib/components/repo/tickets/Ticket.svelte @@ -61,6 +61,11 @@ const reporting = createReporting(); const isAuthor = $derived(auth.currentDid === ticket.author.did); const isPull = $derived(ticket.targetBranch !== undefined); + const showActionRow = $derived( + reactions.length > 0 || + (reactionsAlwaysShow && auth.currentUser !== null) || + reporting.canReport(ticket.author.did) + ); let editing = $state(false); @@ -85,7 +90,7 @@ oncancel={() => (editing = false)} /> {:else} -
+

@@ -126,27 +131,33 @@ {extraInfo} />

-
+
-
- - {#if reporting.canReport(ticket.author.did)} - - - - {/if} -
+ {#if showActionRow} +
+ + {#if reporting.canReport(ticket.author.did)} + + + + {/if} +
+ {/if}