1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Use enums CardShape & BaseItemKind,

Use type import for react FC,
Remove escapeHTML

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
grafixeyehero 2024-02-28 22:47:36 +03:00
parent 11d013b07e
commit 8cbddba8fd
18 changed files with 102 additions and 82 deletions

View file

@ -1,7 +1,11 @@
import type { BaseItemDtoImageBlurHashes, BaseItemKind, ImageType, UserItemDataDto } from '@jellyfin/sdk/lib/generated-client';
import { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type';
import type { BaseItemKind } from '@jellyfin/sdk/lib/generated-client/models/base-item-kind';
import type { ImageType } from '@jellyfin/sdk/lib/generated-client/models/image-type';
import type { UserItemDataDto } from '@jellyfin/sdk/lib/generated-client/models/user-item-data-dto';
import type { BaseItemDtoImageBlurHashes } from '@jellyfin/sdk/lib/generated-client/models/base-item-dto-image-blur-hashes';
import type { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type';
import { CardShape } from 'utils/card';
import type { ItemDto, NullableString } from './itemDto';
import { ParentId } from './library';
import type { ParentId } from './library';
export interface CardOptions {
itemsContainer?: HTMLElement | null;
@ -20,7 +24,8 @@ export interface CardOptions {
preferDisc?: boolean;
preferLogo?: boolean;
scalable?: boolean;
shape?: string | null;
shape?: CardShape;
defaultShape?: CardShape;
lazy?: boolean;
cardLayout?: boolean | null;
showParentTitle?: boolean;
@ -39,7 +44,6 @@ export interface CardOptions {
lines?: number;
context?: CollectionType;
action?: string | null;
defaultShape?: string;
indexBy?: string;
parentId?: ParentId;
showMenu?: boolean;

View file

@ -1,9 +1,8 @@
import { BaseItemDto, SeriesTimerInfoDto } from '@jellyfin/sdk/lib/generated-client';
import { ItemSortBy } from '@jellyfin/sdk/lib/models/api/item-sort-by';
import { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type';
import type { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type';
import type { ItemDto } from './itemDto';
export interface ListOptions {
items?: BaseItemDto[] | SeriesTimerInfoDto[] | null;
items?: ItemDto[] | null;
index?: string;
showIndex?: boolean;
action?: string | null;

View file

@ -1,4 +1,4 @@
import { UserItemDataDto } from '@jellyfin/sdk/lib/generated-client';
import type { UserItemDataDto } from '@jellyfin/sdk/lib/generated-client/models/user-item-data-dto';
export interface ProgressOptions {
containerClass: string,