Refactor GalleryPanel and GalleryBrowser for improved layout and functionality
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:
@@ -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>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user