feat: remove watching and on hold from watchlist statuses
This commit is contained in:
@@ -24,9 +24,7 @@ var (
|
||||
)
|
||||
|
||||
var validStatuses = map[string]struct{}{
|
||||
"watching": {},
|
||||
"completed": {},
|
||||
"on_hold": {},
|
||||
"dropped": {},
|
||||
"plan_to_watch": {},
|
||||
}
|
||||
|
||||
@@ -35,9 +35,7 @@ templ WatchlistDropdown(
|
||||
data-dropdown-open-classes="visible opacity-100"
|
||||
data-dropdown-closed-classes="invisible opacity-0"
|
||||
>
|
||||
@StatusOption(animeID, animeTitle, animeTitleEnglish, animeTitleJapanese, animeImage, "watching", currentStatus, airing)
|
||||
@StatusOption(animeID, animeTitle, animeTitleEnglish, animeTitleJapanese, animeImage, "completed", currentStatus, airing)
|
||||
@StatusOption(animeID, animeTitle, animeTitleEnglish, animeTitleJapanese, animeImage, "on_hold", currentStatus, airing)
|
||||
@StatusOption(animeID, animeTitle, animeTitleEnglish, animeTitleJapanese, animeImage, "dropped", currentStatus, airing)
|
||||
@StatusOption(animeID, animeTitle, animeTitleEnglish, animeTitleJapanese, animeImage, "plan_to_watch", currentStatus, airing)
|
||||
if currentStatus != "" {
|
||||
@@ -89,12 +87,8 @@ templ StatusOption(
|
||||
|
||||
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":
|
||||
|
||||
@@ -29,7 +29,6 @@ templ ContinueWatching(entries []db.GetContinueWatchingEntriesRow) {
|
||||
Href: continueWatchingURL(entry),
|
||||
TitleEnglish: nullString(entry.TitleEnglish),
|
||||
TitleJapanese: nullString(entry.TitleJapanese),
|
||||
WatchlistStatus: "watching",
|
||||
DisableWatchlist: true,
|
||||
Class: "notification-card min-w-0 flex flex-col bg-transparent text-inherit no-underline",
|
||||
HideTitle: true,
|
||||
|
||||
@@ -68,18 +68,6 @@ templ Watchlist(
|
||||
>
|
||||
All
|
||||
</a>
|
||||
<a
|
||||
href={ templ.URL(shared.WatchlistURL("watching", sortBy, sortOrder)) }
|
||||
class={ shared.TabClass(currentStatus == "watching") }
|
||||
>
|
||||
Watching
|
||||
</a>
|
||||
<a
|
||||
href={ templ.URL(shared.WatchlistURL("on_hold", sortBy, sortOrder)) }
|
||||
class={ shared.TabClass(currentStatus == "on_hold") }
|
||||
>
|
||||
On hold
|
||||
</a>
|
||||
<a
|
||||
href={ templ.URL(shared.WatchlistURL("plan_to_watch", sortBy, sortOrder)) }
|
||||
class={ shared.TabClass(currentStatus == "plan_to_watch") }
|
||||
|
||||
Reference in New Issue
Block a user