mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-06-15 16:27:54 +02:00
@mui/joy
This commit is contained in:
4
Website/modules/types/EnumLibraryType.ts
Normal file
4
Website/modules/types/EnumLibraryType.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export enum LibraryType {
|
||||
Komga = "Komga",
|
||||
Kavita = "Kavita"
|
||||
}
|
7
Website/modules/types/EnumMangaReleaseStatus.ts
Normal file
7
Website/modules/types/EnumMangaReleaseStatus.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export enum MangaReleaseStatus {
|
||||
Continuing = "Continuing",
|
||||
Completed = "Completed",
|
||||
OnHiatus = "OnHiatus",
|
||||
Cancelled = "Cancelled",
|
||||
Unreleased = "Unreleased",
|
||||
}
|
8
Website/modules/types/EnumRequestLimitType.ts
Normal file
8
Website/modules/types/EnumRequestLimitType.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export enum RequestLimitType {
|
||||
Default = "Default",
|
||||
MangaDexFeed = "MangaDexFeed",
|
||||
MangaImage = "MangaImage",
|
||||
MangaCover = "MangaCover",
|
||||
MangaDexImage = "MangaDexImage",
|
||||
MangaInfo = "MangaInfo"
|
||||
}
|
4
Website/modules/types/IAuthor.ts
Normal file
4
Website/modules/types/IAuthor.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export default interface IAuthor {
|
||||
authorId: string;
|
||||
authorName: string;
|
||||
}
|
18
Website/modules/types/IBackendSettings.ts
Normal file
18
Website/modules/types/IBackendSettings.ts
Normal file
@ -0,0 +1,18 @@
|
||||
export default interface IBackendSettings {
|
||||
downloadLocation: string;
|
||||
workingDirectory: string;
|
||||
userAgent: string;
|
||||
aprilFoolsMode: boolean;
|
||||
requestLimits: {
|
||||
Default: number,
|
||||
MangaInfo: number,
|
||||
MangaDexFeed: number,
|
||||
MangaDexImage: number,
|
||||
MangaImage: number,
|
||||
MangaCover: number,
|
||||
};
|
||||
compression: number;
|
||||
bwImages: boolean;
|
||||
startNewJobTimeoutMs: number;
|
||||
chapterNamingScheme: string;
|
||||
}
|
10
Website/modules/types/IChapter.ts
Normal file
10
Website/modules/types/IChapter.ts
Normal file
@ -0,0 +1,10 @@
|
||||
export default interface IChapter{
|
||||
chapterId: string;
|
||||
volumeNumber: number;
|
||||
chapterNumber: string;
|
||||
url: string;
|
||||
title: string | undefined;
|
||||
archiveFileName: string;
|
||||
downloaded: boolean;
|
||||
parentMangaId: string;
|
||||
}
|
4
Website/modules/types/IFrontendSettings.ts
Normal file
4
Website/modules/types/IFrontendSettings.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export default interface IFrontendSettings {
|
||||
jobInterval: Date;
|
||||
apiUri: string;
|
||||
}
|
8
Website/modules/types/ILibraryConnector.ts
Normal file
8
Website/modules/types/ILibraryConnector.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import {LibraryType} from "./EnumLibraryType";
|
||||
|
||||
export default interface ILibraryConnector {
|
||||
libraryConnectorId: string;
|
||||
libraryType: LibraryType;
|
||||
baseUrl: string;
|
||||
auth: string;
|
||||
}
|
5
Website/modules/types/ILink.ts
Normal file
5
Website/modules/types/ILink.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export default interface ILink {
|
||||
linkId: string;
|
||||
linkProvider: string;
|
||||
linkUrl: string;
|
||||
}
|
5
Website/modules/types/ILocalLibrary.ts
Normal file
5
Website/modules/types/ILocalLibrary.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export default interface ILocalLibrary {
|
||||
localLibraryId: string;
|
||||
basePath: string;
|
||||
libraryName: string;
|
||||
}
|
19
Website/modules/types/IManga.ts
Normal file
19
Website/modules/types/IManga.ts
Normal file
@ -0,0 +1,19 @@
|
||||
import {MangaReleaseStatus} from "./EnumMangaReleaseStatus";
|
||||
|
||||
export default interface IManga{
|
||||
mangaId: string;
|
||||
idOnConnectorSite: string;
|
||||
name: string;
|
||||
description: string;
|
||||
websiteUrl: string;
|
||||
year: number;
|
||||
originalLanguage: string;
|
||||
releaseStatus: MangaReleaseStatus;
|
||||
folderName: string;
|
||||
ignoreChapterBefore: number;
|
||||
mangaConnectorId: string;
|
||||
authorIds: string[];
|
||||
tags: string[];
|
||||
linkIds: string[];
|
||||
altTitleIds: string[];
|
||||
}
|
5
Website/modules/types/IMangaAltTitle.ts
Normal file
5
Website/modules/types/IMangaAltTitle.ts
Normal file
@ -0,0 +1,5 @@
|
||||
export default interface IMangaAltTitle {
|
||||
altTitleId: string;
|
||||
language: string;
|
||||
title: string;
|
||||
}
|
7
Website/modules/types/IMangaConnector.ts
Normal file
7
Website/modules/types/IMangaConnector.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export default interface IMangaConnector {
|
||||
name: string;
|
||||
supportedLanguages: string[];
|
||||
iconUrl: string;
|
||||
baseUris: string[];
|
||||
enabled: boolean;
|
||||
}
|
7
Website/modules/types/INotificationConnector.ts
Normal file
7
Website/modules/types/INotificationConnector.ts
Normal file
@ -0,0 +1,7 @@
|
||||
export default interface INotificationConnector {
|
||||
name: string;
|
||||
url: string;
|
||||
headers: Record<string, string>[];
|
||||
httpMethod: string;
|
||||
body: string;
|
||||
}
|
8
Website/modules/types/IRequestLimits.ts
Normal file
8
Website/modules/types/IRequestLimits.ts
Normal file
@ -0,0 +1,8 @@
|
||||
export default interface IRequestLimits {
|
||||
Default: number;
|
||||
MangaDexFeed: number;
|
||||
MangaImage: number;
|
||||
MangaCover: number;
|
||||
MangaDexImage: number;
|
||||
MangaInfo: number;
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface IDownloadAvailableChaptersJob extends IJob {
|
||||
mangaId: string;
|
||||
}
|
5
Website/modules/types/Jobs/IDownloadMangaCoverJob.ts
Normal file
5
Website/modules/types/Jobs/IDownloadMangaCoverJob.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface IDownloadMangaCoverJob extends IJob {
|
||||
mangaId: string;
|
||||
}
|
5
Website/modules/types/Jobs/IDownloadSingleChapterJob.ts
Normal file
5
Website/modules/types/Jobs/IDownloadSingleChapterJob.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface IDownloadSingleChapterJob extends IJob {
|
||||
chapterId: string;
|
||||
}
|
29
Website/modules/types/Jobs/IJob.ts
Normal file
29
Website/modules/types/Jobs/IJob.ts
Normal file
@ -0,0 +1,29 @@
|
||||
export default interface IJob{
|
||||
jobId: string;
|
||||
parentJobId: string;
|
||||
dependsOnJobIds: string[];
|
||||
jobType: JobType;
|
||||
recurrenceMs: number;
|
||||
lastExecution: Date;
|
||||
nextExecution: Date;
|
||||
state: JobState;
|
||||
enabled: boolean;
|
||||
}
|
||||
|
||||
export enum JobType {
|
||||
DownloadSingleChapterJob = "DownloadSingleChapterJob",
|
||||
DownloadAvailableChaptersJob = "DownloadAvailableChaptersJob",
|
||||
UpdateMetaDataJob = "UpdateMetaDataJob",
|
||||
MoveFileOrFolderJob = "MoveFileOrFolderJob",
|
||||
DownloadMangaCoverJob = "DownloadMangaCoverJob",
|
||||
RetrieveChaptersJob = "RetrieveChaptersJob",
|
||||
UpdateFilesDownloadedJob = "UpdateFilesDownloadedJob",
|
||||
MoveMangaLibraryJob = "MoveMangaLibraryJob"
|
||||
}
|
||||
|
||||
export enum JobState {
|
||||
Waiting = "Waiting",
|
||||
Running = "Running",
|
||||
Completed = "Completed",
|
||||
Failed = "Failed"
|
||||
}
|
6
Website/modules/types/Jobs/IMoveFileOrFolderJob.ts
Normal file
6
Website/modules/types/Jobs/IMoveFileOrFolderJob.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface IMoveFileOrFolderJob extends IJob {
|
||||
fromLocation: string;
|
||||
toLocation: string;
|
||||
}
|
6
Website/modules/types/Jobs/IMoveMangaLibraryJob.ts
Normal file
6
Website/modules/types/Jobs/IMoveMangaLibraryJob.ts
Normal file
@ -0,0 +1,6 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface IMoveMangaLibraryJob extends IJob {
|
||||
MangaId: string;
|
||||
ToLibraryId: string;
|
||||
}
|
5
Website/modules/types/Jobs/IRetrieveChaptersJob.ts
Normal file
5
Website/modules/types/Jobs/IRetrieveChaptersJob.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface IRetrieveChaptersJob extends IJob {
|
||||
mangaId: string;
|
||||
}
|
5
Website/modules/types/Jobs/IUpdateFilesDownloadedJob.ts
Normal file
5
Website/modules/types/Jobs/IUpdateFilesDownloadedJob.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface IUpdateFilesDownloadedJob extends IJob {
|
||||
mangaId: string;
|
||||
}
|
5
Website/modules/types/Jobs/IUpdateMetadataJob.ts
Normal file
5
Website/modules/types/Jobs/IUpdateMetadataJob.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import IJob from "./IJob";
|
||||
|
||||
export default interface IUpdateMetadataJob extends IJob {
|
||||
mangaId: string;
|
||||
}
|
@ -0,0 +1,4 @@
|
||||
export default interface IDownloadAvailableJobsRecord {
|
||||
recurrenceTimeMs: number;
|
||||
localLibraryId: string;
|
||||
}
|
8
Website/modules/types/records/IGotifyRecord.ts
Normal file
8
Website/modules/types/records/IGotifyRecord.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import "../../../styles/notificationConnector.css";
|
||||
import {isValidUri} from "../../../App";
|
||||
|
||||
export default interface IGotifyRecord {
|
||||
endpoint: string;
|
||||
appToken: string;
|
||||
priority: number;
|
||||
}
|
8
Website/modules/types/records/ILunaseaRecord.ts
Normal file
8
Website/modules/types/records/ILunaseaRecord.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import {ReactElement, useState} from "react";
|
||||
import NotificationConnector from "../../api/NotificationConnector";
|
||||
import Loader from "../../Loader";
|
||||
import "../../../styles/notificationConnector.css";
|
||||
|
||||
export default interface ILunaseaRecord {
|
||||
id: string;
|
||||
}
|
4
Website/modules/types/records/IModifyJobRecord.ts
Normal file
4
Website/modules/types/records/IModifyJobRecord.ts
Normal file
@ -0,0 +1,4 @@
|
||||
export default interface IModifyJobRecord {
|
||||
recurrenceMs: number;
|
||||
enabled: boolean;
|
||||
}
|
12
Website/modules/types/records/INewLibraryRecord.ts
Normal file
12
Website/modules/types/records/INewLibraryRecord.ts
Normal file
@ -0,0 +1,12 @@
|
||||
export default interface INewLibraryRecord {
|
||||
path: string;
|
||||
name: string;
|
||||
}
|
||||
|
||||
export function Validate(record: INewLibraryRecord) : boolean {
|
||||
if(record.path.length < 1)
|
||||
return false;
|
||||
if(record.name.length < 1)
|
||||
return false;
|
||||
return true;
|
||||
}
|
9
Website/modules/types/records/INtfyRecord.ts
Normal file
9
Website/modules/types/records/INtfyRecord.ts
Normal file
@ -0,0 +1,9 @@
|
||||
import "../../../styles/notificationConnector.css";
|
||||
|
||||
export default interface INtfyRecord {
|
||||
endpoint: string;
|
||||
username: string;
|
||||
password: string;
|
||||
topic: string;
|
||||
priority: number;
|
||||
}
|
6
Website/modules/types/records/IPushoverRecord.tsx
Normal file
6
Website/modules/types/records/IPushoverRecord.tsx
Normal file
@ -0,0 +1,6 @@
|
||||
import "../../../styles/notificationConnector.css";
|
||||
|
||||
export default interface IPushoverRecord {
|
||||
apptoken: string;
|
||||
user: string;
|
||||
}
|
Reference in New Issue
Block a user