mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-14 08:11:03 +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={{
|
||||
|
||||
@@ -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“.',
|
||||
|
||||
@@ -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...',
|
||||
|
||||
Reference in New Issue
Block a user