Fix mobile calendar view

This commit is contained in:
Joshua Schmucker 2026-02-06 14:47:37 +01:00
parent fcaf0c4c8a
commit c519f4b11f

View File

@ -252,11 +252,14 @@ const ResourceCalendar: React.FC = () => {
? '#d4edda'
: isToday(day) ? '#f8f9fa' : 'white',
fontSize: '0.7rem',
minHeight: '35px',
minHeight: isMobile ? '40px' : '35px',
height: isMobile ? '40px' : '35px',
display: 'flex',
alignItems: 'center',
justifyContent: 'center',
position: 'relative'
position: 'relative',
overflow: 'hidden',
boxSizing: 'border-box'
}}
>
{reservation && (
@ -264,32 +267,40 @@ const ResourceCalendar: React.FC = () => {
textAlign: 'center',
color: '#333',
fontWeight: '500',
padding: '0.2rem',
padding: '2px',
width: '100%',
height: '100%',
overflow: 'hidden',
display: 'flex',
flexDirection: 'column',
justifyContent: 'center'
alignItems: 'center',
justifyContent: 'center',
boxSizing: 'border-box'
}}>
<div style={{
fontWeight: 'bold',
fontSize: '0.6rem',
lineHeight: '1.2',
fontSize: isMobile ? '0.5rem' : '0.6rem',
lineHeight: '1',
overflow: 'hidden',
display: '-webkit-box',
WebkitLineClamp: 2,
WebkitBoxOrient: 'vertical'
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
width: '100%',
maxWidth: '100%'
}}>
{reservation.title}
{isMobile && reservation.title.length > 8
? reservation.title.substring(0, 8) + '...'
: reservation.title
}
</div>
{!isMobile && (
<div style={{
fontSize: '0.55rem',
opacity: 0.8,
lineHeight: '1'
lineHeight: '1',
marginTop: '1px'
}}>
{format(new Date(reservation.startDate), 'h:mm')}
</div>
)}
</div>
)}
</div>