fix: resolve user avatar template error
This commit is contained in:
@@ -41,10 +41,10 @@
|
|||||||
<ui-dropdown class="relative block">
|
<ui-dropdown class="relative block">
|
||||||
<div data-trigger class="cursor-pointer">
|
<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">
|
<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
|
<img
|
||||||
src="{{.User.AvatarURL}}"
|
src="{{.AvatarURL}}"
|
||||||
alt="{{.User.Username}}"
|
alt="{{.Username}}"
|
||||||
class="h-8 w-8 rounded-full object-cover"
|
class="h-8 w-8 rounded-full object-cover"
|
||||||
/>
|
/>
|
||||||
{{else}}
|
{{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 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">
|
<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">
|
<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">
|
<div class="flex w-full items-center justify-between text-left">
|
||||||
<span class="font-medium text-[15px] text-red-500">Log out</span>
|
<span class="font-medium text-[15px] text-red-500">Log out</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user