typescriptify Popupbase
focus textfield on filterclick
This commit is contained in:
66
src/types/ApiTypes.ts
Normal file
66
src/types/ApiTypes.ts
Normal file
@ -0,0 +1,66 @@
|
||||
import {ActorType, TagType} from './VideoTypes';
|
||||
|
||||
export namespace VideoTypes{
|
||||
export interface loadVideoType {
|
||||
movie_url: string
|
||||
thumbnail: string
|
||||
movie_id: number
|
||||
movie_name: string
|
||||
likes: number
|
||||
quality: number
|
||||
length: number
|
||||
tags: TagType[]
|
||||
suggesttag: TagType[]
|
||||
actors: ActorType[]
|
||||
}
|
||||
|
||||
export interface startDataType{
|
||||
total: number;
|
||||
fullhd: number;
|
||||
hd: number;
|
||||
sd: number;
|
||||
tags: number;
|
||||
}
|
||||
|
||||
export interface VideoUnloadedType {
|
||||
movie_id: number;
|
||||
movie_name: string
|
||||
}
|
||||
}
|
||||
|
||||
export namespace SettingsTypes{
|
||||
export interface initialApiCallData {
|
||||
DarkMode: boolean;
|
||||
passwordEnabled: boolean;
|
||||
mediacenter_name: string;
|
||||
}
|
||||
|
||||
export interface loadGeneralSettingsType{
|
||||
video_path: string,
|
||||
episode_path: string,
|
||||
mediacenter_name: string,
|
||||
password: string,
|
||||
passwordEnabled: boolean,
|
||||
TMDB_grabbing: boolean,
|
||||
|
||||
videonr: number,
|
||||
dbsize: number,
|
||||
difftagnr: number,
|
||||
tagsadded: number
|
||||
}
|
||||
|
||||
export interface getStatusMessageType{
|
||||
contentAvailable: boolean;
|
||||
message: string;
|
||||
}
|
||||
}
|
||||
|
||||
export namespace ActorTypes{
|
||||
/**
|
||||
* result of actor fetch
|
||||
*/
|
||||
export interface videofetchresult {
|
||||
videos: VideoTypes.VideoUnloadedType[];
|
||||
info: ActorType;
|
||||
}
|
||||
}
|
16
src/types/GeneralTypes.ts
Normal file
16
src/types/GeneralTypes.ts
Normal file
@ -0,0 +1,16 @@
|
||||
import {TagType} from './VideoTypes';
|
||||
|
||||
export interface GeneralSuccess {
|
||||
result: string
|
||||
}
|
||||
|
||||
interface TagarrayType {
|
||||
[_: string]: TagType
|
||||
}
|
||||
|
||||
export const DefaultTags: TagarrayType = {
|
||||
all: {tag_id: 1, tag_name: 'all'},
|
||||
fullhd: {tag_id: 2, tag_name: 'fullhd'},
|
||||
lowq: {tag_id: 3, tag_name: 'lowquality'},
|
||||
hd: {tag_id: 4, tag_name: 'hd'}
|
||||
};
|
15
src/types/VideoTypes.ts
Normal file
15
src/types/VideoTypes.ts
Normal file
@ -0,0 +1,15 @@
|
||||
|
||||
|
||||
/**
|
||||
* type accepted by Tag component
|
||||
*/
|
||||
export interface TagType {
|
||||
tag_name: string
|
||||
tag_id: number
|
||||
}
|
||||
|
||||
export interface ActorType {
|
||||
thumbnail: string;
|
||||
name: string;
|
||||
actor_id: number;
|
||||
}
|
Reference in New Issue
Block a user