This is an automated email from the ASF dual-hosted git repository. zehnder pushed a commit to branch 4287-migrate-angular-ui-from-constructor-injection-to-inject in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 798b2a557a7eed62f483b70c9c1c78e52ccb5dc7 Author: Philipp Zehnder <[email protected]> AuthorDate: Tue Mar 24 10:00:14 2026 +0100 migrate home UI to inject() --- .../app/home/dialog/welcome-tour/welcome-tour.component.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.ts b/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.ts index dbcada85b8..b867c56daf 100644 --- a/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.ts +++ b/ui/src/app/home/dialog/welcome-tour/welcome-tour.component.ts @@ -17,7 +17,7 @@ */ import { DialogRef } from '@streampipes/shared-ui'; -import { Component, Input, OnInit } from '@angular/core'; +import { Component, Input, OnInit, inject } from '@angular/core'; import { AppConstants } from '../../../services/app.constants'; import { AuthService } from '../../../services/auth.service'; import { UserAccount, UserInfo } from '@streampipes/platform-services'; @@ -43,18 +43,16 @@ import { MatDivider } from '@angular/material/divider'; ], }) export class WelcomeTourComponent implements OnInit { + private authService = inject(AuthService); + private dialogRef = inject<DialogRef<WelcomeTourComponent>>(DialogRef); + private profileService = inject(ProfileService); + appConstants = inject(AppConstants); + @Input() userInfo: UserInfo; currentUser: UserAccount; - constructor( - private authService: AuthService, - private dialogRef: DialogRef<WelcomeTourComponent>, - private profileService: ProfileService, - public appConstants: AppConstants, - ) {} - ngOnInit(): void { this.profileService .getUserProfile(this.userInfo.username)
