mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Move itemdto to base models folder
This commit is contained in:
parent
efe5d0b84d
commit
d5a775502b
33 changed files with 32 additions and 32 deletions
|
@ -4,7 +4,7 @@ import CardWrapper from './CardWrapper';
|
||||||
import CardBox from './CardBox';
|
import CardBox from './CardBox';
|
||||||
|
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
|
|
||||||
interface CardProps {
|
interface CardProps {
|
||||||
item?: ItemDto;
|
item?: ItemDto;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import CardHoverMenu from './CardHoverMenu';
|
||||||
import CardOuterFooter from './CardOuterFooter';
|
import CardOuterFooter from './CardOuterFooter';
|
||||||
import CardContent from './CardContent';
|
import CardContent from './CardContent';
|
||||||
import { CardShape } from 'utils/card';
|
import { CardShape } from 'utils/card';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
interface CardBoxProps {
|
interface CardBoxProps {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import classNames from 'classnames';
|
||||||
import { getDefaultBackgroundClass } from '../cardBuilderUtils';
|
import { getDefaultBackgroundClass } from '../cardBuilderUtils';
|
||||||
import CardImageContainer from './CardImageContainer';
|
import CardImageContainer from './CardImageContainer';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
interface CardContentProps {
|
interface CardContentProps {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import Box from '@mui/material/Box';
|
||||||
import useCardText from './useCardText';
|
import useCardText from './useCardText';
|
||||||
import layoutManager from 'components/layoutManager';
|
import layoutManager from 'components/layoutManager';
|
||||||
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
const shouldShowDetailsMenu = (
|
const shouldShowDetailsMenu = (
|
||||||
|
|
|
@ -11,7 +11,7 @@ import FavoriteButton from 'elements/emby-ratingbutton/FavoriteButton';
|
||||||
import PlayArrowIconButton from '../../common/PlayArrowIconButton';
|
import PlayArrowIconButton from '../../common/PlayArrowIconButton';
|
||||||
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
interface CardHoverMenuProps {
|
interface CardHoverMenuProps {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import RefreshIndicator from 'elements/emby-itemrefreshindicator/RefreshIndicato
|
||||||
import Media from '../../common/Media';
|
import Media from '../../common/Media';
|
||||||
import CardInnerFooter from './CardInnerFooter';
|
import CardInnerFooter from './CardInnerFooter';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
interface CardImageContainerProps {
|
interface CardImageContainerProps {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { type FC } from 'react';
|
import React, { type FC } from 'react';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import CardFooterText from './CardFooterText';
|
import CardFooterText from './CardFooterText';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
interface CardInnerFooterProps {
|
interface CardInnerFooterProps {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import { useApi } from 'hooks/useApi';
|
||||||
import { getCardLogoUrl } from './cardHelper';
|
import { getCardLogoUrl } from './cardHelper';
|
||||||
import CardFooterText from './CardFooterText';
|
import CardFooterText from './CardFooterText';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
interface CardOuterFooterProps {
|
interface CardOuterFooterProps {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import { appRouter } from 'components/router/appRouter';
|
||||||
import PlayArrowIconButton from '../../common/PlayArrowIconButton';
|
import PlayArrowIconButton from '../../common/PlayArrowIconButton';
|
||||||
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
const sholudShowOverlayPlayButton = (
|
const sholudShowOverlayPlayButton = (
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import React, { type FC } from 'react';
|
import React, { type FC } from 'react';
|
||||||
import { setCardData } from '../cardBuilder';
|
import { setCardData } from '../cardBuilder';
|
||||||
import Card from './Card';
|
import Card from './Card';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
import '../card.scss';
|
import '../card.scss';
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ import datetime from 'scripts/datetime';
|
||||||
import { isUsingLiveTvNaming } from '../cardBuilderUtils';
|
import { isUsingLiveTvNaming } from '../cardBuilderUtils';
|
||||||
|
|
||||||
import type { NullableNumber, NullableString } from 'types/base/common/shared/types';
|
import type { NullableNumber, NullableString } from 'types/base/common/shared/types';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
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';
|
||||||
|
|
|
@ -9,7 +9,7 @@ import { getDataAttributes } from 'utils/items';
|
||||||
import { CardShape } from 'utils/card';
|
import { CardShape } from 'utils/card';
|
||||||
import layoutManager from 'components/layoutManager';
|
import layoutManager from 'components/layoutManager';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
interface UseCardProps {
|
interface UseCardProps {
|
||||||
|
|
|
@ -5,7 +5,7 @@ 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 { NullableNumber, NullableString } from 'types/base/common/shared/types';
|
import type { NullableNumber, NullableString } from 'types/base/common/shared/types';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
function getPreferThumbInfo(item: ItemDto, cardOptions: CardOptions) {
|
function getPreferThumbInfo(item: ItemDto, cardOptions: CardOptions) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import layoutManager from 'components/layoutManager';
|
||||||
import CardText from './CardText';
|
import CardText from './CardText';
|
||||||
import { getCardTextLines } from './cardHelper';
|
import { getCardTextLines } from './cardHelper';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { CardOptions } from 'types/cardOptions';
|
import type { CardOptions } from 'types/cardOptions';
|
||||||
|
|
||||||
const enableRightMargin = (
|
const enableRightMargin = (
|
||||||
|
|
|
@ -3,7 +3,7 @@ import React, { type FC } from 'react';
|
||||||
import Icon from '@mui/material/Icon';
|
import Icon from '@mui/material/Icon';
|
||||||
import imageHelper from 'utils/image';
|
import imageHelper from 'utils/image';
|
||||||
import DefaultName from './DefaultName';
|
import DefaultName from './DefaultName';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
|
|
||||||
interface DefaultIconTextProps {
|
interface DefaultIconTextProps {
|
||||||
item: ItemDto;
|
item: ItemDto;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React, { type FC } from 'react';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import itemHelper from 'components/itemHelper';
|
import itemHelper from 'components/itemHelper';
|
||||||
import { isUsingLiveTvNaming } from '../cardbuilder/cardBuilderUtils';
|
import { isUsingLiveTvNaming } from '../cardbuilder/cardBuilderUtils';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
|
|
||||||
interface DefaultNameProps {
|
interface DefaultNameProps {
|
||||||
item: ItemDto;
|
item: ItemDto;
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { BaseItemKind, ImageType } from '@jellyfin/sdk/lib/generated-client';
|
||||||
import React, { type FC } from 'react';
|
import React, { type FC } from 'react';
|
||||||
import Image from './Image';
|
import Image from './Image';
|
||||||
import DefaultIconText from './DefaultIconText';
|
import DefaultIconText from './DefaultIconText';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
|
|
||||||
interface MediaProps {
|
interface MediaProps {
|
||||||
item: ItemDto;
|
item: ItemDto;
|
||||||
|
|
|
@ -17,7 +17,7 @@ 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 { NullableString } from 'types/base/common/shared/types';
|
import type { NullableString } from 'types/base/common/shared/types';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { ProgressOptions } from 'types/progressOptions';
|
import type { ProgressOptions } from 'types/progressOptions';
|
||||||
|
|
||||||
const TypeIcon = {
|
const TypeIcon = {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import React, { type FC } from 'react';
|
||||||
import useList from './useList';
|
import useList from './useList';
|
||||||
import ListContent from './ListContent';
|
import ListContent from './ListContent';
|
||||||
import ListWrapper from './ListWrapper';
|
import ListWrapper from './ListWrapper';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { ListOptions } from 'types/listOptions';
|
import type { ListOptions } from 'types/listOptions';
|
||||||
import '../../mediainfo/mediainfo.scss';
|
import '../../mediainfo/mediainfo.scss';
|
||||||
import '../../guide/programs.scss';
|
import '../../guide/programs.scss';
|
||||||
|
|
|
@ -10,7 +10,7 @@ import ListItemBody from './ListItemBody';
|
||||||
import ListImageContainer from './ListImageContainer';
|
import ListImageContainer from './ListImageContainer';
|
||||||
import ListViewUserDataButtons from './ListViewUserDataButtons';
|
import ListViewUserDataButtons from './ListViewUserDataButtons';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { ListOptions } from 'types/listOptions';
|
import type { ListOptions } from 'types/listOptions';
|
||||||
|
|
||||||
interface ListContentProps {
|
interface ListContentProps {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import {
|
||||||
|
|
||||||
import Media from 'components/common/Media';
|
import Media from 'components/common/Media';
|
||||||
import PlayArrowIconButton from 'components/common/PlayArrowIconButton';
|
import PlayArrowIconButton from 'components/common/PlayArrowIconButton';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { ListOptions } from 'types/listOptions';
|
import type { ListOptions } from 'types/listOptions';
|
||||||
|
|
||||||
interface ListImageContainerProps {
|
interface ListImageContainerProps {
|
||||||
|
|
|
@ -4,7 +4,7 @@ import Box from '@mui/material/Box';
|
||||||
import useListTextlines from './useListTextlines';
|
import useListTextlines from './useListTextlines';
|
||||||
import PrimaryMediaInfo from '../../mediainfo/PrimaryMediaInfo';
|
import PrimaryMediaInfo from '../../mediainfo/PrimaryMediaInfo';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { ListOptions } from 'types/listOptions';
|
import type { ListOptions } from 'types/listOptions';
|
||||||
|
|
||||||
interface ListItemBodyProps {
|
interface ListItemBodyProps {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import InfoIconButton from '../../common/InfoIconButton';
|
||||||
import RightIconButtons from '../../common/RightIconButtons';
|
import RightIconButtons from '../../common/RightIconButtons';
|
||||||
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
import MoreVertIconButton from '../../common/MoreVertIconButton';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { ListOptions } from 'types/listOptions';
|
import type { ListOptions } from 'types/listOptions';
|
||||||
|
|
||||||
interface ListViewUserDataButtonsProps {
|
interface ListViewUserDataButtonsProps {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { getIndex } from './listHelper';
|
||||||
import ListGroupHeaderWrapper from './ListGroupHeaderWrapper';
|
import ListGroupHeaderWrapper from './ListGroupHeaderWrapper';
|
||||||
import List from './List';
|
import List from './List';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { ListOptions } from 'types/listOptions';
|
import type { ListOptions } from 'types/listOptions';
|
||||||
import '../listview.scss';
|
import '../listview.scss';
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { BaseItemKind, ImageType } from '@jellyfin/sdk/lib/generated-client';
|
||||||
import { getImageApi } from '@jellyfin/sdk/lib/utils/api/image-api';
|
import { getImageApi } from '@jellyfin/sdk/lib/utils/api/image-api';
|
||||||
import globalize from 'scripts/globalize';
|
import globalize from 'scripts/globalize';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { ListOptions } from 'types/listOptions';
|
import type { ListOptions } from 'types/listOptions';
|
||||||
|
|
||||||
const sortBySortName = (item: ItemDto): string => {
|
const sortBySortName = (item: ItemDto): string => {
|
||||||
|
|
|
@ -2,7 +2,7 @@ import classNames from 'classnames';
|
||||||
import { getDataAttributes } from 'utils/items';
|
import { getDataAttributes } from 'utils/items';
|
||||||
import layoutManager from 'components/layoutManager';
|
import layoutManager from 'components/layoutManager';
|
||||||
|
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { ListOptions } from 'types/listOptions';
|
import type { ListOptions } from 'types/listOptions';
|
||||||
|
|
||||||
interface UseListProps {
|
interface UseListProps {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import React from 'react';
|
||||||
import itemHelper from '../../itemHelper';
|
import itemHelper from '../../itemHelper';
|
||||||
import datetime from 'scripts/datetime';
|
import datetime from 'scripts/datetime';
|
||||||
import ListTextWrapper from './ListTextWrapper';
|
import ListTextWrapper from './ListTextWrapper';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { ListOptions } from 'types/listOptions';
|
import type { ListOptions } from 'types/listOptions';
|
||||||
|
|
||||||
function getParentTitle(
|
function getParentTitle(
|
||||||
|
|
|
@ -8,7 +8,7 @@ import StarIcons from './StarIcons';
|
||||||
import CaptionMediaInfo from './CaptionMediaInfo';
|
import CaptionMediaInfo from './CaptionMediaInfo';
|
||||||
import CriticRatingMediaInfo from './CriticRatingMediaInfo';
|
import CriticRatingMediaInfo from './CriticRatingMediaInfo';
|
||||||
import EndsAt from './EndsAt';
|
import EndsAt from './EndsAt';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { MiscInfo } from 'types/mediaInfoItem';
|
import type { MiscInfo } from 'types/mediaInfoItem';
|
||||||
|
|
||||||
interface PrimaryMediaInfoProps {
|
interface PrimaryMediaInfoProps {
|
||||||
|
|
|
@ -4,7 +4,7 @@ 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 { NullableNumber, NullableString } from 'types/base/common/shared/types';
|
import type { NullableNumber, NullableString } from 'types/base/common/shared/types';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
import type { MiscInfo } from 'types/mediaInfoItem';
|
import type { MiscInfo } from 'types/mediaInfoItem';
|
||||||
|
|
||||||
function shouldShowFolderRuntime(
|
function shouldShowFolderRuntime(
|
||||||
|
|
|
@ -10,7 +10,7 @@ import Typography from '@mui/material/Typography';
|
||||||
import Box from '@mui/material/Box';
|
import Box from '@mui/material/Box';
|
||||||
import { toPercent } from 'utils/number';
|
import { toPercent } from 'utils/number';
|
||||||
import { getCurrentDateTimeLocale } from 'scripts/globalize';
|
import { getCurrentDateTimeLocale } from 'scripts/globalize';
|
||||||
import type { ItemDto } from 'types/itemDto';
|
import type { ItemDto } from 'types/base/models/item-dto';
|
||||||
|
|
||||||
function CircularProgressWithLabel(
|
function CircularProgressWithLabel(
|
||||||
props: CircularProgressProps & { value: number }
|
props: CircularProgressProps & { value: number }
|
||||||
|
|
|
@ -5,7 +5,7 @@ import type { BaseItemDtoImageBlurHashes } from '@jellyfin/sdk/lib/generated-cli
|
||||||
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 { NullableString } from './base/common/shared/types';
|
import type { NullableString } from './base/common/shared/types';
|
||||||
import type { ItemDto } from './itemDto';
|
import type { ItemDto } from './base/models/item-dto';
|
||||||
import type { ParentId } from './library';
|
import type { ParentId } from './library';
|
||||||
|
|
||||||
export interface CardOptions {
|
export interface CardOptions {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { ItemSortBy } from '@jellyfin/sdk/lib/models/api/item-sort-by';
|
import { ItemSortBy } from '@jellyfin/sdk/lib/models/api/item-sort-by';
|
||||||
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 type { ItemDto } from './itemDto';
|
import type { ItemDto } from './base/models/item-dto';
|
||||||
export interface ListOptions {
|
export interface ListOptions {
|
||||||
items?: ItemDto[] | null;
|
items?: ItemDto[] | null;
|
||||||
index?: string;
|
index?: string;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue