fix: resolve templ compile errors
This commit is contained in:
@@ -2,8 +2,9 @@ package templates
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"mal/internal/db"
|
||||
"mal/web/components"
|
||||
db "mal/internal/db"
|
||||
ui "mal/web/components"
|
||||
"mal/web/shared"
|
||||
"mal/web/shared/layout"
|
||||
)
|
||||
|
||||
@@ -34,11 +35,11 @@ templ ContinueWatching(entries []db.GetContinueWatchingEntriesRow) {
|
||||
if entry.CurrentEpisode.Valid && entry.CurrentEpisode.Int64 > 0 {
|
||||
<span class="text-xs text-(--text-faint)">Continue ep { fmt.Sprintf("%d", entry.CurrentEpisode.Int64) }</span>
|
||||
}
|
||||
if entry.CurrentTimeSeconds > 0 {
|
||||
<span class="text-xs text-(--text-faint)">{ formatProgressTime(entry.CurrentTimeSeconds) }</span>
|
||||
}
|
||||
</div>
|
||||
if entry.CurrentTimeSeconds > 0 {
|
||||
<span class="text-xs text-(--text-faint)">{ shared.FormatProgressTime(entry.CurrentTimeSeconds) }</span>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<button
|
||||
class="absolute right-2 top-2 h-6 w-6 cursor-pointer border-0 bg-(--overlay-subtle) text-(--text-muted) opacity-0 transition-opacity duration-150 group-hover:opacity-100 hover:text-(--danger)"
|
||||
|
||||
@@ -3,8 +3,8 @@ package templates
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"mal/internal/db"
|
||||
"mal/web/components"
|
||||
db "mal/internal/db"
|
||||
components "mal/web/components"
|
||||
"mal/web/components/watchlist"
|
||||
"mal/web/shared"
|
||||
"mal/web/shared/layout"
|
||||
@@ -140,7 +140,7 @@ templ Watchlist(
|
||||
id={ fmt.Sprintf("watchlist-entry-%d", entry.AnimeID) }
|
||||
>
|
||||
<a
|
||||
href={ templ.URL(shared.AnimeURL(entry.AnimeID)) }
|
||||
href={ templ.URL(shared.AnimeURL(int(entry.AnimeID))) }
|
||||
class="flex flex-col bg-transparent text-inherit no-underline"
|
||||
>
|
||||
<div class="flex w-full aspect-2/3 justify-center overflow-hidden">
|
||||
@@ -185,7 +185,7 @@ templ Watchlist(
|
||||
id={ fmt.Sprintf("watchlist-entry-%d", entry.AnimeID) }
|
||||
>
|
||||
<td class="p-2.5">
|
||||
<a href={ templ.URL(shared.AnimeURL(entry.AnimeID)) }>
|
||||
<a href={ templ.URL(shared.AnimeURL(int(entry.AnimeID))) }>
|
||||
<img
|
||||
src={ entry.ImageUrl }
|
||||
alt={ entry.DisplayTitle() }
|
||||
@@ -195,7 +195,7 @@ templ Watchlist(
|
||||
</a>
|
||||
</td>
|
||||
<td class="p-2.5 font-medium">
|
||||
<a href={ templ.URL(shared.AnimeURL(entry.AnimeID)) }>
|
||||
<a href={ templ.URL(shared.AnimeURL(int(entry.AnimeID))) }>
|
||||
{ entry.DisplayTitle() }
|
||||
</a>
|
||||
@watchlist.Progress(entry)
|
||||
|
||||
Reference in New Issue
Block a user