fix: height in versionsExplorer

This commit is contained in:
aurinex
2025-07-21 22:50:26 +05:00
parent 9746847ebf
commit 83a0e308bc

View File

@ -280,6 +280,9 @@ export const VersionsExplorer = () => {
paddingLeft: '5vw',
paddingRight: '5vw',
position: 'relative',
flexGrow: 1,
height: 'calc(100vh - 64px)',
overflow: 'hidden',
}}
>
{/* Глобальный фоновый слой для размытия всего интерфейса */}
@ -307,10 +310,13 @@ export const VersionsExplorer = () => {
spacing={3}
sx={{
width: '100%',
height: '100%',
overflowY: 'auto',
justifyContent: 'center',
alignContent: 'center',
position: 'relative',
zIndex: 6, // Выше чем фоновый слой размытия
zIndex: 6,
padding: '2vh 0',
}}
>
{/* Показываем установленные версии или дефолтную, если она есть */}
@ -318,7 +324,15 @@ export const VersionsExplorer = () => {
installedVersions.map((version) => (
<Grid
key={version.id}
size={{ xs: 'auto', sm: 'auto', md: 'auto' }}
item
xs={12}
sm={6}
md={4}
sx={{
display: 'flex',
justifyContent: 'center',
marginBottom: '2vh',
}}
>
<VersionCard
id={version.id}
@ -337,14 +351,34 @@ export const VersionsExplorer = () => {
))
) : (
// Если нет ни одной версии, показываем карточку добавления
<Grid size={{ xs: 'auto', sm: 'auto', md: 'auto' }}>
<Grid
item
xs={12}
sm={6}
md={4}
sx={{
display: 'flex',
justifyContent: 'center',
marginBottom: '2vh',
}}
>
<AddVersionCard />
</Grid>
)}
{/* Всегда добавляем карточку для добавления новых версий */}
{installedVersions.length > 0 && (
<Grid size={{ xs: 'auto', sm: 'auto', md: 'auto' }}>
<Grid
item
xs={12}
sm={6}
md={4}
sx={{
display: 'flex',
justifyContent: 'center',
marginBottom: '2vh',
}}
>
<AddVersionCard />
</Grid>
)}