fix(ui): prevent long relay URLs from causing horizontal overflow on mobile

- Add relay-url className to relay URL elements
- Override inline nowrap styles on mobile with word-break: break-all
- Allow relay URLs to wrap across multiple lines on mobile
- Prevent horizontal overflow from long relay names like proxy URLs
This commit is contained in:
Gigi
2025-10-13 23:55:35 +02:00
parent caa07012a7
commit 3d7b649cba
2 changed files with 32 additions and 7 deletions

View File

@@ -100,13 +100,16 @@ const RelaySettings: React.FC<RelaySettingsProps> = ({ relayStatuses }) => {
}}
/>
<div style={{ flex: 1, minWidth: 0 }}>
<div style={{
fontSize: '0.9rem',
fontFamily: 'var(--font-mono, monospace)',
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis'
}}>
<div
className="relay-url"
style={{
fontSize: '0.9rem',
fontFamily: 'var(--font-mono, monospace)',
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis'
}}
>
{formatRelayUrl(relay.url)}
</div>
</div>

View File

@@ -96,6 +96,15 @@
color: rgb(161 161 170); /* zinc-400 */
}
/* Relay items */
.relay-item {
max-width: 100%;
}
.relay-url {
max-width: 100%;
}
/* Mobile responsive styles */
@media (max-width: 768px) {
.settings-view {
@@ -122,6 +131,19 @@
flex: 1 1 auto;
min-width: 70px;
}
.relay-item {
max-width: 100%;
overflow-x: hidden;
}
.relay-url {
white-space: normal !important;
word-break: break-all !important;
overflow: visible !important;
text-overflow: unset !important;
line-height: 1.4;
}
}