26 lines
1.0 KiB
Cheetah
26 lines
1.0 KiB
Cheetah
{{ component "layout" . }}
|
|
{{ component "layout_user" . }}
|
|
|
|
{{ component "block" (props .
|
|
"Icon" "user"
|
|
"Name" (printf "changing %s's avatar" .SelectedUser.Name)
|
|
) }}
|
|
<div class="flex flex-col gap-2 items-end">
|
|
{{ if ne (len .SelectedUser.Avatar) 0 }}
|
|
<img class="h-[8rem] w-[8rem] object-cover" src="data:image/jpg;base64,{{ .SelectedUser.Avatar | base64 }}" />
|
|
<form class="contents" action="{{ printf "/admin/delete_avatar_do?user=%s" .SelectedUser.Name | path }}" method="post">
|
|
<input type="submit" value="delete avatar">
|
|
</form>
|
|
{{ end }}
|
|
<form enctype="multipart/form-data" action="{{ printf "/admin/change_avatar_do?user=%s" .SelectedUser.Name | path }}" method="post">
|
|
<div class="relative pointer-events-auto">
|
|
<input class="auto-submit absolute opacity-0" name="avatar" type="file" accept="image/jpeg image/png image/gif" />
|
|
<input type="button" value="choose file">
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
{{ end }}
|