Provide indicator when editing bookmarks

This commit is contained in:
2022-08-21 09:45:27 +09:30
parent 2d488ffdcc
commit 1904bfd265
2 changed files with 6 additions and 3 deletions

View File

@@ -30,7 +30,10 @@
</tr>
</table>
<p>
<button type="button" hx-confirm="Delete this bookmark permanently?" hx-delete="/edit/{{.bookmark.ID}}" class="alert button">delete</button>
<button type="button" class="button" hx-post="/edit/{{.bookmark.ID}}">save</button>
<button type="button" hx-confirm="Delete this bookmark permanently?" hx-delete="/edit/{{.bookmark.ID}}" class="alert button">Delete</button>
<button type="button" class="button" hx-indicator="#saving" hx-post="/edit/{{.bookmark.ID}}"> {{ if .saved }} Saved {{ else }} Save {{ end }}</button>
<span id="saving" class="htmx-indicator">
<img style="height:1em;" src="/assets/image/beating.gif" /> Saving...
</span>
</p>
</form>