From 630a7fd1cefe3a91eeb45bf78a051788396345df Mon Sep 17 00:00:00 2001 From: Kuba Orlik Date: Fri, 15 Jul 2022 14:03:20 +0200 Subject: [PATCH] =?UTF-8?q?Info=20o=20ilo=C5=9Bci=20os=C3=B3b=20w=20kolejc?= =?UTF-8?q?e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/request.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/request.ts b/src/request.ts index e0c0650..9f63e27 100644 --- a/src/request.ts +++ b/src/request.ts @@ -68,12 +68,19 @@ export default class ScreenshotRequest { current_action: string; preview: string; }> { + const jobs_ahead = this.getJobsAhead(); return { url: this.url, current_action: - this.status == "finished" ? "Zakończono!" : this.current_action, + this.status == "finished" + ? "Zakończono!" + : this.status == "waiting" + ? `Oczekiwanie w kolejce. Przed Tobą jest ${jobs_ahead} ${ + jobs_ahead === 1 ? "osoba" : "osób" + } w kolejce...` + : this.current_action, domains: this.domains, - jobs_ahead: this.getJobsAhead(), + jobs_ahead, id: this.id, status: this.status, output: this.output,