Refactor GalleryPanel and GalleryBrowser for improved layout and functionality
ci / build-backend (push) Successful in 2m54s
ci / build-frontend (push) Failing after 24s
ci / tests (push) Skipped
ci / sonar (push) Skipped

Updated the GalleryPanel component to ensure it occupies the full screen height, enhancing the user experience by preventing dual scrollbars. Modified the GalleryBrowser to support a new 'fill' prop, allowing it to adapt its layout based on the context, and adjusted the internal scrolling behavior accordingly. These changes improve the overall usability and visual consistency of the image gallery interface.
This commit is contained in:
Leonid Pershin
2026-07-27 11:48:19 +03:00
parent 61f934d19f
commit 860cde19a3
4 changed files with 35 additions and 10 deletions
@@ -1,14 +1,19 @@
import { useTranslation } from 'react-i18next'
import { GalleryBrowser } from './ImageGallery'
/** Отдельная страница «Галерея»: просмотр/загрузка/удаление всех изображений приложения. */
/**
* Отдельная страница «Галерея»: просмотр/загрузка/удаление всех изображений приложения.
*
* Страница занимает экран целиком и сама не прокручивается: списка на сотни картинок здесь нет
* пагинации, и две полосы прокрутки — внешняя и внутри сетки — мешали бы друг другу.
*/
export function GalleryPanel() {
const { t } = useTranslation()
return (
<div className="flex flex-col gap-4">
<div className="flex h-[calc(100vh-13rem)] min-h-96 flex-col gap-4">
<h2 className="crt-glow text-xl font-semibold">{t('admin.gallery.title')}</h2>
<div className="crt-panel rounded-md p-4">
<GalleryBrowser />
<div className="crt-panel flex min-h-0 flex-1 flex-col rounded-md p-4">
<GalleryBrowser fill />
</div>
</div>
)