diff --git a/src/routes/admin/drops/[id]/+page.svelte b/src/routes/admin/drops/[id]/+page.svelte index 545aaea..4e5410b 100644 --- a/src/routes/admin/drops/[id]/+page.svelte +++ b/src/routes/admin/drops/[id]/+page.svelte @@ -147,6 +147,27 @@ let showPublishedSnapshot = $state(false); let downloadingSongs = $state>({}); + // Check if drop has been reviewed before + const hasBeenReviewed = $derived(() => { + if (!drop?.events) return false; + return drop.events.some( + (event: any) => event.type === 'action' && event.meta?.action === 'drop-review' + ); + }); + + // Determine if we should show the changes section + const shouldShowChanges = $derived(() => { + // Show for EDIT_UNDER_REVIEW with publishedSnapshot + if (drop?.type === 'EDIT_UNDER_REVIEW' && drop?.publishedSnapshot) { + return true; + } + // Show for drops that have been reviewed before + if (hasBeenReviewed()) { + return true; + } + return false; + }); + // Email templates const getTemplates = (): Record => ({ 'Copyright bad': [ @@ -275,8 +296,9 @@ ...(adminResponse.data as MergedAdminDrop), }; - // Auto-expand diff view for edit reviews - if (drop.type === 'EDIT_UNDER_REVIEW' && drop.publishedSnapshot) { + // Auto-expand changes view for reviewed drops + // This will be true for EDIT_UNDER_REVIEW or any drop that has been reviewed before + if (shouldShowChanges()) { showPublishedSnapshot = true; } @@ -827,8 +849,8 @@ {/if} - - {#if drop.type === 'EDIT_UNDER_REVIEW' && drop.publishedSnapshot} + + {#if shouldShowChanges()} {#if showPublishedSnapshot}
- + {#if drop.publishedSnapshot} + + {:else} +
+

This drop has been reviewed before, but no snapshot is available.

+

+ Change tracking is only available for published drops that are being edited. +

+
+ {/if}
{/if}