data(*): Add final data changes

This commit is contained in:
Josh Creek
2026-01-17 23:30:40 +00:00
parent 479b3ae7a0
commit 46351c9af0
29 changed files with 12187 additions and 122 deletions
@@ -1,6 +1,6 @@
<script lang="ts">
import type { CatchRecord } from '$lib/models/CatchRecord';
import type { PokedexEntry } from '$lib/models/PokedexEntry';
import type { CatchInformationItem, PokedexEntry } from '$lib/models/PokedexEntry';
import PokemonSprite from '../PokemonSprite.svelte';
import { createEventDispatcher } from 'svelte';
@@ -31,6 +31,10 @@
type UpdateCatchSource = 'toggle' | 'notes' | 'notes-blur';
const isCatchInformationItem = (
value: string | CatchInformationItem
): value is CatchInformationItem => typeof value !== 'string';
function updateCatchRecord(source: UpdateCatchSource) {
dispatch('updateCatch', { pokedexEntry, catchRecord, source });
}
@@ -193,11 +197,15 @@
<ul class="list-disc list-inside">
{#each pokedexEntry.catchInformation as info}
<li>
<ul>
<li><strong>Game:</strong> {info.game}</li>
<li><strong>Location:</strong> {info.location}</li>
<li><strong>Notes:</strong> {info.notes}</li>
</ul>
{#if isCatchInformationItem(info)}
<ul>
<li><strong>Game:</strong> {info.game}</li>
<li><strong>Location:</strong> {info.location}</li>
<li><strong>Notes:</strong> {info.notes}</li>
</ul>
{:else}
{info}
{/if}
</li>
{/each}
</ul>