-
{{ playerDetail.username | capitalizeWords }}
-
{{ playerDetail.combatLevel }}
-
{{ playerDetail.type }}
- @if (playerDetail.type === PlayerType.Hardcore) {
+
{{ playerDetail().username | capitalizeWords }}
+
{{ playerDetail().combatLevel }}
+
{{ playerDetail().type }}
+ @if (playerDetail().type === PlayerType.Hardcore) {
- @if (playerDetail.diedAsHardcore) {
+ @if (playerDetail().diedAsHardcore) {
dead
} @else {
alive
}
}
- @if (playerDetail.diedAsHardcore) {
-
{{ playerDetail.status }}
+ @if (playerDetail().diedAsHardcore) {
+
{{ playerDetail().status }}
}
- @if (playerDetail.type !== PlayerType.Normal && playerDetail.status !== PlayerStatus.Default) {
-
{{ playerDetail.status }}
+ @if (playerDetail().type !== PlayerType.Normal && playerDetail().status !== PlayerStatus.Default) {
+
{{ playerDetail().status }}
}
- @if (playerDetail.type !== PlayerType.Normal) {
-
{{ playerDetail.lastModified | date: 'MMMM dd, HH:mm' }}
+ @if (playerDetail().type !== PlayerType.Normal) {
+
{{ playerDetail().lastModified | date: 'MMMM dd, HH:mm' }}
}
diff --git a/src/app/features/trackers/xp-tracker/player-detail/player-detail-widget/player-detail-widget.component.ts b/src/app/features/trackers/xp-tracker/player-detail/player-detail-widget/player-detail-widget.component.ts
index 003e284..49686c8 100644
--- a/src/app/features/trackers/xp-tracker/player-detail/player-detail-widget/player-detail-widget.component.ts
+++ b/src/app/features/trackers/xp-tracker/player-detail/player-detail-widget/player-detail-widget.component.ts
@@ -1,5 +1,5 @@
import { DatePipe } from '@angular/common';
-import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
+import { Component, Input, InputSignal, input } from '@angular/core';
import { Hiscore } from '@osrs-tracker/hiscores';
import { Player, PlayerStatus, PlayerType } from '@osrs-tracker/models';
import { IconDirective } from 'src/app/common/directives/icon/icon.directive';
@@ -11,18 +11,16 @@ import { XpTrackerStorageService } from '../../xp-tracker-storage.service';
standalone: true,
selector: 'player-detail-widget',
templateUrl: './player-detail-widget.component.html',
- changeDetection: ChangeDetectionStrategy.OnPush,
imports: [CapitalizePipe, DatePipe, IconDirective],
})
export class PlayerDetailWidgetComponent {
readonly PlayerType: typeof PlayerType = PlayerType;
readonly PlayerStatus: typeof PlayerStatus = PlayerStatus;
- @Input() playerDetail: Player;
- @Input() today?: Hiscore;
+ playerDetail: InputSignal