Skip to content

Commit 72ebab2

Browse files
committed
Use ParseService.proofs$ in AnnotationMenuComponent and TableauSVG
1 parent efcc413 commit 72ebab2

4 files changed

Lines changed: 17 additions & 6 deletions

File tree

frontend/src/app/annotate/annotation-menu/annotation-menu.component.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@let proofs = proofs$ | async;
2+
13
<ul ngbNav #nav="ngbNav" [(activeId)]="active" class="nav-tabs flex-nowrap">
24
<li [ngbNavItem]="1">
35
<button ngbNavLink>
@@ -19,7 +21,9 @@
1921
</button>
2022
<ng-template ngbNavContent>
2123
<section>
22-
<la-tableau-svg></la-tableau-svg>
24+
@if (proofs) {
25+
<la-tableau-svg [tree]="proofs.entailment"></la-tableau-svg>
26+
}
2327
</section>
2428
</ng-template>
2529
</li>

frontend/src/app/annotate/annotation-menu/annotation-menu.component.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
import { Component } from "@angular/core";
1+
import { Component, inject } from "@angular/core";
2+
import { CommonModule } from "@angular/common";
23
import { FontAwesomeModule } from "@fortawesome/angular-fontawesome";
34
import { NgbNavModule } from "@ng-bootstrap/ng-bootstrap";
45
import {
56
faSquarePollHorizontal,
67
faTree,
78
faPenNib,
89
} from "@fortawesome/free-solid-svg-icons";
10+
11+
import { ParseService } from "@/services/parse.service";
912
import { AnnotationParseResultsComponent } from "../annotation-parse-results/annotation-parse-results.component";
1013
import { TableauSVG } from '../tableau-svg/tableau-svg.component';
1114
import { AnnotationCommentsComponent } from "../annotation-comments/annotation-comments.component";
@@ -14,6 +17,7 @@ import { AnnotationCommentsComponent } from "../annotation-comments/annotation-c
1417
selector: "la-annotation-menu",
1518
standalone: true,
1619
imports: [
20+
CommonModule,
1721
NgbNavModule,
1822
FontAwesomeModule,
1923
AnnotationParseResultsComponent,
@@ -24,6 +28,9 @@ import { AnnotationCommentsComponent } from "../annotation-comments/annotation-c
2428
styleUrl: "./annotation-menu.component.scss",
2529
})
2630
export class AnnotationMenuComponent {
31+
private parseService = inject(ParseService);
32+
public readonly proofs$ = this.parseService.proofs$;
33+
2734
public active = 1;
2835

2936
public faSquarePollHorizontal = faSquarePollHorizontal;
Lines changed: 2 additions & 1 deletion
Loading

frontend/src/app/annotate/tableau-svg/tableau-svg.component.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
import { Component, ChangeDetectorRef} from '@angular/core';
1+
import { Component, ChangeDetectorRef, input } from '@angular/core';
22
import { CommonModule } from "@angular/common";
33
import { Subject } from "rxjs";
44
import { Dimensions } from '@/types';
55
import { TableauTree } from './tableau-tree.component';
6-
import mockTableau from '@/shared/mockTableauTree';
76

87
@Component({
98
selector: "la-tableau-svg",
@@ -28,5 +27,5 @@ export class TableauSVG {
2827
this.cdref.detectChanges();
2928
}
3029

31-
tree: any = mockTableau;
30+
public readonly tree = input.required<any>();
3231
}

0 commit comments

Comments
 (0)