diff --git a/web/components/watchlist/progress.templ b/web/components/watchlist/progress.templ new file mode 100644 index 0000000..081470c --- /dev/null +++ b/web/components/watchlist/progress.templ @@ -0,0 +1,17 @@ +package watchlist + +import ( + "fmt" + "mal/internal/db" +) + +templ Progress(entry db.GetUserWatchListRow) { + if entry.CurrentEpisode.Valid && entry.CurrentEpisode.Int64 > 0 && entry.Status != "completed" { +

+ Continue ep { fmt.Sprintf("%d", entry.CurrentEpisode.Int64) } + if entry.CurrentTimeSeconds > 0 { + { fmt.Sprintf(" ยท %s", formatProgressTime(entry.CurrentTimeSeconds)) } + } +

+ } +}