forgejo/routers/web/user
Gusted 14d9c386fd
[UI] Fix HTMX support for profile card
- There were two issues with the profile card since the introduction of
HTMX in 3e8414179c. If an HTMX request
resulted in a flash message, it wasn't being shown and HTMX was
replacing all the HTML content instead of morphing it into the existing
DOM which caused event listeners to be lost for buttons.
- Flash messages are now properly being shown by using `hx-swap-oob`
and sending the alerts on a HTMX request, this does mean it requires
server-side changes in order to support HTMX requests like this, but
it's luckily not a big change either.
- Morphing is now enabled for the profile card by setting
`hx-swap="morph"`, and weirdly, the morphing library was already
installed and included as a dependency. This solves the issue of buttons
losing their event listeners.
- This patch also adds HTMX support to the modals feature, which means
that the blocking feature on the profile card now takes advantage of
HTMX.
- Added a E2E test.
2024-07-17 01:41:32 +02:00
..
setting Clean up log messages (#30313) 2024-04-15 20:01:35 +02:00
avatar.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
code.go Unify search boxes (#29530) 2024-03-20 12:31:05 +00:00
home.go [CHORE] Use github.com/ProtonMail/go-crypto 2024-07-15 17:27:37 +02:00
home_test.go add label filters in org/{org_name}/issues 2024-04-04 17:57:11 +05:30
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
notification.go Refactor StringsToInt64s (#29967) 2024-03-26 19:04:26 +01:00
package.go Fix incorrect relative/absolute URL usages (#29531) 2024-03-06 12:10:46 +08:00
profile.go [UI] Fix HTMX support for profile card 2024-07-17 01:41:32 +02:00
search.go migrate some more "OptionalBool" to "Option[bool]" (#29479) 2024-03-06 12:10:44 +08:00
stop_watch.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00
task.go Move context from modules to services (#29440) 2024-03-06 12:10:43 +08:00