update ui and other frontend updates

This commit is contained in:
JCEEE
2026-07-29 09:41:52 +01:00
parent 04b83925e0
commit 57ef30d3a7
79 changed files with 7323 additions and 429 deletions
+37
View File
@@ -0,0 +1,37 @@
<script lang="ts">
let { data } = $props();
</script>
<h1>Super Admin</h1>
<div class="stats">
<div class="card"><strong>{data.totalFams}</strong> Families</div>
<div class="card"><strong>{data.totalMembers}</strong> Members</div>
<div class="card"><strong>{data.totalRewards}</strong> Rewards</div>
</div>
<h2>Families</h2>
<table>
<thead><tr><th>Name</th><th>Slug</th><th>Members</th><th>Rewards</th><th>Invite Code</th></tr></thead>
<tbody>
{#each data.fams as fam}
<tr>
<td><a href="/{fam.slug}/admin">{fam.name}</a></td>
<td>{fam.slug}</td>
<td>{fam.memberCount}</td>
<td>{fam.claimedRewards}/{fam.totalRewards}</td>
<td><code>{fam.inviteCode}</code></td>
</tr>
{/each}
</tbody>
</table>
<style>
.stats { display: flex; gap: 1rem; margin: 1rem 0; }
.card { padding: 1rem; background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; flex: 1; text-align: center; }
.card strong { font-size: 1.5rem; display: block; }
table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
th, td { padding: 0.5rem; border: 1px solid #e5e7eb; text-align: left; }
th { background: #f9fafb; font-weight: 600; }
code { background: #eee; padding: 0.1rem 0.3rem; border-radius: 3px; font-size: 0.85em; }
</style>