mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Fix eslint errors
This commit is contained in:
parent
018d8d3f83
commit
8a6f33fff8
18 changed files with 48 additions and 48 deletions
6
src/apiclient.d.ts
vendored
6
src/apiclient.d.ts
vendored
|
@ -182,7 +182,7 @@ declare module 'jellyfin-apiclient' {
|
||||||
getPluginConfiguration(id: string): Promise<any>;
|
getPluginConfiguration(id: string): Promise<any>;
|
||||||
getPublicSystemInfo(): Promise<PublicSystemInfo>;
|
getPublicSystemInfo(): Promise<PublicSystemInfo>;
|
||||||
getPublicUsers(): Promise<UserDto[]>;
|
getPublicUsers(): Promise<UserDto[]>;
|
||||||
getQuickConnect(verb: string): Promise<void|boolean|number|QuickConnectResult|QuickConnectState>;
|
getQuickConnect(verb: string): Promise<void | boolean | number | QuickConnectResult | QuickConnectState>;
|
||||||
getReadySyncItems(deviceId: string): Promise<any>;
|
getReadySyncItems(deviceId: string): Promise<any>;
|
||||||
getRecordingFolders(userId: string): Promise<BaseItemDtoQueryResult>;
|
getRecordingFolders(userId: string): Promise<BaseItemDtoQueryResult>;
|
||||||
getRegistrationInfo(feature: string): Promise<any>;
|
getRegistrationInfo(feature: string): Promise<any>;
|
||||||
|
@ -308,7 +308,7 @@ declare module 'jellyfin-apiclient' {
|
||||||
class AppStore {
|
class AppStore {
|
||||||
constructor();
|
constructor();
|
||||||
|
|
||||||
getItem(name: string): string|null;
|
getItem(name: string): string | null;
|
||||||
removeItem(name: string): void;
|
removeItem(name: string): void;
|
||||||
setItem(name: string, value: string): void;
|
setItem(name: string, value: string): void;
|
||||||
}
|
}
|
||||||
|
@ -329,7 +329,7 @@ declare module 'jellyfin-apiclient' {
|
||||||
connectToServer(server: any, options?: any): Promise<any>;
|
connectToServer(server: any, options?: any): Promise<any>;
|
||||||
connectToServers(servers: any[], options?: any): Promise<any>;
|
connectToServers(servers: any[], options?: any): Promise<any>;
|
||||||
deleteServer(serverId: string): Promise<void>;
|
deleteServer(serverId: string): Promise<void>;
|
||||||
getApiClient(item: BaseItemDto|string): ApiClient;
|
getApiClient(item: BaseItemDto | string): ApiClient;
|
||||||
getApiClients(): ApiClient[];
|
getApiClients(): ApiClient[];
|
||||||
getAvailableServers(): any[];
|
getAvailableServers(): any[];
|
||||||
getOrCreateApiClient(serverId: string): ApiClient;
|
getOrCreateApiClient(serverId: string): ApiClient;
|
||||||
|
|
|
@ -103,7 +103,7 @@ export const resolveCardCssClasses = (opts: CardCssClassOpts): string => {
|
||||||
* Resolves applicable Card Image container CSS classes
|
* Resolves applicable Card Image container CSS classes
|
||||||
* @param opts options for determining which CSS classes are applicable
|
* @param opts options for determining which CSS classes are applicable
|
||||||
*/
|
*/
|
||||||
export const resolveCardImageContainerCssClasses = (opts: { itemType: string, hasCoverImage: boolean, itemName?: string, imgUrl?: string}): string => {
|
export const resolveCardImageContainerCssClasses = (opts: { itemType: string, hasCoverImage: boolean, itemName?: string, imgUrl?: string }): string => {
|
||||||
return classNames({
|
return classNames({
|
||||||
'cardImageContainer': true,
|
'cardImageContainer': true,
|
||||||
'coveredImage': opts.hasCoverImage,
|
'coveredImage': opts.hasCoverImage,
|
||||||
|
|
|
@ -3,7 +3,7 @@ import type { RouteObject } from 'react-router-dom';
|
||||||
export enum AsyncRouteType {
|
export enum AsyncRouteType {
|
||||||
Stable,
|
Stable,
|
||||||
Experimental,
|
Experimental,
|
||||||
Dashboard,
|
Dashboard
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface AsyncRoute {
|
export interface AsyncRoute {
|
||||||
|
|
|
@ -5,12 +5,12 @@ import './emby-button.scss';
|
||||||
|
|
||||||
enum IconPosition {
|
enum IconPosition {
|
||||||
RIGHT = 'RIGHT',
|
RIGHT = 'RIGHT',
|
||||||
LEFT = 'LEFT',
|
LEFT = 'LEFT'
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>,
|
interface ButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>,
|
||||||
HTMLButtonElement
|
HTMLButtonElement
|
||||||
> {
|
> {
|
||||||
icon?: string;
|
icon?: string;
|
||||||
iconClassName?: string;
|
iconClassName?: string;
|
||||||
iconPos?: string;
|
iconPos?: string;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import './emby-button.scss';
|
||||||
|
|
||||||
interface IconButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>,
|
interface IconButtonProps extends DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>,
|
||||||
HTMLButtonElement
|
HTMLButtonElement
|
||||||
> {
|
> {
|
||||||
icon?: string;
|
icon?: string;
|
||||||
iconClassName?: string;
|
iconClassName?: string;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ import './emby-button.scss';
|
||||||
|
|
||||||
interface LinkButtonProps extends DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>,
|
interface LinkButtonProps extends DetailedHTMLProps<AnchorHTMLAttributes<HTMLAnchorElement>,
|
||||||
HTMLAnchorElement
|
HTMLAnchorElement
|
||||||
> {
|
> {
|
||||||
className?: string;
|
className?: string;
|
||||||
isAutoHideEnabled?: boolean;
|
isAutoHideEnabled?: boolean;
|
||||||
href?: string;
|
href?: string;
|
||||||
|
|
|
@ -3,7 +3,7 @@ import globalize from 'lib/globalize';
|
||||||
|
|
||||||
export enum ScrollDirection {
|
export enum ScrollDirection {
|
||||||
RIGHT = 'right',
|
RIGHT = 'right',
|
||||||
LEFT = 'left',
|
LEFT = 'left'
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ScrollState {
|
interface ScrollState {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import type { BaseItemDto, BaseItemKind, CollectionTypeOptions, RecordingStatus,
|
||||||
type BaseItem = Omit<BaseItemDto, 'ChannelId' | 'EndDate' | 'Id' | 'StartDate' | 'Status' | 'Type' | 'Artists' | 'MediaType' | 'Name' | 'CollectionType'>;
|
type BaseItem = Omit<BaseItemDto, 'ChannelId' | 'EndDate' | 'Id' | 'StartDate' | 'Status' | 'Type' | 'Artists' | 'MediaType' | 'Name' | 'CollectionType'>;
|
||||||
type TimerInfo = Omit<TimerInfoDto, 'ChannelId' | 'EndDate' | 'Id' | 'StartDate' | 'Status' | 'Type' | 'Name'>;
|
type TimerInfo = Omit<TimerInfoDto, 'ChannelId' | 'EndDate' | 'Id' | 'StartDate' | 'Status' | 'Type' | 'Name'>;
|
||||||
type SeriesTimerInfo = Omit<SeriesTimerInfoDto, 'ChannelId' | 'EndDate' | 'Id' | 'StartDate' | 'Type' | 'Name'>;
|
type SeriesTimerInfo = Omit<SeriesTimerInfoDto, 'ChannelId' | 'EndDate' | 'Id' | 'StartDate' | 'Type' | 'Name'>;
|
||||||
type SearchHintItem = Omit<SearchHint, 'ItemId' |'Artists' | 'Id' | 'MediaType' | 'Name' | 'StartDate' | 'Type'>;
|
type SearchHintItem = Omit<SearchHint, 'ItemId' | 'Artists' | 'Id' | 'MediaType' | 'Name' | 'StartDate' | 'Type'>;
|
||||||
type UserItem = Omit<UserItemDataDto, 'ItemId'>;
|
type UserItem = Omit<UserItemDataDto, 'ItemId'>;
|
||||||
type VirtualFolder = Omit<VirtualFolderInfo, 'CollectionType'>;
|
type VirtualFolder = Omit<VirtualFolderInfo, 'CollectionType'>;
|
||||||
|
|
||||||
|
|
|
@ -16,20 +16,20 @@ export enum FeatureFilters {
|
||||||
HasTrailer = 'HasTrailer',
|
HasTrailer = 'HasTrailer',
|
||||||
HasSpecialFeature = 'HasSpecialFeature',
|
HasSpecialFeature = 'HasSpecialFeature',
|
||||||
HasThemeSong = 'HasThemeSong',
|
HasThemeSong = 'HasThemeSong',
|
||||||
HasThemeVideo = 'HasThemeVideo',
|
HasThemeVideo = 'HasThemeVideo'
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum EpisodeFilter {
|
export enum EpisodeFilter {
|
||||||
ParentIndexNumber = 'ParentIndexNumber',
|
ParentIndexNumber = 'ParentIndexNumber',
|
||||||
IsMissing = 'IsMissing',
|
IsMissing = 'IsMissing',
|
||||||
IsUnaired = 'IsUnaired',
|
IsUnaired = 'IsUnaired'
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum VideoBasicFilter {
|
export enum VideoBasicFilter {
|
||||||
IsSD = 'IsSD',
|
IsSD = 'IsSD',
|
||||||
IsHD = 'IsHD',
|
IsHD = 'IsHD',
|
||||||
Is4K = 'Is4K',
|
Is4K = 'Is4K',
|
||||||
Is3D = 'Is3D',
|
Is3D = 'Is3D'
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Filters {
|
export interface Filters {
|
||||||
|
@ -49,7 +49,7 @@ export interface Filters {
|
||||||
|
|
||||||
export enum ViewMode {
|
export enum ViewMode {
|
||||||
GridView = 'grid',
|
GridView = 'grid',
|
||||||
ListView = 'list',
|
ListView = 'list'
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface LibraryViewSettings {
|
export interface LibraryViewSettings {
|
||||||
|
|
|
@ -23,5 +23,5 @@ export enum LibraryTab {
|
||||||
PhotoAlbums = 'photoalbums',
|
PhotoAlbums = 'photoalbums',
|
||||||
Photos = 'photos',
|
Photos = 'photos',
|
||||||
Videos = 'videos',
|
Videos = 'videos',
|
||||||
Books = 'books',
|
Books = 'books'
|
||||||
}
|
}
|
||||||
|
|
|
@ -28,7 +28,7 @@ export enum SectionApiMethod {
|
||||||
RecommendedPrograms = 'RecommendedPrograms',
|
RecommendedPrograms = 'RecommendedPrograms',
|
||||||
LiveTvPrograms = 'liveTvPrograms',
|
LiveTvPrograms = 'liveTvPrograms',
|
||||||
Recordings = 'Recordings',
|
Recordings = 'Recordings',
|
||||||
RecordingFolders = 'RecordingFolders',
|
RecordingFolders = 'RecordingFolders'
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum SectionType {
|
export enum SectionType {
|
||||||
|
|
|
@ -13,7 +13,7 @@ export enum CardShape {
|
||||||
Mixed = 'mixed',
|
Mixed = 'mixed',
|
||||||
MixedSquare = 'mixedSquare',
|
MixedSquare = 'mixedSquare',
|
||||||
MixedBackdrop = 'mixedBackdrop',
|
MixedBackdrop = 'mixedBackdrop',
|
||||||
MixedPortrait = 'mixedPortrait',
|
MixedPortrait = 'mixedPortrait'
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSquareShape(enableOverflow = true) {
|
export function getSquareShape(enableOverflow = true) {
|
||||||
|
|
|
@ -5,7 +5,7 @@ import type { MediaSourceInfo } from '@jellyfin/sdk/lib/generated-client';
|
||||||
* @param mediaSource The media source.
|
* @param mediaSource The media source.
|
||||||
* @returns _true_ if the media source is an HLS stream, _false_ otherwise.
|
* @returns _true_ if the media source is an HLS stream, _false_ otherwise.
|
||||||
*/
|
*/
|
||||||
export function isHls(mediaSource: MediaSourceInfo|null|undefined): boolean {
|
export function isHls(mediaSource: MediaSourceInfo | null | undefined): boolean {
|
||||||
return mediaSource?.TranscodingSubProtocol?.toUpperCase() === 'HLS'
|
return mediaSource?.TranscodingSubProtocol?.toUpperCase() === 'HLS'
|
||||||
|| mediaSource?.Container?.toUpperCase() === 'HLS';
|
|| mediaSource?.Container?.toUpperCase() === 'HLS';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue