fix(MikrotikTools): update gateway card display to show country and provider in subtitle, adjust layout for improved readability
Publish Fast Tabler Docker image / build-and-push-fast (push) Failing after 3m5s
Publish Fast Tabler Docker image / build-and-push-fast (push) Failing after 3m5s
This commit is contained in:
@@ -307,9 +307,11 @@ function MikrotikTools() {
|
|||||||
.map((g) => {
|
.map((g) => {
|
||||||
const isSelected = gatewayRef === g.ip || gatewayRef === g.id;
|
const isSelected = gatewayRef === g.ip || gatewayRef === g.id;
|
||||||
const flag = g.country ? countryToFlag(g.country) : '';
|
const flag = g.country ? countryToFlag(g.country) : '';
|
||||||
const subtitle = [g.description, g.provider].filter(Boolean).join(' · ');
|
// В подзаголовке показываем страну/провайдера, чтобы не дублировать description
|
||||||
|
const subtitle = [g.country, g.provider].filter(Boolean).join(' · ');
|
||||||
return (
|
return (
|
||||||
<div className="col-12 col-sm-6" key={g.id || g.ip}>
|
// Показываем карточки одной колонкой (по одной в ряд), чтобы текст был читаемым
|
||||||
|
<div className="col-12" key={g.id || g.ip}>
|
||||||
<div
|
<div
|
||||||
className={`card card-sm h-100 cursor-pointer ${
|
className={`card card-sm h-100 cursor-pointer ${
|
||||||
isSelected ? 'border-primary card-hover' : 'card-hover'
|
isSelected ? 'border-primary card-hover' : 'card-hover'
|
||||||
@@ -330,7 +332,7 @@ function MikrotikTools() {
|
|||||||
{flag || (g.ip ? g.ip.split('.').slice(-1)[0] : '?')}
|
{flag || (g.ip ? g.ip.split('.').slice(-1)[0] : '?')}
|
||||||
</span>
|
</span>
|
||||||
<div className="flex-grow-1 min-w-0">
|
<div className="flex-grow-1 min-w-0">
|
||||||
<div className="fw-bold text-truncate" title={g.ip}>
|
<div className="fw-bold text-truncate" title={g.ip || g.description || ''}>
|
||||||
{g.ip || '—'}
|
{g.ip || '—'}
|
||||||
</div>
|
</div>
|
||||||
{g.description && (
|
{g.description && (
|
||||||
|
|||||||
Reference in New Issue
Block a user