mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
add keys, pagination types
This commit is contained in:
+27
-17
@@ -13,13 +13,30 @@ import {
|
|||||||
} from '/@/shared/types/domain-types';
|
} from '/@/shared/types/domain-types';
|
||||||
import { ServerFeatures } from '/@/shared/types/features-types';
|
import { ServerFeatures } from '/@/shared/types/features-types';
|
||||||
|
|
||||||
|
export enum ItemListKey {
|
||||||
|
ALBUM = LibraryItem.ALBUM,
|
||||||
|
ALBUM_ARTIST = LibraryItem.ALBUM_ARTIST,
|
||||||
|
ALBUM_DETAIL = 'albumDetail',
|
||||||
|
ARTIST = LibraryItem.ARTIST,
|
||||||
|
FULL_SCREEN = 'fullScreen',
|
||||||
|
GENRE = LibraryItem.GENRE,
|
||||||
|
NOW_PLAYING = 'nowPlaying',
|
||||||
|
PLAYLIST = LibraryItem.PLAYLIST,
|
||||||
|
QUEUE_SONG = LibraryItem.QUEUE_SONG,
|
||||||
|
SIDE_DRAWER_QUEUE = 'sideDrawerQueue',
|
||||||
|
SIDE_QUEUE = 'sideQueue',
|
||||||
|
SONG = LibraryItem.SONG,
|
||||||
|
}
|
||||||
|
|
||||||
export enum ListDisplayType {
|
export enum ListDisplayType {
|
||||||
CARD = 'card',
|
|
||||||
GRID = 'poster',
|
GRID = 'poster',
|
||||||
GRID_PAGINATED = 'posterPaginated',
|
|
||||||
LIST = 'list',
|
LIST = 'list',
|
||||||
TABLE = 'table',
|
TABLE = 'table',
|
||||||
TABLE_PAGINATED = 'paginatedTable',
|
}
|
||||||
|
|
||||||
|
export enum ListPaginationType {
|
||||||
|
INFINITE = 'infinite',
|
||||||
|
PAGINATED = 'paginated',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum Platform {
|
export enum Platform {
|
||||||
@@ -47,25 +64,17 @@ export type CardRow<T> = {
|
|||||||
route?: CardRoute;
|
route?: CardRoute;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type RouteSlug = {
|
export type ListPagination = {
|
||||||
idProperty: string;
|
|
||||||
slugProperty: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type TablePagination = {
|
|
||||||
currentPage: number;
|
currentPage: number;
|
||||||
itemsPerPage: number;
|
itemsPerPage: number;
|
||||||
totalItems: number;
|
totalItems: number;
|
||||||
totalPages: number;
|
totalPages: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type TableType =
|
export type RouteSlug = {
|
||||||
| 'albumDetail'
|
idProperty: string;
|
||||||
| 'fullScreen'
|
slugProperty: string;
|
||||||
| 'nowPlaying'
|
};
|
||||||
| 'sideDrawerQueue'
|
|
||||||
| 'sideQueue'
|
|
||||||
| 'songs';
|
|
||||||
|
|
||||||
export const toServerType = (value?: string): null | ServerType => {
|
export const toServerType = (value?: string): null | ServerType => {
|
||||||
switch (value?.toLowerCase()) {
|
switch (value?.toLowerCase()) {
|
||||||
@@ -146,7 +155,7 @@ export enum TableColumn {
|
|||||||
ALBUM = 'album',
|
ALBUM = 'album',
|
||||||
ALBUM_ARTIST = 'albumArtists',
|
ALBUM_ARTIST = 'albumArtists',
|
||||||
ALBUM_COUNT = 'albumCount',
|
ALBUM_COUNT = 'albumCount',
|
||||||
ARTIST = 'artist',
|
ARTIST = 'artists',
|
||||||
BIOGRAPHY = 'biography',
|
BIOGRAPHY = 'biography',
|
||||||
BIT_RATE = 'bitRate',
|
BIT_RATE = 'bitRate',
|
||||||
BPM = 'bpm',
|
BPM = 'bpm',
|
||||||
@@ -157,6 +166,7 @@ export enum TableColumn {
|
|||||||
DISC_NUMBER = 'discNumber',
|
DISC_NUMBER = 'discNumber',
|
||||||
DURATION = 'duration',
|
DURATION = 'duration',
|
||||||
GENRE = 'genres',
|
GENRE = 'genres',
|
||||||
|
GENRE_BADGE = 'genreBadge',
|
||||||
ID = 'id',
|
ID = 'id',
|
||||||
IMAGE = 'imageUrl',
|
IMAGE = 'imageUrl',
|
||||||
LAST_PLAYED = 'lastPlayedAt',
|
LAST_PLAYED = 'lastPlayedAt',
|
||||||
|
|||||||
Reference in New Issue
Block a user