tweak(dashboard): properly change items per page when switching view

This commit is contained in:
Jake Fulmine
2022-11-27 20:07:35 +01:00
parent 217afee8a0
commit 9cc4b12130
3 changed files with 45 additions and 27 deletions

View File

@@ -184,6 +184,7 @@
<Alert color="danger">{memberErr}</Alert>
{:else if lists.rawList && lists.rawList.length > 0}
<PageControl bind:options={listOptions} bind:pageOptions />
<span class="itemcounter">{lists.processedList.length} {pageOptions.type}s ({lists.currentPage.length} shown)</span>
<ListPagination bind:currentPage={pageOptions.currentPage} {pageAmount} />
{#if pageOptions.view === "card"}
<CardView {pageOptions} {lists} otherList={nope} on:update={update} />
@@ -207,6 +208,13 @@
min-height: 100%;
z-index: -30;
}
.itemcounter {
width: 100%;
text-align: center;
display: inline-block;
margin-bottom: 0.5rem;
}
</style>
<svelte:head>

View File

@@ -182,6 +182,7 @@
<Alert color="danger">{groupErr}</Alert>
{:else if lists.rawList && lists.rawList.length > 0}
<PageControl bind:options={listOptions} bind:pageOptions />
<span class="itemcounter">{lists.processedList.length} {pageOptions.type}s ({lists.currentPage.length} shown)</span>
<ListPagination bind:currentPage={pageOptions.currentPage} {pageAmount} />
{#if pageOptions.view === "card"}
<CardView {pageOptions} {lists} otherList={nope} on:update={update} />
@@ -205,6 +206,13 @@
min-height: 100%;
z-index: -30;
}
.itemcounter {
width: 100%;
text-align: center;
display: inline-block;
margin-bottom: 0.5rem;
}
</style>
<svelte:head>