Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Make requestStream show Turbo progress bar

Alexander Brandon Colesca4655add57d
diff --git a/frontend/src/app/core/turbo/turbo-requests.service.ts b/frontend/src/app/core/turbo/turbo-requests.service.ts
index 41db68b71a8..3c1c9795c2e 100644
--- a/frontend/src/app/core/turbo/turbo-requests.service.ts
+++ b/frontend/src/app/core/turbo/turbo-requests.service.ts
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
import { renderStreamMessage } from '@hotwired/turbo';
import { ToastService } from 'core-app/shared/components/toaster/toast.service';
import { debugLog } from 'core-app/shared/helpers/debug_output';
+import { TurboHelpers } from 'turbo/helpers';
@Injectable({ providedIn: 'root' })
export class TurboRequestsService {
@@ -110,6 +111,8 @@ export class TurboRequestsService {
url:string,
requestId = url,
):Promise<{ html:string, headers:Headers }> {
+ TurboHelpers.showProgressBar();
+
return this.request(
url,
{
@@ -121,7 +124,10 @@ export class TurboRequestsService {
},
false,
requestId,
- );
+ )
+ .finally(() => {
+ TurboHelpers.hideProgressBar();
+ });
}
public abortRequest(requestId:string):void {