mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-23 13:23:04 +00:00
fix(bookings): the file buttons of a booking never wrap their label
"Vorhandene verknüpfen" broke onto two lines in the narrow half of the booking dialog. The labels now truncate instead of wrapping, and the German label is the shorter "Datei verknüpfen", matching "Datei anhängen".
This commit is contained in:
@@ -35,7 +35,7 @@ export function BookingFileButtons({ canAttach, uploading, onAttach, linkable, o
|
||||
|
||||
const buttonClass = 'bg-surface-secondary border border-edge text-content transition-colors hover:bg-surface-tertiary disabled:cursor-default disabled:opacity-60'
|
||||
const buttonStyle = {
|
||||
width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 8, padding: '8px 13px',
|
||||
width: '100%', minWidth: 0, display: 'flex', whiteSpace: 'nowrap', alignItems: 'center', justifyContent: 'center', gap: 8, padding: '8px 13px',
|
||||
borderRadius: 10, fontSize: 'calc(13px * var(--fs-scale-body, 1))', fontWeight: 600, cursor: 'pointer', fontFamily: 'inherit',
|
||||
} as const
|
||||
|
||||
@@ -43,14 +43,15 @@ export function BookingFileButtons({ canAttach, uploading, onAttach, linkable, o
|
||||
<div style={{ display: 'grid', gridTemplateColumns: canAttach && canLink ? '1fr 1fr' : '1fr', gap: 8 }}>
|
||||
{canAttach && (
|
||||
<button type="button" onClick={onAttach} disabled={uploading} className={buttonClass} style={buttonStyle}>
|
||||
<Paperclip size={14} />
|
||||
{uploading ? t('reservations.uploading') : t('reservations.attachFile')}
|
||||
<Paperclip size={14} className="flex-none" />
|
||||
<span className="min-w-0 truncate">{uploading ? t('reservations.uploading') : t('reservations.attachFile')}</span>
|
||||
</button>
|
||||
)}
|
||||
{canLink && (
|
||||
<div ref={pickerRef} style={{ position: 'relative' }}>
|
||||
<div ref={pickerRef} style={{ position: 'relative', minWidth: 0 }}>
|
||||
<button type="button" onClick={() => setOpen(v => !v)} aria-expanded={open} className={buttonClass} style={buttonStyle}>
|
||||
<Link2 size={14} /> {t('reservations.linkExisting')}
|
||||
<Link2 size={14} className="flex-none" />
|
||||
<span className="min-w-0 truncate">{t('reservations.linkExisting')}</span>
|
||||
</button>
|
||||
{open && (
|
||||
<div className="bg-surface-card" style={{
|
||||
|
||||
Reference in New Issue
Block a user