From c0382cd2311fdee6f127ff268f5989b9409bc09f Mon Sep 17 00:00:00 2001 From: Henrik Date: Mon, 18 Mar 2024 18:19:22 +0100 Subject: [PATCH] [TASK] Show total links count on hover and toggle on click --- resources/js/Components/LinkList/LinkList.svelte | 2 +- resources/js/Components/Pagination.svelte | 11 ++++++++--- resources/js/Pages/PublicLink/Show.svelte | 2 +- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/resources/js/Components/LinkList/LinkList.svelte b/resources/js/Components/LinkList/LinkList.svelte index 98bf218..18cfc5e 100644 --- a/resources/js/Components/LinkList/LinkList.svelte +++ b/resources/js/Components/LinkList/LinkList.svelte @@ -274,7 +274,7 @@ {#if links.data.length && links.total > links.per_page} + totalPages={Math.trunc(links.total / links.per_page) + 1} totalLinks={links.total}/> {/if} bulkEditLinks(bulkEditingAction)} bind:this={groupSelectMenu} bind:selectedGroups/> diff --git a/resources/js/Components/Pagination.svelte b/resources/js/Components/Pagination.svelte index f7ee13e..dc147c4 100644 --- a/resources/js/Components/Pagination.svelte +++ b/resources/js/Components/Pagination.svelte @@ -5,13 +5,18 @@ export let nextPageUrl = ''; export let currentPage = 0; export let totalPages = 0; + export let totalLinks = 0; + + let showLinksCount = false;