From f7bf4d95b324353b9e26f339217f2caa3f34723e Mon Sep 17 00:00:00 2001 From: Johannes Zillmann Date: Sat, 24 Apr 2021 00:24:07 +0200 Subject: [PATCH] Page selection popup: from grid to flexbox --- ui/src/debug/PageSelectionPopup.svelte | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/ui/src/debug/PageSelectionPopup.svelte b/ui/src/debug/PageSelectionPopup.svelte index 6064db6..99f0c9a 100644 --- a/ui/src/debug/PageSelectionPopup.svelte +++ b/ui/src/debug/PageSelectionPopup.svelte @@ -23,17 +23,33 @@ } -
+
-
+
{#each new Array(pageControl.totalPages) as _, idx}
pageControl.pageHasItems(idx) && pinPage(idx)} - class="px-2 border border-gray-300 rounded-full text-center {pageControl.pageHasItems(idx) ? ($pinnedPageIndex === idx ? 'bg-select' : 'hover:text-select hover:border-select cursor-pointer') : 'opacity-50'}"> + class="flex-grow-0 px-2 w-12 max-w-xs border border-gray-300 rounded-full text-center {pageControl.pageHasItems(idx) ? ($pinnedPageIndex === idx ? 'bg-select' : 'hover:text-select hover:border-select cursor-pointer') : 'opacity-50'}" + on:click={() => pageControl.pageHasItems(idx) && pinPage(idx)}> {#if showIndex}{idx}{:else}{$pageMapping.pageLabel(idx)}{/if}
{/each}
+ +