diff --git a/pages/editor/editor.pixy b/pages/editor/editor.pixy index 72bac9ba..3372cf10 100644 --- a/pages/editor/editor.pixy +++ b/pages/editor/editor.pixy @@ -31,12 +31,25 @@ component EditorTabs(url string, user *arn.User) if strings.Contains(url, "/editor/anime/") .tabs 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("Images", "image", "/editor/anime/image/lowres" + user.Settings().Editor.Filter.Suffix()) - Tab("Start date", "calendar", "/editor/anime/startdate" + user.Settings().Editor.Filter.Suffix()) + Tab("Companies", "building", "/editor/anime/companies/studios" + user.Settings().Editor.Filter.Suffix()) + Tab("Details", "search-plus", "/editor/anime/details/genres" + user.Settings().Editor.Filter.Suffix()) Tab("TBA", "question-circle", "/editor/anime/tba" + user.Settings().Editor.Filter.Suffix()) + if strings.Contains(url, "/editor/anime/details") + .tabs + Tab("Genres", "clone", "/editor/anime/details/genres" + user.Settings().Editor.Filter.Suffix()) + Tab("Synopsis", "align-left", "/editor/anime/details/synopsis" + user.Settings().Editor.Filter.Suffix()) + Tab("Start date", "calendar", "/editor/anime/details/startdate" + user.Settings().Editor.Filter.Suffix()) + Tab("Ep. Length", "clock-o", "/editor/anime/details/episodelength" + user.Settings().Editor.Filter.Suffix()) + Tab("Source", "book", "/editor/anime/details/source" + user.Settings().Editor.Filter.Suffix()) + + if strings.Contains(url, "/editor/anime/companies") + .tabs + Tab("Studios", "building", "/editor/anime/companies/studios" + user.Settings().Editor.Filter.Suffix()) + Tab("Producers", "building", "/editor/anime/companies/producers" + user.Settings().Editor.Filter.Suffix()) + Tab("Licensors", "building", "/editor/anime/companies/licensors" + user.Settings().Editor.Filter.Suffix()) + if strings.Contains(url, "/editor/anime/mapping/") .tabs Tab("MAL", "arrows-h", "/editor/anime/mapping/mal" + user.Settings().Editor.Filter.Suffix()) diff --git a/pages/editor/filteranime/episodelength.go b/pages/editor/filteranime/episodelength.go new file mode 100644 index 00000000..a0cad5cc --- /dev/null +++ b/pages/editor/filteranime/episodelength.go @@ -0,0 +1,18 @@ +package filteranime + +import ( + "github.com/aerogo/aero" + "github.com/animenotifier/arn" +) + +// EpisodeLength ... +func EpisodeLength(ctx *aero.Context) string { + return editorList( + ctx, + "Anime without an episode length", + func(anime *arn.Anime) bool { + return anime.EpisodeLength == 0 + }, + nil, + ) +} diff --git a/pages/editor/filteranime/licensors.go b/pages/editor/filteranime/licensors.go new file mode 100644 index 00000000..8e56b9e1 --- /dev/null +++ b/pages/editor/filteranime/licensors.go @@ -0,0 +1,18 @@ +package filteranime + +import ( + "github.com/aerogo/aero" + "github.com/animenotifier/arn" +) + +// Licensors ... +func Licensors(ctx *aero.Context) string { + return editorList( + ctx, + "Anime without licensors", + func(anime *arn.Anime) bool { + return len(anime.LicensorIDs) == 0 + }, + nil, + ) +} diff --git a/pages/editor/filteranime/producers.go b/pages/editor/filteranime/producers.go new file mode 100644 index 00000000..3ab3b6c5 --- /dev/null +++ b/pages/editor/filteranime/producers.go @@ -0,0 +1,18 @@ +package filteranime + +import ( + "github.com/aerogo/aero" + "github.com/animenotifier/arn" +) + +// Producers ... +func Producers(ctx *aero.Context) string { + return editorList( + ctx, + "Anime without producers", + func(anime *arn.Anime) bool { + return len(anime.ProducerIDs) == 0 + }, + nil, + ) +} diff --git a/pages/editor/filteranime/source.go b/pages/editor/filteranime/source.go new file mode 100644 index 00000000..53426587 --- /dev/null +++ b/pages/editor/filteranime/source.go @@ -0,0 +1,18 @@ +package filteranime + +import ( + "github.com/aerogo/aero" + "github.com/animenotifier/arn" +) + +// Source ... +func Source(ctx *aero.Context) string { + return editorList( + ctx, + "Anime without a source", + func(anime *arn.Anime) bool { + return anime.Source == "" + }, + nil, + ) +} diff --git a/pages/editor/filteranime/studios.go b/pages/editor/filteranime/studios.go new file mode 100644 index 00000000..8db7f3d5 --- /dev/null +++ b/pages/editor/filteranime/studios.go @@ -0,0 +1,18 @@ +package filteranime + +import ( + "github.com/aerogo/aero" + "github.com/animenotifier/arn" +) + +// Studios ... +func Studios(ctx *aero.Context) string { + return editorList( + ctx, + "Anime without studios", + func(anime *arn.Anime) bool { + return len(anime.StudioIDs) == 0 + }, + nil, + ) +} diff --git a/pages/index.go b/pages/index.go index fcf11de3..d398c2cb 100644 --- a/pages/index.go +++ b/pages/index.go @@ -254,17 +254,26 @@ func Configure(app *aero.Application) { } // Editor - Anime - editorFilterable("/editor/anime/synopsis", filteranime.Synopsis) - editorFilterable("/editor/anime/genres", filteranime.Genres) - editorFilterable("/editor/anime/startdate", filteranime.StartDate) - editorFilterable("/editor/anime/tba", filteranime.TBA) editorFilterable("/editor/anime/mapping/shoboi", filteranime.Shoboi) editorFilterable("/editor/anime/mapping/anilist", filteranime.AniList) editorFilterable("/editor/anime/mapping/mal", filteranime.MAL) editorFilterable("/editor/anime/mapping/duplicate", filteranime.DuplicateMappings) + editorFilterable("/editor/anime/image/lowres", filteranime.LowResolutionAnimeImages) editorFilterable("/editor/anime/image/ultralowres", filteranime.UltraLowResolutionAnimeImages) + editorFilterable("/editor/anime/companies/studios", filteranime.Studios) + editorFilterable("/editor/anime/companies/producers", filteranime.Producers) + editorFilterable("/editor/anime/companies/licensors", filteranime.Licensors) + + editorFilterable("/editor/anime/details/synopsis", filteranime.Synopsis) + editorFilterable("/editor/anime/details/genres", filteranime.Genres) + editorFilterable("/editor/anime/details/startdate", filteranime.StartDate) + editorFilterable("/editor/anime/details/episodelength", filteranime.EpisodeLength) + editorFilterable("/editor/anime/details/source", filteranime.Source) + + editorFilterable("/editor/anime/tba", filteranime.TBA) + // Editor - MALdiff editorFilterable("/editor/mal/diff/anime", editor.CompareMAL)