feat(#46): Merge boxes view into my dex page

This commit is contained in:
Josh Creek
2024-07-17 22:07:07 +01:00
parent 02a2160f08
commit bfde0c49f5
5 changed files with 142 additions and 223 deletions
@@ -1,4 +1,10 @@
<script lang="ts">
import Pagination from '$lib/components/Pagination.svelte';
export let viewAsBoxes = false;
export let currentPage = 1;
export let itemsPerPage = 20;
export let totalPages = 0;
export let showForms = true;
export let showOrigins = true;
export let showShiny = false;
@@ -104,4 +110,11 @@
<option value="Go">Go (Unknown)</option>
</select>
</div>
{#if !viewAsBoxes}
<h2 class="text-2xl font-semibold mb-4">Paging</h2>
<div>
<Pagination bind:currentPage bind:itemsPerPage bind:totalPages />
</div>
{/if}
</aside>
@@ -33,7 +33,7 @@
if (catchRecord.caught || catchRecord.haveToEvolve) {
return '';
} else {
if (pokedexEntry.boxPlacementForms.column % 2 === 0) {
if (pokedexEntry[currentPlacement].column % 2 === 0) {
return 'background-color: #ffffff';
} else {
return 'background-color: #f9f9f9;';