Update "UpdateStatus" type to server changes (#413)
The "UpdateStatus" was updated in https://github.com/Suwayomi/Tachidesk-Server/pull/657 on the server side
This commit is contained in:
@@ -62,8 +62,8 @@ function UpdateChecker({ handleFinishedUpdate }: IUpdateCheckerProps) {
|
|||||||
let updateStarted = false;
|
let updateStarted = false;
|
||||||
|
|
||||||
wsc.onmessage = (e) => {
|
wsc.onmessage = (e) => {
|
||||||
const { running, statusMap } = JSON.parse(e.data) as IUpdateStatus;
|
const { running, mangaStatusMap } = JSON.parse(e.data) as IUpdateStatus;
|
||||||
const { COMPLETE = [], RUNNING = [], PENDING = [] } = statusMap;
|
const { COMPLETE = [], RUNNING = [], PENDING = [] } = mangaStatusMap;
|
||||||
|
|
||||||
const currentProgress = 100 * (COMPLETE.length / (COMPLETE.length + RUNNING.length + PENDING.length));
|
const currentProgress = 100 * (COMPLETE.length / (COMPLETE.length + RUNNING.length + PENDING.length));
|
||||||
|
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ export interface IQueue {
|
|||||||
|
|
||||||
export interface IUpdateStatus {
|
export interface IUpdateStatus {
|
||||||
running: boolean;
|
running: boolean;
|
||||||
statusMap: {
|
mangaStatusMap: {
|
||||||
COMPLETE?: IManga[];
|
COMPLETE?: IManga[];
|
||||||
RUNNING?: IManga[];
|
RUNNING?: IManga[];
|
||||||
PENDING?: IManga[];
|
PENDING?: IManga[];
|
||||||
|
|||||||
Reference in New Issue
Block a user