feat: add hunt page, combat placeholder, and Jagd navigation
Wires up Slice 0.2 end-to-end: HuntPageComponent renders the hunting-unavailable/ready/loading/encounters-found states off HuntingStore and WorldStore, Angreifen hands the HuntEncounter id to a new inert CombatPlaceholderPageComponent via /combat/new, the Jagd nav entry is enabled with router-driven active state (matching Karte's), and the context panel now lists possible encounters for hunting-enabled locations. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,67 @@
|
||||
<section class="hunt-page" aria-label="Jagd">
|
||||
@if (worldStore.currentLocation(); as location) {
|
||||
@if (!location.huntingEnabled) {
|
||||
<section class="hunt-page__unavailable">
|
||||
<h2>Keine Jagd verfügbar</h2>
|
||||
<p>
|
||||
Am Südtor von Graufurt gibt es keine regulären Jagdgebiete. Reise in ein gefährlicheres
|
||||
Gebiet, um nach Gegnern zu suchen.
|
||||
</p>
|
||||
<button type="button" data-hunt-to-world (click)="goToWorld()">Zur Karte</button>
|
||||
</section>
|
||||
} @else if (huntingStore.currentHunt(); as hunt) {
|
||||
<section class="hunt-page__results" [attr.aria-label]="'Begegnungen bei ' + location.name">
|
||||
<p class="hunt-page__results-heading">{{ location.name }} — Begegnungen</p>
|
||||
|
||||
<div class="hunt-page__encounters">
|
||||
@for (encounter of huntingStore.encounters(); track encounter.id) {
|
||||
<app-encounter-card [encounter]="encounter" (attack)="onAttack($event)" />
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class="hunt-page__actions">
|
||||
<button
|
||||
type="button"
|
||||
data-hunt-refresh
|
||||
[disabled]="huntingStore.loading()"
|
||||
(click)="refreshHunt()"
|
||||
>
|
||||
Neu suchen
|
||||
</button>
|
||||
<button type="button" data-hunt-to-world (click)="goToWorld()">Zur Karte</button>
|
||||
</div>
|
||||
</section>
|
||||
} @else {
|
||||
<section class="hunt-page__ready">
|
||||
<h2>{{ location.name }}</h2>
|
||||
<p>{{ location.description }}</p>
|
||||
<p class="hunt-page__hint">
|
||||
Durchsuche die Umgebung nach Spuren und Gegnern, bevor du dich in den Kampf wagst.
|
||||
</p>
|
||||
<button
|
||||
type="button"
|
||||
data-hunt-start
|
||||
[disabled]="huntingStore.loading()"
|
||||
(click)="startHunt()"
|
||||
>
|
||||
Jagd beginnen
|
||||
</button>
|
||||
</section>
|
||||
}
|
||||
|
||||
@if (huntingStore.loading()) {
|
||||
<p class="hunt-page__loading" role="status">Du suchst nach Spuren...</p>
|
||||
}
|
||||
} @else {
|
||||
<section class="hunt-page__empty" aria-live="polite">
|
||||
<p>Jagdgebiet wird vorbereitet.</p>
|
||||
</section>
|
||||
}
|
||||
|
||||
@if (huntingStore.error(); as error) {
|
||||
<section class="hunt-page__error" role="alert">
|
||||
<p>{{ error }}</p>
|
||||
<button type="button" data-hunt-retry (click)="retry()">Erneut versuchen</button>
|
||||
</section>
|
||||
}
|
||||
</section>
|
||||
Reference in New Issue
Block a user