Reconciles Slice 0.6.5 (Renown & Reputation Foundation) against master's persistent-HP-and-regeneration slice, which landed independently and touches several of the same files (Character entity, CombatService, EquipmentService, the inventory detail panel). Conflict resolutions: - CharacterStatsService/EquipmentService constructor wiring: kept master's CharacterVitalsService injection, which this branch's version of the same files didn't have yet. - CombatService.performAction: kept master's HP-guard logic (characterTooWounded, vitals pause-on-enter) alongside this branch's multi-line calculate() call style. - Inventory detail panel (.html/.ts/.scss/.spec.ts): master had redesigned the panel (wrapping section, rarity styling, flavour text, a shared inventory.labels.ts) on top of the OLD level-gated component, since this branch's removal of the level gate (R4, Task 8/14) hadn't reached master yet. Kept master's visual redesign in full, but with the level-gate concept removed throughout: no requiredLevel stat block, no meetsLevelRequirement() branch in the equip button, no now-dead .detail__value--unmet SCSS rule. Kept both branches' independent tests (non-equippable-item, flavour-text). - inventory-page.component.ts: dropped master's dead characterLevel computed (nothing in the template read it, and the level concept is gone); kept its independent bagCells/bagUsed/bagCapacity grid feature, which has nothing to do with renown or level. Post-merge fixture repairs (three files failed the Angular bundle compile because they predate master's hpRegenPerSecond/hpRegenSince fields or master's item description field, neither conflict-marked since git considered them non-overlapping edits): - app.spec.ts: a 'renders loaded character values' test added on master after this branch forked still used the abolished level/ experience fields on its decoy fixture -- retargeted to renown. - inventory-detail-panel.component.spec.ts: the ashPelt fixture added by this branch's final-review follow-up predates master's required description field. - top-bar.component.spec.ts: this branch's fixture predates master's required hpRegenPerSecond/hpRegenSince fields. No database migration touches the same column: master's 1792000000000-AddHpRegeneration only adds characters.hp_regen_since, independent of this slice's 1791000000000-CreateRenownAndReputation. Timestamp ordering between the two was already correct with no rename needed. Verified: API 288/288 (267 from this slice + 21 from master), API build zero errors, web 237/237 (230 from this slice + 7 from master). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
69 lines
2.3 KiB
HTML
69 lines
2.3 KiB
HTML
<section class="ar-panel detail" aria-label="Gewählter Gegenstand">
|
|
<h2 class="ar-panel__title">Gewählter Gegenstand</h2>
|
|
|
|
@if (item(); as item) {
|
|
<article
|
|
class="detail__body"
|
|
[class.detail__body--rare]="item.item.rarity === 'RARE'"
|
|
[class.detail__body--epic]="item.item.rarity === 'EPIC'"
|
|
>
|
|
<header class="detail__head">
|
|
<span class="detail__portrait">
|
|
<img [src]="item.item.iconPath" [alt]="item.item.name" />
|
|
</span>
|
|
<div class="detail__ident">
|
|
<h3 class="detail__name" data-detail-name>{{ item.item.name }}</h3>
|
|
<p class="detail__rarity" data-detail-rarity>{{ rarityLabel() }}</p>
|
|
<p class="detail__slot">{{ slotLabel() ?? typeLabel() }}</p>
|
|
</div>
|
|
</header>
|
|
|
|
@if (statRows().length) {
|
|
<dl class="detail__stats" data-detail-stats>
|
|
@for (row of statRows(); track row.label) {
|
|
<div class="detail__stat">
|
|
<dt>{{ row.label }}</dt>
|
|
<dd>
|
|
<span class="detail__value">{{ row.value }}</span>
|
|
@if (row.diff !== null && row.diff !== 0) {
|
|
<span
|
|
class="detail__diff"
|
|
[class.detail__diff--positive]="row.diff > 0"
|
|
[class.detail__diff--negative]="row.diff < 0"
|
|
>
|
|
({{ row.diff > 0 ? '+' : '' }}{{ row.diff }})
|
|
</span>
|
|
}
|
|
</dd>
|
|
</div>
|
|
}
|
|
</dl>
|
|
}
|
|
|
|
@if (item.item.description) {
|
|
<p class="detail__flavour">{{ item.item.description }}</p>
|
|
}
|
|
|
|
<div class="detail__actions">
|
|
@if (item.equipped) {
|
|
<span class="detail__equipped" data-detail-equipped>Ausgerüstet</span>
|
|
} @else if (!isEquippable()) {
|
|
<span class="detail__note">Nicht ausrüstbar</span>
|
|
} @else {
|
|
<button
|
|
type="button"
|
|
class="detail__equip"
|
|
data-detail-equip
|
|
[disabled]="busy()"
|
|
(click)="onEquip()"
|
|
>
|
|
Ausrüsten
|
|
</button>
|
|
}
|
|
</div>
|
|
</article>
|
|
} @else {
|
|
<p class="detail__empty" data-detail-empty>Wähle einen Gegenstand aus deinem Inventar.</p>
|
|
}
|
|
</section>
|