fix: resolve user avatar template error

This commit is contained in:
2026-05-07 13:56:30 +02:00
parent 734f5295c7
commit 30f45ece89

View File

@@ -41,10 +41,10 @@
<ui-dropdown class="relative block">
<div data-trigger class="cursor-pointer">
<button class="flex items-center gap-1 rounded-full p-1 transition-colors hover:bg-surface-hover focus:outline-none">
{{if .User}}
{{with .User}}
<img
src="{{.User.AvatarURL}}"
alt="{{.User.Username}}"
src="{{.AvatarURL}}"
alt="{{.Username}}"
class="h-8 w-8 rounded-full object-cover"
/>
{{else}}
@@ -58,7 +58,7 @@
<div data-content class="hidden absolute z-50 min-w-[320px] bg-background-button rounded-none shadow-2xl right-0 top-full mt-2">
<div class="flex flex-col py-1">
{{if .User}}
{{with .User}}
<a href="/logout" class="flex w-full items-center px-5 py-3.5 transition-colors focus:outline-none hover:bg-red-500/10 focus:bg-red-500/10">
<div class="flex w-full items-center justify-between text-left">
<span class="font-medium text-[15px] text-red-500">Log out</span>