Added number of list items for status tabs

This commit is contained in:
2019-10-26 18:06:14 +09:00
parent af63870850
commit 384f966524
6 changed files with 35 additions and 42 deletions

View File

@ -1,7 +1,7 @@
component StatusTabs(urlPrefix string)
component StatusTabs(urlPrefix string, statusLists map[string]*arn.AnimeList)
.tabs
Tab("Watching", "play", urlPrefix + "/watching")
Tab("Completed", "check", urlPrefix + "/completed")
Tab("Planned", "forward", urlPrefix + "/planned")
Tab("On Hold", "pause", urlPrefix + "/hold")
Tab("Dropped", "stop", urlPrefix + "/dropped")
TabWithCount("Watching", len(statusLists[arn.AnimeListStatusWatching].Items), "play", urlPrefix + "/watching")
TabWithCount("Completed", len(statusLists[arn.AnimeListStatusCompleted].Items), "check", urlPrefix + "/completed")
TabWithCount("Planned", len(statusLists[arn.AnimeListStatusPlanned].Items), "forward", urlPrefix + "/planned")
TabWithCount("On Hold", len(statusLists[arn.AnimeListStatusHold].Items), "pause", urlPrefix + "/hold")
TabWithCount("Dropped", len(statusLists[arn.AnimeListStatusDropped].Items), "stop", urlPrefix + "/dropped")