Advanced filters for editors
This commit is contained in:
@ -33,8 +33,9 @@ component EditorTabs(url string, user *arn.User)
|
||||
Tab("Mappings", "arrows-h", "/editor/anime/mapping/mal" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("Synopsis", "align-left", "/editor/anime/synopsis" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("Genres", "clone", "/editor/anime/genres" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("Start date", "calendar", "/editor/anime/startdate" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("Images", "image", "/editor/anime/image/lowres" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("Start date", "calendar", "/editor/anime/startdate" + user.Settings().Editor.Filter.Suffix())
|
||||
Tab("TBA", "question-circle", "/editor/anime/tba" + user.Settings().Editor.Filter.Suffix())
|
||||
|
||||
if strings.Contains(url, "/editor/anime/mapping/")
|
||||
.tabs
|
||||
|
@ -5,8 +5,6 @@ import (
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
const maxGenreEntries = 70
|
||||
|
||||
// Genres ...
|
||||
func Genres(ctx *aero.Context) string {
|
||||
return editorList(
|
||||
|
@ -5,8 +5,6 @@ import (
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
const maxImageEntries = 70
|
||||
|
||||
// LowResolutionAnimeImages filters anime with low resolution images.
|
||||
func LowResolutionAnimeImages(ctx *aero.Context) string {
|
||||
return filterAnimeImages(ctx, "Anime with low resolution images", arn.AnimeImageLargeWidth, arn.AnimeImageLargeHeight)
|
||||
|
@ -5,8 +5,6 @@ import (
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
const maxShoboiEntries = 70
|
||||
|
||||
// Shoboi ...
|
||||
func Shoboi(ctx *aero.Context) string {
|
||||
return editorList(
|
||||
|
20
pages/editor/filteranime/tba.go
Normal file
20
pages/editor/filteranime/tba.go
Normal file
@ -0,0 +1,20 @@
|
||||
package filteranime
|
||||
|
||||
import (
|
||||
"github.com/aerogo/aero"
|
||||
"github.com/animenotifier/arn"
|
||||
)
|
||||
|
||||
// TBA ...
|
||||
func TBA(ctx *aero.Context) string {
|
||||
return editorList(
|
||||
ctx,
|
||||
"Anime to be announced",
|
||||
func(anime *arn.Anime) bool {
|
||||
return anime.Status == "tba"
|
||||
},
|
||||
func(anime *arn.Anime) string {
|
||||
return "https://www.google.com/search?q=" + anime.Title.Canonical
|
||||
},
|
||||
)
|
||||
}
|
Reference in New Issue
Block a user