feat: hide watchlist button in continue watching cards
This commit is contained in:
@@ -24,6 +24,7 @@ type AnimeCardProps struct {
|
||||
TitleJapanese string
|
||||
Airing bool
|
||||
WatchlistStatus string // empty if not in watchlist
|
||||
DisableWatchlist bool // if true, don't render the watchlist button
|
||||
}
|
||||
|
||||
templ AnimeCard(props AnimeCardProps) {
|
||||
@@ -91,7 +92,7 @@ templ animeCardPoster(props AnimeCardProps) {
|
||||
</svg>
|
||||
</a>
|
||||
}
|
||||
if !props.CurrentNode {
|
||||
if !props.CurrentNode && !props.DisableWatchlist {
|
||||
@watchlist.CardButton(
|
||||
props.ID,
|
||||
props.Title,
|
||||
|
||||
@@ -30,6 +30,7 @@ templ ContinueWatching(entries []db.GetContinueWatchingEntriesRow) {
|
||||
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,
|
||||
}) {
|
||||
|
||||
Reference in New Issue
Block a user