diff options
author | Wolfgang Müller | 2025-02-20 14:27:14 +0100 |
---|---|---|
committer | Wolfgang Müller | 2025-02-20 19:51:04 +0100 |
commit | c6bf35aea63969b90463d6e70cb02ed61e4e3270 (patch) | |
tree | 1e650689385e23b204754dd1bba156654f95612d /frontend/src | |
parent | 39ecba8f6c5a2bc3b4f0629aecac99560c270539 (diff) | |
download | hircine-c6bf35aea63969b90463d6e70cb02ed61e4e3270.tar.gz |
Add remaining association count sort options
Now that we have all association counts mapped to their respective
models we can easily allow sorting on them as well.
Diffstat (limited to 'frontend/src')
-rw-r--r-- | frontend/src/gql/graphql.ts | 13 | ||||
-rw-r--r-- | frontend/src/lib/Enums.ts | 11 |
2 files changed, 23 insertions, 1 deletions
diff --git a/frontend/src/gql/graphql.ts b/frontend/src/gql/graphql.ts index 63f2c55..ac8512a 100644 --- a/frontend/src/gql/graphql.ts +++ b/frontend/src/gql/graphql.ts @@ -140,6 +140,7 @@ export type ArtistFilterResult = { export type ArtistResponse = Artist | IdNotFoundError; export enum ArtistSort { + ComicCount = 'COMIC_COUNT', CreatedAt = 'CREATED_AT', Name = 'NAME', Random = 'RANDOM', @@ -226,6 +227,7 @@ export type CharacterFilterResult = { export type CharacterResponse = Character | IdNotFoundError; export enum CharacterSort { + ComicCount = 'COMIC_COUNT', CreatedAt = 'CREATED_AT', Name = 'NAME', Random = 'RANDOM', @@ -273,6 +275,7 @@ export type CircleFilterResult = { export type CircleResponse = Circle | IdNotFoundError; export enum CircleSort { + ComicCount = 'COMIC_COUNT', CreatedAt = 'CREATED_AT', Name = 'NAME', Random = 'RANDOM', @@ -355,6 +358,9 @@ export type ComicScraper = { }; export enum ComicSort { + ArtistCount = 'ARTIST_COUNT', + CharacterCount = 'CHARACTER_COUNT', + CircleCount = 'CIRCLE_COUNT', CreatedAt = 'CREATED_AT', Date = 'DATE', OriginalTitle = 'ORIGINAL_TITLE', @@ -362,7 +368,8 @@ export enum ComicSort { Random = 'RANDOM', TagCount = 'TAG_COUNT', Title = 'TITLE', - UpdatedAt = 'UPDATED_AT' + UpdatedAt = 'UPDATED_AT', + WorldCount = 'WORLD_COUNT' } export type ComicSortInput = { @@ -895,6 +902,7 @@ export enum NamespaceSort { Name = 'NAME', Random = 'RANDOM', SortName = 'SORT_NAME', + TagCount = 'TAG_COUNT', UpdatedAt = 'UPDATED_AT' } @@ -1196,8 +1204,10 @@ export type TagFilterResult = { export type TagResponse = FullTag | IdNotFoundError; export enum TagSort { + ComicCount = 'COMIC_COUNT', CreatedAt = 'CREATED_AT', Name = 'NAME', + NamespaceCount = 'NAMESPACE_COUNT', Random = 'RANDOM', UpdatedAt = 'UPDATED_AT' } @@ -1362,6 +1372,7 @@ export type WorldFilterResult = { export type WorldResponse = IdNotFoundError | World; export enum WorldSort { + ComicCount = 'COMIC_COUNT', CreatedAt = 'CREATED_AT', Name = 'NAME', Random = 'RANDOM', diff --git a/frontend/src/lib/Enums.ts b/frontend/src/lib/Enums.ts index 5133d49..292ed7d 100644 --- a/frontend/src/lib/Enums.ts +++ b/frontend/src/lib/Enums.ts @@ -73,6 +73,10 @@ export const ComicSortLabel: Record<ComicSort, string> = { [ComicSort.CreatedAt]: 'Created At', [ComicSort.UpdatedAt]: 'Updated At', [ComicSort.TagCount]: 'Tag Count', + [ComicSort.ArtistCount]: 'Artist Count', + [ComicSort.CharacterCount]: 'Character Count', + [ComicSort.CircleCount]: 'Circle Count', + [ComicSort.WorldCount]: 'World Count', [ComicSort.PageCount]: 'Page Count', [ComicSort.Random]: 'Random' }; @@ -81,6 +85,7 @@ export const ArtistSortLabel: Record<ArtistSort, string> = { [ArtistSort.Name]: 'Name', [ArtistSort.CreatedAt]: 'Created At', [ArtistSort.UpdatedAt]: 'Updated At', + [ArtistSort.ComicCount]: 'Comic Count', [ArtistSort.Random]: 'Random' }; @@ -88,6 +93,7 @@ export const CharacterSortLabel: Record<CharacterSort, string> = { [CharacterSort.Name]: 'Name', [CharacterSort.CreatedAt]: 'Created At', [CharacterSort.UpdatedAt]: 'Updated At', + [CharacterSort.ComicCount]: 'Comic Count', [CharacterSort.Random]: 'Random' }; @@ -95,6 +101,7 @@ export const CircleSortLabel: Record<CircleSort, string> = { [CircleSort.Name]: 'Name', [CircleSort.CreatedAt]: 'Created At', [CircleSort.UpdatedAt]: 'Updated At', + [CircleSort.ComicCount]: 'Comic Count', [CircleSort.Random]: 'Random' }; @@ -103,12 +110,15 @@ export const NamespaceSortLabel: Record<NamespaceSort, string> = { [NamespaceSort.SortName]: 'Sort Name', [NamespaceSort.CreatedAt]: 'Created At', [NamespaceSort.UpdatedAt]: 'Updated At', + [NamespaceSort.TagCount]: 'Tag Count', [NamespaceSort.Random]: 'Random' }; export const TagSortLabel: Record<TagSort, string> = { [TagSort.Name]: 'Name', [TagSort.CreatedAt]: 'Created At', + [TagSort.ComicCount]: 'Comic Count', + [TagSort.NamespaceCount]: 'Namespace Count', [TagSort.UpdatedAt]: 'Updated At', [TagSort.Random]: 'Random' }; @@ -117,6 +127,7 @@ export const WorldSortLabel: Record<WorldSort, string> = { [WorldSort.Name]: 'Name', [WorldSort.CreatedAt]: 'Created At', [WorldSort.UpdatedAt]: 'Updated At', + [WorldSort.ComicCount]: 'Comic Count', [WorldSort.Random]: 'Random' }; |