Add genlocke list and detail pages
Add GET /genlockes and GET /genlockes/{id} endpoints with aggregate
encounter/death stats per leg, and a frontend list page at /genlockes
plus a detail page at /genlockes/:genlockeId showing progress timeline,
cumulative stats, configuration, retired families, and quick actions.
Update nav link to point to the list page instead of /genlockes/new.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -236,3 +236,51 @@ export interface CreateGenlockeInput {
|
||||
genlockeRules: GenlockeRules
|
||||
nuzlockeRules: NuzlockeRules
|
||||
}
|
||||
|
||||
// Genlocke list / detail types
|
||||
|
||||
export interface GenlockeLegDetail {
|
||||
id: number
|
||||
legOrder: number
|
||||
game: Game
|
||||
runId: number | null
|
||||
runStatus: RunStatus | null
|
||||
encounterCount: number
|
||||
deathCount: number
|
||||
retiredPokemonIds: number[] | null
|
||||
}
|
||||
|
||||
export interface GenlockeStats {
|
||||
totalEncounters: number
|
||||
totalDeaths: number
|
||||
legsCompleted: number
|
||||
totalLegs: number
|
||||
}
|
||||
|
||||
export interface GenlockeListItem {
|
||||
id: number
|
||||
name: string
|
||||
status: 'active' | 'completed' | 'failed'
|
||||
createdAt: string
|
||||
totalLegs: number
|
||||
completedLegs: number
|
||||
currentLegOrder: number | null
|
||||
}
|
||||
|
||||
export interface RetiredPokemon {
|
||||
id: number
|
||||
name: string
|
||||
spriteUrl: string | null
|
||||
}
|
||||
|
||||
export interface GenlockeDetail {
|
||||
id: number
|
||||
name: string
|
||||
status: 'active' | 'completed' | 'failed'
|
||||
genlockeRules: GenlockeRules
|
||||
nuzlockeRules: NuzlockeRules
|
||||
createdAt: string
|
||||
legs: GenlockeLegDetail[]
|
||||
stats: GenlockeStats
|
||||
retiredPokemon: Record<number, RetiredPokemon>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user