-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from raywo-personal/67-add-color-to-prior-know…
…ledge 67-add-color-to-prior-knowledge
- Loading branch information
Showing
26 changed files
with
467 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...knowledge/components/prior-knowledge-badge-list/prior-knowledge-badge-list.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<div class="knowledge-badge-list"> | ||
@for (knowledge of knowledgeList$ | async; track knowledge.id) { | ||
<app-prior-knowledge-pill [knowledge]="knowledge" | ||
[remark]="knowledge.description"/> | ||
} | ||
</div> |
Empty file.
24 changes: 24 additions & 0 deletions
24
...wledge/components/prior-knowledge-badge-list/prior-knowledge-badge-list.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {ComponentFixture, TestBed} from '@angular/core/testing'; | ||
|
||
import {PriorKnowledgeBadgeListComponent} from './prior-knowledge-badge-list.component'; | ||
|
||
|
||
describe('PriorKnowledgeBadgeListComponent', () => { | ||
let component: PriorKnowledgeBadgeListComponent; | ||
let fixture: ComponentFixture<PriorKnowledgeBadgeListComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [PriorKnowledgeBadgeListComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(PriorKnowledgeBadgeListComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
22 changes: 22 additions & 0 deletions
22
...r-knowledge/components/prior-knowledge-badge-list/prior-knowledge-badge-list.component.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import {Component, inject} from '@angular/core'; | ||
import {PriorKnowledgeService} from '../../services/prior-knowledge.service'; | ||
import {AsyncPipe} from '@angular/common'; | ||
import {PriorKnowledgePillComponent} from '../prior-knowledge-pill/prior-knowledge-pill.component'; | ||
|
||
|
||
@Component({ | ||
selector: 'app-prior-knowledge-badge-list', | ||
imports: [ | ||
AsyncPipe, | ||
PriorKnowledgePillComponent | ||
], | ||
templateUrl: './prior-knowledge-badge-list.component.html', | ||
styleUrl: './prior-knowledge-badge-list.component.scss' | ||
}) | ||
export class PriorKnowledgeBadgeListComponent { | ||
|
||
private knowledgeService = inject(PriorKnowledgeService); | ||
|
||
protected knowledgeList$ = this.knowledgeService.knowledgeList$; | ||
|
||
} |
88 changes: 52 additions & 36 deletions
88
src/app/prior-knowledge/components/prior-knowledge-edit/prior-knowledge-edit.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/app/prior-knowledge/components/prior-knowledge-pill/prior-knowledge-pill.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<div class="knowledge-pill" | ||
[class]="badgeCSSClass(knowledge().color)" | ||
ngbTooltip="{{ remark() }}" | ||
[tooltipClass]="tooltipCSSClass(knowledge().color)" | ||
triggers="mouseenter:mouseleave" | ||
[openDelay]="300" | ||
[closeDelay]="150"> | ||
<div class="knowledge-pill-title">{{ knowledge().name }}</div> | ||
</div> |
Empty file.
24 changes: 24 additions & 0 deletions
24
...pp/prior-knowledge/components/prior-knowledge-pill/prior-knowledge-pill.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import {ComponentFixture, TestBed} from '@angular/core/testing'; | ||
|
||
import {PriorKnowledgePillComponent} from './prior-knowledge-pill.component'; | ||
|
||
|
||
describe('PriorKnowledgePillComponent', () => { | ||
let component: PriorKnowledgePillComponent; | ||
let fixture: ComponentFixture<PriorKnowledgePillComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
imports: [PriorKnowledgePillComponent] | ||
}) | ||
.compileComponents(); | ||
|
||
fixture = TestBed.createComponent(PriorKnowledgePillComponent); | ||
component = fixture.componentInstance; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it('should create', () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.