Skip to content

A self-hosted media server and file management system

fix: Table Pagination Control Scaling Fixes #296

aminnausin919d2b59efb3
diff --git a/resources/js/components/cedar-ui/table/TablePagination.vue b/resources/js/components/cedar-ui/table/TablePagination.vue
index 9d6628af..1502ae94 100644
--- a/resources/js/components/cedar-ui/table/TablePagination.vue
+++ b/resources/js/components/cedar-ui/table/TablePagination.vue
@@ -50,7 +50,7 @@ const handleSetPage = async (page: number) => {
</script>
<template>
- <div class="flex scroll-mb-12 flex-col flex-wrap items-center gap-2 text-sm sm:flex-row sm:justify-between" ref="$element">
+ <div class="@container flex max-w-full scroll-mb-12 flex-col flex-wrap items-center gap-2 text-sm sm:flex-row sm:justify-between" ref="$element">
<p class="dark:text-foreground-7 line-clamp-1">
Showing
<span class="dark:text-foreground-0 font-medium">{{ props.listLength ? props.itemsPerPage * (currentPage - 1) + 1 : 0 }}</span>
@@ -73,10 +73,10 @@ const handleSetPage = async (page: number) => {
<ProiconsChevronLeft class="size-4" title="Previous" />
</template>
<template #content v-else>
- <span class="hidden sm:block">
+ <span class="hidden @xs:block">
{{ 'Previous' }}
</span>
- <ProiconsChevronLeft class="size-4 sm:hidden" title="Previous" />
+ <ProiconsChevronLeft class="size-4 @xs:hidden" title="Previous" />
</template>
</TablePaginationButton>
@@ -117,10 +117,10 @@ const handleSetPage = async (page: number) => {
<ProiconsChevronRight class="size-4" title="Next" />
</template>
<template #content v-else>
- <span class="hidden sm:block">
+ <span class="hidden @xs:block">
{{ 'Next' }}
</span>
- <ProiconsChevronRight class="size-4 sm:hidden" title="Next" />
+ <ProiconsChevronRight class="size-4 @xs:hidden" title="Next" />
</template>
</TablePaginationButton>
</ul>
diff --git a/resources/js/components/cedar-ui/table/TablePaginationButton.vue b/resources/js/components/cedar-ui/table/TablePaginationButton.vue
index c3fdbc71..3b1bc79d 100644
--- a/resources/js/components/cedar-ui/table/TablePaginationButton.vue
+++ b/resources/js/components/cedar-ui/table/TablePaginationButton.vue
@@ -11,7 +11,7 @@ const props = withDefaults(defineProps<TablePaginationButtonProps>(), {
</script>
<template>
- <li :class="{ hidden: currentPage !== pageNumber && !text && !sticky }" class="h-full md:block">
+ <li :class="{ hidden: currentPage !== pageNumber && !text && !sticky }" class="h-full @xs:block">
<button-base
class="group hover:text-foreground-0 disabled:text-foreground-2 pointer-events-auto! relative inline-flex h-full rounded-none px-3"
:class="{
diff --git a/resources/js/components/panels/FolderSidebar.vue b/resources/js/components/panels/FolderSidebar.vue
index 7d9f8c83..e9378a71 100644
--- a/resources/js/components/panels/FolderSidebar.vue
+++ b/resources/js/components/panels/FolderSidebar.vue
@@ -101,7 +101,7 @@ const handleFolderAction = (e: Event, id: number, action: 'edit' | 'share' = 'ed
:max-visible-pages="3"
:table-styles="cn('gap-3 sm:gap-2')"
:pagination-class="'justify-center! flex-col-reverse!'"
- :use-pagination-icons="true"
+ :use-pagination-icons="false"
:sort-action="
(sortKey: keyof FolderResource, sortDir: SortDir) => {
folderSortDir = sortDir;