{#each [ { label:'Total Personalities', value: data.stats.total, color:'var(--amber)' }, { label:'Published Today', value: data.stats.today, color:'var(--green)' }, { label:'Open Reports', value: data.stats.openReports, color: data.stats.openReports > 0 ? 'var(--red)' : 'var(--text2)' }, { label:'Unread Messages', value: data.stats.unreadMessages, color: data.stats.unreadMessages > 0 ? 'var(--cyan)' : 'var(--text2)' }, { label:'Soft Deleted', value: data.stats.deleted, color:'var(--text3)' }, ] as stat}
{stat.label}
{stat.value}
{/each}
Messages {#if data.stats.unreadMessages > 0} {data.stats.unreadMessages} unread {/if}
{#each [['unread','Unread'],['all','All']] as [val, label]} {/each} {#if data.stats.unreadMessages > 0} {/if}
{#if data.messages.length === 0}
No messages in this view.
{:else} {#each data.messages as msg}
{#if !msg.read} {/if} {msg.subject} {msg.name || 'Anonymous'} {#if msg.email} {msg.email} {/if}
{msg.message}
{formatTime(msg.created_at)}
{#if !msg.read} {/if}
{/each} {/if}
Reports {#if data.stats.openReports > 0} {data.stats.openReports} open {/if}
{#each [['open','Open'],['dismissed','Dismissed'],['all','All']] as [val, label]} {/each}
{#if data.reports.length === 0}
No reports in this view.
{:else} {#each data.reports as report}
{report.personality_name ?? report.personality_id} {#if report.manufacturer} {report.manufacturer} {/if} {#if report.deleted_at} DELETED {/if}
{reasonLabels[report.reason] ?? report.reason}
{#if report.notes}
"{report.notes}"
{/if}
Reported {formatTime(report.created_at)} {#if report.resolved === 1} · Dismissed {:else if report.resolved === 2} · Removed {/if}
{#if report.resolved === 0}
{#if !report.deleted_at} {/if}
{/if}
{/each} {/if}
All Personalities {data.totalPersonalities} total
{#each ['Fixture','Manufacturer','Ch','By','Published','Status',''] as h} {/each} {#each data.personalities as p} { if (editingId !== p.id) e.currentTarget.style.background='var(--raised)'; }} on:mouseleave={(e) => { if (editingId !== p.id) e.currentTarget.style.background=''; }}> {#if editingId === p.id} {/if} {/each}
{h}
{p.name} {#if p.prs_name && p.prs_name !== p.name}
PRS: {p.prs_name}
{/if}
{p.manufacturer || '—'} {p.channel_count} {p.creator_handle || '—'} {formatDate(p.created_at)} {#if p.deleted_at} Deleted {formatDate(p.deleted_at)} {:else} Live {/if}
{#if !p.deleted_at} {#if editingId === p.id} {:else} {/if} {/if}
Editing: {p.name}
{#if editError} {editError} {/if}
Replace Binary (.prs file)
{#if replaceId !== p.id || !replacePreview}
Current: {p.channel_count}ch · PRS name: {p.prs_name || '(none)'}
{/if} {#if replaceId === p.id && replacePreview}
Change Summary
Field Current Incoming PRS Name {replacePreview.current.prs_name || '—'} {replacePreview.incoming.prs_name || '—'} {#if replacePreview.incoming.prs_name !== replacePreview.current.prs_name} ← changed {/if} Channels {replacePreview.current.channel_count} {replacePreview.incoming.channel_count} {#if replacePreview.incoming.channel_count !== replacePreview.current.channel_count} ← changed {/if}
{#if replaceError} {replaceError} {/if}
{/if} {#if replaceError && !replacePreview}
{replaceError}
{/if}
{#if data.totalPages > 1}
{#each Array.from({length: data.totalPages}, (_, i) => i+1) as p} {/each}