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