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:
Maurice
2026-11-13 15:28:55 +01:00
parent c2c0535d52
commit 3365511b10
3 changed files with 8 additions and 7 deletions
@@ -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={{
+1 -1
View File
@@ -3612,7 +3612,7 @@ const help: TranslationStrings = {
'help.guide.booking-files.step.2':
'Das Dokument erscheint mit seinem Namen, einem Button zum Öffnen und einem X daneben.',
'help.guide.booking-files.step.3':
'„Vorhandene verknüpfen“ bietet die Dokumente der Reise an, die noch nicht an dieser Buchung hängen. Wähle eines aus, und es wird angehängt, ohne erneut hochgeladen zu werden.',
'„Datei verknüpfen“ bietet die Dokumente der Reise an, die noch nicht an dieser Buchung hängen. Wähle eines aus, und es wird angehängt, ohne erneut hochgeladen zu werden.',
'help.guide.booking-files.step.4': 'Klick auf „Aktualisieren“.',
'help.guide.booking-files.result':
'Karte und Details listen die Dokumente unter „Dateien“ auf; ein Klick auf eins öffnet es. „In Dateien zeigen“ über der Liste in den Details bringt dich zum Tab „Dateien“.',
+1 -1
View File
@@ -104,7 +104,7 @@ const reservations: TranslationStrings = {
'reservations.pendingSave': 'wird gespeichert…',
'reservations.uploading': 'Wird hochgeladen...',
'reservations.attachFile': 'Datei anhängen',
'reservations.linkExisting': 'Vorhandene verknüpfen',
'reservations.linkExisting': 'Datei verknüpfen',
'reservations.linkAssignment': 'Mit Tagesplanung verknüpfen',
'reservations.linkedTo': 'Verknüpft mit',
'reservations.pickAssignment': 'Zuordnung aus dem Plan wählen...',