Skip to content

Commit

Permalink
feat: Add list of project models with dummy commit
Browse files Browse the repository at this point in the history
  • Loading branch information
romeonicholas committed Nov 30, 2023
1 parent 583e356 commit 0649541
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,22 @@

<div class="flex h-full flex-col">
<h2>Commits</h2>
<mat-card>
<mat-card class="max-w-[400px]">
<mat-card-content>
<p>Look at this progress!</p>
<mat-list>
@for (model of modelService.models$ | async; track model.name) {
<h3 matSubheader>{{ model.name }}</h3>
<mat-divider></mat-divider>

<mat-list-item>
<h4 matLine class="overflow-hidden text-ellipsis">COMMIT TITLE</h4>
<p matLine class="overflow-hidden text-ellipsis">
<a class="text-blue-600" href="/user?userId=1">AUTHOR</a>
on DATE
</p>
</mat-list-item>
}
</mat-list>
</mat-card-content>
</mat-card>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

0 comments on commit 0649541

Please sign in to comment.