appview: settings: fix delete email spinners #206

merged
opened by ptr.pet targeting master from ptr.pet/core: master

delete email spinners were using emails in the selectors which caused the selectors to be invalid, this fixes that by using the index instead of the emails themselves

Changed files
+2 -2
appview
pages
templates
+2 -2
appview/pages/templates/settings.html
···
<form
hx-delete="/settings/emails"
hx-confirm="Are you sure you wish to delete the email '{{ .Address }}'?"
-
hx-indicator="#delete-email-{{ .Address }}-spinner"
+
hx-indicator="#delete-email-{{ $index }}-spinner"
>
<input type="hidden" name="email" value="{{ .Address }}">
<button
···
>
{{ i "trash-2" "w-5 h-5" }}
<span class="hidden md:inline">delete</span>
-
<span id="delete-email-{{ .Address }}-spinner" class="group">
+
<span id="delete-email-{{ $index }}-spinner" class="group">
{{ i "loader-circle" "w-4 h-4 animate-spin hidden group-[.htmx-request]:inline" }}
</span>
</button>