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,