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