Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't do a full page load when clicking the follow button (go-gitea#2…
…8872) - Use htmx to perform the button request - `hx-headers='{"x-csrf-token": "{{.CsrfToken}}"}'` to authenticate (we should probably learn to reuse this) - `hx-post="{{.ContextUser.HomeLink}}?action=follow"` to send a POST request to follow the user - `hx-target="#profile-avatar-card"` to target the card div for replacement - `hx-swap="outerHTML"` to replace the card (as opposed to its inner content) with the new card that shows the new follower count and button color - Change the backend response to return a `<div>` tag (the card) instead of a redirect to the user page # Before  # After  Signed-off-by: Yarden Shoham <git@yardenshoham.com>
- Loading branch information