style: Update EasySwitchManager UI for improved layout and visual consistency, including adjustments to card dimensions, padding, and font sizes for better user experience.
This commit is contained in:
@@ -444,28 +444,28 @@ function EasySwitchManager() {
|
||||
</div>
|
||||
|
||||
{/* Сетка карточек ВСЕх шлюзов сервера */}
|
||||
<div className="row g-2">
|
||||
<div className="row g-3">
|
||||
{server.gateways.map((gw, idx) => {
|
||||
const isActive = activeGw === gw.name;
|
||||
const isFastest = idx === 0;
|
||||
const ping = 20 + idx * 10 + Math.floor(Math.random() * 15);
|
||||
|
||||
return (
|
||||
<div key={gw.name} className="col-6 col-sm-4 col-md-3 col-lg-2">
|
||||
<div key={gw.name} className="col-12 col-sm-6 col-md-4">
|
||||
<div
|
||||
className={`card cursor-pointer h-100 ${isActive ? 'bg-primary text-white' : ''}`}
|
||||
style={{
|
||||
cursor: 'pointer',
|
||||
transition: 'all 0.15s ease',
|
||||
border: isActive ? '2px solid var(--tblr-primary)' : '1px solid rgba(0,0,0,0.1)',
|
||||
borderRadius: '6px',
|
||||
boxShadow: isActive ? '0 3px 8px rgba(32, 107, 196, 0.3)' : 'none'
|
||||
borderRadius: '8px',
|
||||
boxShadow: isActive ? '0 4px 12px rgba(32, 107, 196, 0.3)' : 'none'
|
||||
}}
|
||||
onClick={() => handleGatewaySelect(server.id, comm.value, gw.name)}
|
||||
onMouseEnter={(e) => {
|
||||
if (!isActive) {
|
||||
e.currentTarget.style.boxShadow = '0 2px 6px rgba(0,0,0,0.1)';
|
||||
e.currentTarget.style.transform = 'translateY(-1px)';
|
||||
e.currentTarget.style.boxShadow = '0 2px 8px rgba(0,0,0,0.1)';
|
||||
e.currentTarget.style.transform = 'translateY(-2px)';
|
||||
}
|
||||
}}
|
||||
onMouseLeave={(e) => {
|
||||
@@ -475,12 +475,12 @@ function EasySwitchManager() {
|
||||
}
|
||||
}}
|
||||
>
|
||||
<div className="card-body p-2">
|
||||
<div className="card-body p-3">
|
||||
{/* Галочка и метка Fastest */}
|
||||
<div className="d-flex align-items-start justify-content-between mb-1">
|
||||
<div className="d-flex align-items-start justify-content-between mb-2">
|
||||
{isFastest && !isActive && (
|
||||
<span className="badge bg-yellow-lt text-yellow d-inline-flex align-items-center" style={{ fontSize: '0.65rem', padding: '2px 4px' }}>
|
||||
<IconBolt size={10} className="me-1" />
|
||||
<span className="badge bg-yellow-lt text-yellow d-inline-flex align-items-center" style={{ fontSize: '0.75rem', padding: '4px 8px' }}>
|
||||
<IconBolt size={14} className="me-1" />
|
||||
Fast
|
||||
</span>
|
||||
)}
|
||||
@@ -488,25 +488,25 @@ function EasySwitchManager() {
|
||||
{isActive && (
|
||||
<div
|
||||
className="bg-white text-primary rounded-circle d-flex align-items-center justify-content-center"
|
||||
style={{ width: '18px', height: '18px' }}
|
||||
style={{ width: '24px', height: '24px' }}
|
||||
>
|
||||
<IconCheck size={12} />
|
||||
<IconCheck size={16} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Название шлюза */}
|
||||
<div className={`fw-bold mb-1 ${isActive ? 'text-white' : ''}`} style={{ fontSize: '0.8rem' }}>
|
||||
<div className={`fw-bold mb-2 ${isActive ? 'text-white' : ''}`} style={{ fontSize: '1rem' }}>
|
||||
{gw.name}
|
||||
</div>
|
||||
|
||||
{/* Протокол */}
|
||||
<div className={`small ${isActive ? 'text-white' : 'text-muted'}`} style={{ fontSize: '0.7rem', opacity: isActive ? 0.85 : 1 }}>
|
||||
{serverMeta?.provider || 'vless'}
|
||||
<div className={`small mb-2 ${isActive ? 'text-white' : 'text-muted'}`} style={{ fontSize: '0.85rem', opacity: isActive ? 0.85 : 1 }}>
|
||||
{serverMeta?.provider || 'vless / xudp'}
|
||||
</div>
|
||||
|
||||
{/* Метрика (пинг) */}
|
||||
<div className={`fw-bold mt-1 ${isActive ? 'text-white' : 'text-success'}`} style={{ fontSize: '1rem' }}>
|
||||
<div className={`fw-bold ${isActive ? 'text-white' : 'text-success'}`} style={{ fontSize: '1.5rem' }}>
|
||||
{ping}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user