diff --git a/frontend/src/app/projects/project-detail/project-commits/project-commits.component.html b/frontend/src/app/projects/project-detail/project-commits/project-commits.component.html index 232a0aedd..68fdeff4f 100644 --- a/frontend/src/app/projects/project-detail/project-commits/project-commits.component.html +++ b/frontend/src/app/projects/project-detail/project-commits/project-commits.component.html @@ -5,9 +5,22 @@

Commits

- + -

Look at this progress!

+ + @for (model of modelService.models$ | async; track model.name) { +

{{ model.name }}

+ + + +

COMMIT TITLE

+

+ AUTHOR + on DATE +

+
+ } +
diff --git a/frontend/src/app/projects/project-detail/project-commits/project-commits.component.ts b/frontend/src/app/projects/project-detail/project-commits/project-commits.component.ts index f3bf69b66..f350f2dac 100644 --- a/frontend/src/app/projects/project-detail/project-commits/project-commits.component.ts +++ b/frontend/src/app/projects/project-detail/project-commits/project-commits.component.ts @@ -3,10 +3,26 @@ * SPDX-License-Identifier: Apache-2.0 */ -import { Component } from '@angular/core'; +import { Component, OnInit } from '@angular/core'; +import { untilDestroyed } from '@ngneat/until-destroy'; +import { filter } from 'rxjs'; +import { + Model, + ModelService, +} from 'src/app/projects/models/service/model.service'; @Component({ selector: 'app-project-commits', templateUrl: './project-commits.component.html', }) -export class ProjectCommitsComponent {} +export class ProjectCommitsComponent implements OnInit { + models?: Model[]; + + constructor(public modelService: ModelService) {} + + ngOnInit(): void { + this.modelService.models$ + .pipe(untilDestroyed(this), filter(Boolean)) + .subscribe((models) => (this.models = models)); + } +}