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

separate shared types

Co-authored-by: Bill Thornton <thornbill@users.noreply.github.com>
This commit is contained in:
grafixeyehero 2024-02-29 04:22:13 +03:00
parent bbc1860bde
commit 90a1d06557
9 changed files with 17 additions and 12 deletions

View file

@ -16,7 +16,8 @@ import datetime from 'scripts/datetime';
import { isUsingLiveTvNaming } from '../cardBuilderUtils'; import { isUsingLiveTvNaming } from '../cardBuilderUtils';
import type { ItemDto, NullableNumber, NullableString } from 'types/itemDto'; import type { NullableNumber, NullableString } from 'types/base/common/shared/types';
import type { ItemDto } from 'types/itemDto';
import type { CardOptions } from 'types/cardOptions'; import type { CardOptions } from 'types/cardOptions';
import type { DataAttributes } from 'types/dataAttributes'; import type { DataAttributes } from 'types/dataAttributes';
import { getDataAttributes } from 'utils/items'; import { getDataAttributes } from 'utils/items';

View file

@ -4,7 +4,8 @@ import { getImageApi } from '@jellyfin/sdk/lib/utils/api/image-api';
import { useApi } from 'hooks/useApi'; import { useApi } from 'hooks/useApi';
import { getDesiredAspect } from '../cardBuilderUtils'; import { getDesiredAspect } from '../cardBuilderUtils';
import { CardShape } from 'utils/card'; import { CardShape } from 'utils/card';
import type { ItemDto, NullableNumber, NullableString } from 'types/itemDto'; import type { NullableNumber, NullableString } from 'types/base/common/shared/types';
import type { ItemDto } from 'types/itemDto';
import type { CardOptions } from 'types/cardOptions'; import type { CardOptions } from 'types/cardOptions';
function getPreferThumbInfo(item: ItemDto, cardOptions: CardOptions) { function getPreferThumbInfo(item: ItemDto, cardOptions: CardOptions) {

View file

@ -1,4 +1,4 @@
import { CardShape } from 'utils/card'; import { CardShape } from '../../utils/card';
import { randomInt } from '../../utils/number'; import { randomInt } from '../../utils/number';
import classNames from 'classnames'; import classNames from 'classnames';

View file

@ -16,7 +16,8 @@ import classNames from 'classnames';
import datetime from 'scripts/datetime'; import datetime from 'scripts/datetime';
import itemHelper from 'components/itemHelper'; import itemHelper from 'components/itemHelper';
import AutoTimeProgressBar from 'elements/emby-progressbar/AutoTimeProgressBar'; import AutoTimeProgressBar from 'elements/emby-progressbar/AutoTimeProgressBar';
import type { ItemDto, NullableString } from 'types/itemDto'; import type { NullableString } from 'types/base/common/shared/types';
import type { ItemDto } from 'types/itemDto';
import type { ProgressOptions } from 'types/progressOptions'; import type { ProgressOptions } from 'types/progressOptions';
const TypeIcon = { const TypeIcon = {

View file

@ -3,7 +3,8 @@ import * as userSettings from 'scripts/settings/userSettings';
import datetime from 'scripts/datetime'; import datetime from 'scripts/datetime';
import globalize from 'scripts/globalize'; import globalize from 'scripts/globalize';
import itemHelper from '../itemHelper'; import itemHelper from '../itemHelper';
import type { ItemDto, NullableNumber, NullableString } from 'types/itemDto'; import type { NullableNumber, NullableString } from 'types/base/common/shared/types';
import type { ItemDto } from 'types/itemDto';
import type { MiscInfo } from 'types/mediaInfoItem'; import type { MiscInfo } from 'types/mediaInfoItem';
function shouldShowFolderRuntime( function shouldShowFolderRuntime(

View file

@ -0,0 +1,3 @@
export type NullableString = string | null | undefined;
export type NullableNumber = number | null | undefined;
export type NullableBoolean = boolean | null | undefined;

View file

@ -4,7 +4,8 @@ import type { UserItemDataDto } from '@jellyfin/sdk/lib/generated-client/models/
import type { BaseItemDtoImageBlurHashes } from '@jellyfin/sdk/lib/generated-client/models/base-item-dto-image-blur-hashes'; 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 type { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type';
import { CardShape } from 'utils/card'; import { CardShape } from 'utils/card';
import type { ItemDto, NullableString } from './itemDto'; import type { NullableString } from './base/common/shared/types';
import type { ItemDto } from './itemDto';
import type { ParentId } from './library'; import type { ParentId } from './library';
export interface CardOptions { export interface CardOptions {

View file

@ -1,5 +1,6 @@
import type { CollectionType, UserItemDataDto } from '@jellyfin/sdk/lib/generated-client'; import type { CollectionType } from '@jellyfin/sdk/lib/generated-client/models/collection-type';
import type { NullableBoolean, NullableNumber, NullableString } from './itemDto'; import type { UserItemDataDto } from '@jellyfin/sdk/lib/generated-client/models/user-item-data-dto';
import type { NullableBoolean, NullableNumber, NullableString } from './base/common/shared/types';
export type AttributesOpts = { export type AttributesOpts = {
context?: CollectionType, context?: CollectionType,

View file

@ -20,7 +20,3 @@ export interface ItemDto extends BaseItem, TimerInfo, SeriesTimerInfo, SearchHin
'Name'?: string | null; 'Name'?: string | null;
'ItemId'?: string | null; 'ItemId'?: string | null;
} }
export type NullableString = string | null | undefined;
export type NullableNumber = number | null | undefined;
export type NullableBoolean = boolean | null | undefined;