From 008fc75f7bbd09bbb680fc653ea6ceeb777afe9c Mon Sep 17 00:00:00 2001 From: metamethods Date: Fri, 3 Jan 2025 01:19:27 -0800 Subject: [PATCH] feat: pagination on archived rooms --- src/lib/Pagination.svelte | 40 +++++++++++++++++++++++++++++++++++++++ src/routes/+page.svelte | 22 ++++++++++++--------- 2 files changed, 53 insertions(+), 9 deletions(-) create mode 100644 src/lib/Pagination.svelte diff --git a/src/lib/Pagination.svelte b/src/lib/Pagination.svelte new file mode 100644 index 0000000..4a5dff2 --- /dev/null +++ b/src/lib/Pagination.svelte @@ -0,0 +1,40 @@ + + +
+

+ Showing {pageIndexStart + 1} to + {pageIndexEnd} + of {items.length} + Entries +

+ +
+ + +
+
+ + diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index c2c5588..750a1f9 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,15 +1,17 @@ -
+
-

yukiotoko webui

+

yukiotoko webui

a frontend redesign for yukiotoko

refresh the page to fetch newer yukiotoko data

@@ -18,14 +20,14 @@
-

- active rooms ({data.activeRooms.length}) +

+ active rooms ({activeRooms.length})

all of the currently matchmaking rooms

- {#each data.activeRooms as activeRoom} + {#each activeRooms as activeRoom} {/each}
@@ -33,14 +35,16 @@
-

+

archived rooms ({data.archivedRooms.length})

rooms that were created from the last 24 hours

+ +
- {#each data.archivedRooms as archivedRoom} + {#each paginationArchivedRooms as archivedRoom} {/each}