refactor(EasySwitchManager): simplify gateway information display by consolidating layout and enhancing clarity of comments
Publish Fast Tabler Docker image / build-and-push-fast (push) Failing after 3m33s
Publish Fast Tabler Docker image / build-and-push-fast (push) Failing after 3m33s
This commit is contained in:
@@ -915,8 +915,8 @@ function EasySwitchManager() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Информация о шлюзе в стиле фильтров: флаг, имя, IP */}
|
||||
<div className="d-flex align-items-start gap-2 mb-1">
|
||||
{/* Флаг и название шлюза */}
|
||||
<div className="d-flex align-items-center gap-2 mb-1">
|
||||
<span
|
||||
className={`avatar avatar-sm ${
|
||||
isActive ? 'bg-white text-primary' : 'bg-primary-lt'
|
||||
@@ -925,7 +925,6 @@ function EasySwitchManager() {
|
||||
{countryToFlag(gw.country || country || '')}
|
||||
</span>
|
||||
<div className="flex-grow-1 min-w-0">
|
||||
{/* Основное название — имя gateway */}
|
||||
<div
|
||||
className={`fw-bold text-truncate ${
|
||||
isActive ? 'text-white' : ''
|
||||
@@ -934,38 +933,19 @@ function EasySwitchManager() {
|
||||
>
|
||||
{gw.name}
|
||||
</div>
|
||||
{/* IP шлюза под названием */}
|
||||
{gw.ip && (
|
||||
<div
|
||||
className={`small text-truncate ${
|
||||
isActive ? 'text-white-75' : 'text-muted'
|
||||
}`}
|
||||
style={{ fontSize: '0.7rem' }}
|
||||
>
|
||||
{gw.ip}
|
||||
</div>
|
||||
)}
|
||||
{/* Описание / провайдер */}
|
||||
<div
|
||||
className={`small text-truncate ${
|
||||
isActive ? 'text-white-75' : 'text-muted'
|
||||
}`}
|
||||
style={{ fontSize: '0.7rem' }}
|
||||
>
|
||||
{gw.comment && <span className="me-1">{gw.comment}</span>}
|
||||
{(gw.country || serverMeta?.country || serverMeta?.provider) && (
|
||||
<>
|
||||
{gw.country || serverMeta?.country ? (
|
||||
<span className="me-1">
|
||||
{countryToFlag(gw.country || serverMeta?.country)}
|
||||
</span>
|
||||
) : null}
|
||||
<span>{gw.provider || serverMeta?.provider || ''}</span>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* IP шлюза под названием */}
|
||||
{gw.ip && (
|
||||
<div
|
||||
className={`small text-truncate ${
|
||||
isActive ? 'text-white-75' : 'text-muted'
|
||||
}`}
|
||||
style={{ fontSize: '0.7rem' }}
|
||||
>
|
||||
{gw.ip}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Метрика (пинг) */}
|
||||
<div className={`fw-bold mt-1 ${isActive ? 'text-white' : 'text-success'}`} style={{ fontSize: '1.1rem' }}>
|
||||
@@ -1090,8 +1070,8 @@ function EasySwitchManager() {
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Информация о шлюзе в стиле фильтров: флаг, имя, IP */}
|
||||
<div className="d-flex align-items-start gap-2 mb-1">
|
||||
{/* Флаг и название шлюза */}
|
||||
<div className="d-flex align-items-center gap-2 mb-1">
|
||||
<span
|
||||
className={`avatar avatar-sm ${
|
||||
isActive ? 'bg-white text-primary' : 'bg-primary-lt'
|
||||
@@ -1100,7 +1080,6 @@ function EasySwitchManager() {
|
||||
{countryToFlag(gw.country || country || '')}
|
||||
</span>
|
||||
<div className="flex-grow-1 min-w-0">
|
||||
{/* Основное название — имя gateway */}
|
||||
<div
|
||||
className={`fw-bold text-truncate ${
|
||||
isActive ? 'text-white' : ''
|
||||
@@ -1109,44 +1088,19 @@ function EasySwitchManager() {
|
||||
>
|
||||
{gw.name}
|
||||
</div>
|
||||
{/* IP шлюза под названием */}
|
||||
{gw.ip && (
|
||||
<div
|
||||
className={`small text-truncate ${
|
||||
isActive ? 'text-white-75' : 'text-muted'
|
||||
}`}
|
||||
style={{ fontSize: '0.7rem' }}
|
||||
>
|
||||
{gw.ip}
|
||||
</div>
|
||||
)}
|
||||
{/* Описание / провайдер */}
|
||||
<div
|
||||
className={`small text-truncate ${
|
||||
isActive ? 'text-white-75' : 'text-muted'
|
||||
}`}
|
||||
style={{ fontSize: '0.7rem' }}
|
||||
>
|
||||
{gw.comment && (
|
||||
<span className="me-1">{gw.comment}</span>
|
||||
)}
|
||||
{(gw.country ||
|
||||
serverMeta?.country ||
|
||||
serverMeta?.provider) && (
|
||||
<>
|
||||
{gw.country || serverMeta?.country ? (
|
||||
<span className="me-1">
|
||||
{countryToFlag(
|
||||
gw.country || serverMeta?.country
|
||||
)}
|
||||
</span>
|
||||
) : null}
|
||||
<span>{gw.provider || serverMeta?.provider || ''}</span>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/* IP шлюза под названием */}
|
||||
{gw.ip && (
|
||||
<div
|
||||
className={`small text-truncate ${
|
||||
isActive ? 'text-white-75' : 'text-muted'
|
||||
}`}
|
||||
style={{ fontSize: '0.7rem' }}
|
||||
>
|
||||
{gw.ip}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Метрика (пинг) */}
|
||||
<div className={`fw-bold mt-1 ${isActive ? 'text-white' : 'text-success'}`} style={{ fontSize: '1.1rem' }}>
|
||||
|
||||
Reference in New Issue
Block a user