feat(MediaManager): improve URL display handling with LTR embedding for better BiDi support
This commit is contained in:
parent
507be5eeab
commit
e6dabbe0a6
|
|
@ -1300,15 +1300,20 @@ export default function MediaManager({ initialPath, rootPath, title, config, set
|
||||||
<HardDrive className={`w-5 h-5 flex-shrink-0 ${dev.enabled ? 'text-blue-500' : 'text-neutral-400'}`} />
|
<HardDrive className={`w-5 h-5 flex-shrink-0 ${dev.enabled ? 'text-blue-500' : 'text-neutral-400'}`} />
|
||||||
<div className="min-w-0 flex-1">
|
<div className="min-w-0 flex-1">
|
||||||
<div className="font-medium text-sm">Device #{dev.key}</div>
|
<div className="font-medium text-sm">Device #{dev.key}</div>
|
||||||
{(dev.base_url || dev.url) && (
|
{(dev.base_url || dev.url) && (() => {
|
||||||
<div
|
const displayUrl = [dev.base_url, dev.url]
|
||||||
className="text-xs text-neutral-500 overflow-hidden whitespace-nowrap"
|
.filter(Boolean).join('');
|
||||||
style={{ direction: 'rtl', textOverflow: 'ellipsis' }}
|
return (
|
||||||
title={[dev.base_url, dev.url].filter(Boolean).join('').replace(/\/$/, '')}
|
<div
|
||||||
>
|
className="text-xs text-neutral-500 overflow-hidden whitespace-nowrap"
|
||||||
{[dev.base_url, dev.url].filter(Boolean).join('').replace(/\/$/, '')}
|
style={{ direction: 'rtl', textOverflow: 'ellipsis' }}
|
||||||
</div>
|
title={displayUrl}
|
||||||
)}
|
>
|
||||||
|
{/* LTR embed prevents BiDi from reordering the leading '/' to the visual right */}
|
||||||
|
<span style={{ direction: 'ltr', unicodeBidi: 'embed' }}>{displayUrl}</span>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
})()}
|
||||||
</div>
|
</div>
|
||||||
{!dev.enabled && <span className="text-xs text-neutral-400 flex-shrink-0">disabled</span>}
|
{!dev.enabled && <span className="text-xs text-neutral-400 flex-shrink-0">disabled</span>}
|
||||||
</button>
|
</button>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user