added player stats to profile

This commit is contained in:
2026-03-06 20:48:21 +11:00
parent 71181c43e9
commit e99f10d0f4
10 changed files with 817 additions and 78 deletions

View File

@@ -7,8 +7,6 @@ templ SlapIDSection(player *db.Player, isOwner bool) {
<div id="slap-id-section">
if player.SlapID == nil && isOwner {
@slapIDLinkPrompt(player)
} else if player.SlapID != nil {
@slapIDLinked(player)
}
</div>
}
@@ -52,26 +50,3 @@ templ slapIDLinkPrompt(player *db.Player) {
</div>
</div>
}
templ slapIDLinked(player *db.Player) {
<div class="bg-green/10 border border-green/30 rounded-lg p-4">
<div class="flex items-center gap-3">
<svg class="w-5 h-5 text-green shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M5 13l4 4L19 7"
></path>
</svg>
<span class="text-text">
Slapshot ID linked:
<span class="font-mono text-subtext0">
if player.SlapID != nil {
{ fmt.Sprintf("%d", *player.SlapID) }
}
</span>
</span>
</div>
</div>
}