From 3f865fd8e8a0f0363bb9bf79bdbf85f3d317c9f7 Mon Sep 17 00:00:00 2001 From: Bogdan Date: Wed, 17 Jan 2024 03:30:00 +0200 Subject: [PATCH] Move Queue interface to typings --- frontend/src/App/State/QueueAppState.ts | 30 +----------------------- frontend/src/typings/Queue.ts | 31 +++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 29 deletions(-) create mode 100644 frontend/src/typings/Queue.ts diff --git a/frontend/src/App/State/QueueAppState.ts b/frontend/src/App/State/QueueAppState.ts index a4adc7c36..05d74acac 100644 --- a/frontend/src/App/State/QueueAppState.ts +++ b/frontend/src/App/State/QueueAppState.ts @@ -1,38 +1,10 @@ -import ModelBase from 'App/ModelBase'; -import { QualityModel } from 'Quality/Quality'; -import CustomFormat from 'typings/CustomFormat'; +import Queue from 'typings/Queue'; import AppSectionState, { AppSectionFilterState, AppSectionItemState, Error, } from './AppSectionState'; -export interface StatusMessage { - title: string; - messages: string[]; -} - -export interface Queue extends ModelBase { - quality: QualityModel; - customFormats: CustomFormat[]; - size: number; - title: string; - sizeleft: number; - timeleft: string; - estimatedCompletionTime: string; - status: string; - trackedDownloadStatus: string; - trackedDownloadState: string; - statusMessages: StatusMessage[]; - errorMessage: string; - downloadId: string; - protocol: string; - downloadClient: string; - outputPath: string; - artistId?: number; - albumId?: number; -} - export interface QueueDetailsAppState extends AppSectionState { params: unknown; } diff --git a/frontend/src/typings/Queue.ts b/frontend/src/typings/Queue.ts new file mode 100644 index 000000000..c3e6f1e09 --- /dev/null +++ b/frontend/src/typings/Queue.ts @@ -0,0 +1,31 @@ +import ModelBase from 'App/ModelBase'; +import { QualityModel } from 'Quality/Quality'; +import CustomFormat from 'typings/CustomFormat'; + +export interface StatusMessage { + title: string; + messages: string[]; +} + +interface Queue extends ModelBase { + quality: QualityModel; + customFormats: CustomFormat[]; + size: number; + title: string; + sizeleft: number; + timeleft: string; + estimatedCompletionTime: string; + status: string; + trackedDownloadStatus: string; + trackedDownloadState: string; + statusMessages: StatusMessage[]; + errorMessage: string; + downloadId: string; + protocol: string; + downloadClient: string; + outputPath: string; + artistId?: number; + albumId?: number; +} + +export default Queue;