-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Development: Update LTI components to use Angular 18 practices (#9908)
- Loading branch information
1 parent
1802aa0
commit 7a6ba30
Showing
21 changed files
with
261 additions
and
192 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
4 changes: 2 additions & 2 deletions
4
src/main/webapp/app/admin/lti-configuration/lti-configuration.service.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
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
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 |
---|---|---|
@@ -1,20 +1,28 @@ | ||
import { Component, Input, OnChanges } from '@angular/core'; | ||
import { Component, effect, input } from '@angular/core'; | ||
import { Course } from 'app/entities/course.model'; | ||
import { ARTEMIS_DEFAULT_COLOR } from 'app/app.constants'; | ||
import { CachingStrategy } from 'app/shared/image/secured-image.component'; | ||
import { RouterLink } from '@angular/router'; | ||
import { NgStyle } from '@angular/common'; | ||
import { ArtemisSharedModule } from 'app/shared/shared.module'; | ||
|
||
@Component({ | ||
selector: 'jhi-overview-lti-course-card', | ||
templateUrl: './lti-course-card.component.html', | ||
styleUrls: ['../overview/course-card.scss'], | ||
standalone: true, | ||
imports: [RouterLink, NgStyle, ArtemisSharedModule], | ||
}) | ||
export class LtiCourseCardComponent implements OnChanges { | ||
export class LtiCourseCardComponent { | ||
readonly ARTEMIS_DEFAULT_COLOR = ARTEMIS_DEFAULT_COLOR; | ||
@Input() course: Course; | ||
course = input.required<Course>(); | ||
CachingStrategy = CachingStrategy; | ||
courseColor: string; | ||
|
||
ngOnChanges() { | ||
this.courseColor = this.course.color || this.ARTEMIS_DEFAULT_COLOR; | ||
constructor() { | ||
effect(() => { | ||
const courseValue = this.course(); | ||
this.courseColor = courseValue?.color || this.ARTEMIS_DEFAULT_COLOR; | ||
}); | ||
} | ||
} |
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
13 changes: 7 additions & 6 deletions
13
src/main/webapp/app/lti/lti13-dynamic-registration.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
Oops, something went wrong.