Return source mailbox partial for HTMX
This commit is contained in:
parent
b1f3deca1d
commit
737343b66b
1 changed files with 5 additions and 0 deletions
|
|
@ -301,6 +301,11 @@ func emailBoxHandler(w http.ResponseWriter, r *http.Request) {
|
|||
kind := strings.TrimPrefix(r.URL.Path, "/boxes/")
|
||||
switch kind {
|
||||
case "source":
|
||||
if r.Header.Get("HX-Request") == "true" {
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
fmt.Fprint(w, renderEmailBoxSourcePane(accounts, r.URL.Query().Get("source")))
|
||||
return
|
||||
}
|
||||
renderSourceEmailBoxPage(w, r, accounts, r.URL.Query().Get("source"))
|
||||
case "target":
|
||||
renderTargetEmailBoxPage(w, r, accounts)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue