Add htmx spinner to refresh-chat-room button

This commit is contained in:
Alessio 2024-12-09 13:44:11 -08:00
parent 72edf20890
commit 9d95fcbe57

View File

@ -166,7 +166,7 @@
<a class="button" hx-post="/messages/{{ $room.ID }}/mark-as-read" title="Mark as read">
<img class="svg-icon" src="/static/icons/eye.svg" width="24" height="24" />
</a>
<a class="button" hx-post="/messages/{{ $room.ID }}?scrape" hx-target="#chat-view" hx-swap="outerHTML" title="Refresh">
<a class="button" hx-post="/messages/{{ $room.ID }}?scrape" hx-target="#chat-view" hx-swap="outerHTML" title="Refresh" hx-indicator=".chat-messages">
<img class="svg-icon" src="/static/icons/refresh.svg" width="24" height="24" />
</a>
</div>
@ -177,6 +177,10 @@
{{template "conversation-top" .}}
{{template "messages-with-poller" .}}
{{end}}
<div class="htmx-spinner">
<div class="htmx-spinner__background"></div>
<img class="svg-icon htmx-spinner__icon" src="/static/icons/spinner.svg" />
</div>
</div>
{{if .ActiveRoomID}}
<div class="dm-composer">