From d0569d5fde27f2cd2cbb6c58d3d84488c89b8e37 Mon Sep 17 00:00:00 2001 From: mkelvers Date: Mon, 20 Apr 2026 16:02:51 +0200 Subject: [PATCH] feat(components): extract watchlist dropdown component --- web/components/watchlist/dropdown.templ | 63 +++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 web/components/watchlist/dropdown.templ diff --git a/web/components/watchlist/dropdown.templ b/web/components/watchlist/dropdown.templ new file mode 100644 index 0000000..78b97d1 --- /dev/null +++ b/web/components/watchlist/dropdown.templ @@ -0,0 +1,63 @@ +package watchlist + +import "fmt" + +templ WatchlistDropdown(animeID int, animeTitle string, animeTitleEnglish string, animeTitleJapanese string, animeImage string, currentStatus string, airing bool) { +
+ + +
+} + +templ StatusOption(animeID int, animeTitle string, animeTitleEnglish string, animeTitleJapanese string, animeImage string, status string, currentStatus string, airing bool) { + +} + +func formatStatus(status string) string { + switch status { + case "watching": + return "Watching" + case "completed": + return "Completed" + case "on_hold": + return "On hold" + case "dropped": + return "Dropped" + case "plan_to_watch": + return "Plan to watch" + default: + return status + } +}