diff --git a/internal/handlers/watchlist.go b/internal/handlers/watchlist.go index e329aae..cd1e56d 100644 --- a/internal/handlers/watchlist.go +++ b/internal/handlers/watchlist.go @@ -75,16 +75,6 @@ func (h *WatchlistHandler) HandleUpdateWatchlist(w http.ResponseWriter, r *http. return } - // For HTMX, we can just return a success toast or update a portion of the UI - displayStatus := status - switch status { - case "on_hold": - displayStatus = "on hold" - case "plan_to_watch": - displayStatus = "plan to watch" - } - - w.Header().Set("HX-Trigger", fmt.Sprintf(`{"toast": "added to %s"}`, displayStatus)) templates.WatchlistDropdown(int(animeID), animeTitle, animeImage, status).Render(r.Context(), w) } @@ -125,8 +115,6 @@ func (h *WatchlistHandler) HandleDeleteWatchlist(w http.ResponseWriter, r *http. return } - w.Header().Set("HX-Trigger", `{"toast": "removed from watchlist"}`) - // If called from watchlist page, just return empty (hx-swap="delete" handles removal) if r.URL.Query().Get("from") == "watchlist" { w.WriteHeader(http.StatusOK) @@ -286,7 +274,6 @@ func (h *WatchlistHandler) HandleImportWatchlist(w http.ResponseWriter, r *http. imported++ } - w.Header().Set("HX-Trigger", fmt.Sprintf(`{"toast": "imported %d entries"}`, imported)) w.Header().Set("HX-Redirect", "/watchlist") w.WriteHeader(http.StatusOK) } diff --git a/internal/templates/layout.templ b/internal/templates/layout.templ index ec62941..7355e9f 100644 --- a/internal/templates/layout.templ +++ b/internal/templates/layout.templ @@ -29,23 +29,6 @@ templ Layout(title string) {
{ children... }
-
- } \ No newline at end of file diff --git a/internal/templates/layout_templ.go b/internal/templates/layout_templ.go index d899910..a33529f 100644 --- a/internal/templates/layout_templ.go +++ b/internal/templates/layout_templ.go @@ -50,7 +50,7 @@ func Layout(title string) templ.Component { if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } - templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "
") + templ_7745c5c3_Err = templruntime.WriteString(templ_7745c5c3_Buffer, 3, "") if templ_7745c5c3_Err != nil { return templ_7745c5c3_Err } diff --git a/static/css/style.css b/static/css/style.css index 419f05d..9d48b51 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -714,27 +714,6 @@ a:hover { margin: 4px 0; } -/* Toast */ -#toast-container { - position: fixed; - bottom: 24px; - right: 24px; - z-index: 1000; - display: flex; - flex-direction: column; - gap: 8px; -} - -.toast { - background: var(--surface); - border: 1px solid var(--border); - color: var(--text); - padding: 12px 16px; - font-size: 13px; - opacity: 0; - transition: opacity 0.2s; -} - /* Responsive */ @media (max-width: 900px) { .anime-page {