feat: improve squad management UX — rename, swap icons, color gift button

1. Rename "Управление серверами" → "Управление сквадами" across all
   4 locales (ru, en, zh, fa) — title, subtitle, nav, subscription
   options. The page manages RemnaWave squads, not individual servers.

2. Swap toggle button semantics — the button now shows the ACTION
   that will happen on click, not the current state:
   - Active squad: red X icon (click to deactivate)
   - Inactive squad: green checkmark (click to activate)

3. Gift/trial button: amber/orange when functional (clearly clickable),
   gray when disabled. Previously always gray, making it look inactive
   even when it could be clicked.
This commit is contained in:
Fringg
2026-04-23 05:00:36 +03:00
parent 2d6815a88e
commit 33f32648f0
5 changed files with 22 additions and 22 deletions

View File

@@ -555,8 +555,8 @@
"unlimited": "Unlimited", "unlimited": "Unlimited",
"buyTrafficGb": "Buy {{gb}} GB", "buyTrafficGb": "Buy {{gb}} GB",
"buyUnlimited": "Buy Unlimited", "buyUnlimited": "Buy Unlimited",
"manageServers": "Server management", "manageServers": "Squad management",
"manageServersTitle": "Server management" "manageServersTitle": "Squad management"
}, },
"serverManagement": { "serverManagement": {
"statusLegend": "✅ — connected • — will be added (paid) • — will be disconnected", "statusLegend": "✅ — connected • — will be added (paid) • — will be disconnected",
@@ -1100,7 +1100,7 @@
"apps": "Apps", "apps": "Apps",
"wheel": "Wheel", "wheel": "Wheel",
"tariffs": "Tariffs", "tariffs": "Tariffs",
"servers": "Servers", "servers": "Squads",
"banSystem": "Ban Monitoring", "banSystem": "Ban Monitoring",
"broadcasts": "Broadcasts", "broadcasts": "Broadcasts",
"users": "Users", "users": "Users",
@@ -2351,8 +2351,8 @@
} }
}, },
"servers": { "servers": {
"title": "Server Management", "title": "Squad Management",
"subtitle": "Configure VPN servers", "subtitle": "Configure squads",
"sync": "Sync", "sync": "Sync",
"syncing": "Syncing...", "syncing": "Syncing...",
"syncNow": "Sync now", "syncNow": "Sync now",

View File

@@ -386,8 +386,8 @@
"unlimited": "نامحدود", "unlimited": "نامحدود",
"buyTrafficGb": "خرید {{gb}} GB", "buyTrafficGb": "خرید {{gb}} GB",
"buyUnlimited": "خرید نامحدود", "buyUnlimited": "خرید نامحدود",
"manageServers": "مدیریت سرورها", "manageServers": "مدیریت اسکوادها",
"manageServersTitle": "مدیریت سرورها" "manageServersTitle": "مدیریت اسکوادها"
}, },
"serverManagement": { "serverManagement": {
"statusLegend": "✅ — متصل • — اضافه خواهد شد (پولی) • — قطع خواهد شد", "statusLegend": "✅ — متصل • — اضافه خواهد شد (پولی) • — قطع خواهد شد",
@@ -924,7 +924,7 @@
"apps": "برنامه‌ها", "apps": "برنامه‌ها",
"wheel": "چرخ", "wheel": "چرخ",
"tariffs": "تعرفه‌ها", "tariffs": "تعرفه‌ها",
"servers": "سرورها", "servers": "اسکوادها",
"broadcasts": "پیام‌رسانی", "broadcasts": "پیام‌رسانی",
"emailTemplates": "قالب‌های ایمیل", "emailTemplates": "قالب‌های ایمیل",
"paymentMethods": "روش‌های پرداخت", "paymentMethods": "روش‌های پرداخت",
@@ -1986,8 +1986,8 @@
} }
}, },
"servers": { "servers": {
"title": "مدیریت سرورها", "title": "مدیریت اسکوادها",
"subtitle": "پیکربندی سرورهای VPN", "subtitle": "پیکربندی اسکوادها",
"sync": "همگام‌سازی", "sync": "همگام‌سازی",
"syncing": "در حال همگام‌سازی...", "syncing": "در حال همگام‌سازی...",
"syncNow": "همگام‌سازی الان", "syncNow": "همگام‌سازی الان",

View File

@@ -583,8 +583,8 @@
"unlimited": "Безлимит", "unlimited": "Безлимит",
"buyTrafficGb": "Купить {{gb}} ГБ", "buyTrafficGb": "Купить {{gb}} ГБ",
"buyUnlimited": "Купить Безлимит", "buyUnlimited": "Купить Безлимит",
"manageServers": "Управление серверами", "manageServers": "Управление сквадами",
"manageServersTitle": "Управление серверами" "manageServersTitle": "Управление сквадами"
}, },
"serverManagement": { "serverManagement": {
"statusLegend": "✅ — подключено • — будет добавлено (платно) • — будет отключено", "statusLegend": "✅ — подключено • — будет добавлено (платно) • — будет отключено",
@@ -1121,7 +1121,7 @@
"apps": "Приложения", "apps": "Приложения",
"wheel": "Колесо", "wheel": "Колесо",
"tariffs": "Тарифы", "tariffs": "Тарифы",
"servers": "Серверы", "servers": "Сквады",
"banSystem": "Мониторинг банов", "banSystem": "Мониторинг банов",
"broadcasts": "Рассылки", "broadcasts": "Рассылки",
"users": "Пользователи", "users": "Пользователи",
@@ -2857,8 +2857,8 @@
} }
}, },
"servers": { "servers": {
"title": "Управление серверами", "title": "Управление сквадами",
"subtitle": "Настройка серверов VPN", "subtitle": "Настройка сквадов",
"sync": "Синхронизировать", "sync": "Синхронизировать",
"syncing": "Синхронизация...", "syncing": "Синхронизация...",
"syncNow": "Синхронизировать сейчас", "syncNow": "Синхронизировать сейчас",

View File

@@ -386,8 +386,8 @@
"unlimited": "无限制", "unlimited": "无限制",
"buyTrafficGb": "购买 {{gb}} GB", "buyTrafficGb": "购买 {{gb}} GB",
"buyUnlimited": "购买无限流量", "buyUnlimited": "购买无限流量",
"manageServers": "服务器管理", "manageServers": "小队管理",
"manageServersTitle": "服务器管理" "manageServersTitle": "小队管理"
}, },
"serverManagement": { "serverManagement": {
"statusLegend": "✅ — 已连接 • — 将添加(付费)• — 将断开", "statusLegend": "✅ — 已连接 • — 将添加(付费)• — 将断开",
@@ -924,7 +924,7 @@
"apps": "应用", "apps": "应用",
"wheel": "转盘", "wheel": "转盘",
"tariffs": "套餐", "tariffs": "套餐",
"servers": "服务器", "servers": "小队",
"broadcasts": "群发", "broadcasts": "群发",
"emailTemplates": "邮件模板", "emailTemplates": "邮件模板",
"paymentMethods": "支付方式", "paymentMethods": "支付方式",

View File

@@ -186,14 +186,14 @@ export default function AdminServers() {
onClick={() => toggleMutation.mutate(server.id)} onClick={() => toggleMutation.mutate(server.id)}
className={`rounded-lg p-2 transition-colors ${ className={`rounded-lg p-2 transition-colors ${
server.is_available server.is_available
? 'bg-success-500/20 text-success-400 hover:bg-success-500/30' ? 'bg-error-500/20 text-error-400 hover:bg-error-500/30'
: 'bg-dark-700 text-dark-400 hover:bg-dark-600' : 'bg-success-500/20 text-success-400 hover:bg-success-500/30'
}`} }`}
title={ title={
server.is_available ? t('admin.servers.disable') : t('admin.servers.enable') server.is_available ? t('admin.servers.disable') : t('admin.servers.enable')
} }
> >
{server.is_available ? <CheckIcon /> : <XIcon />} {server.is_available ? <XIcon /> : <CheckIcon />}
</button> </button>
{/* Toggle Trial */} {/* Toggle Trial */}
@@ -201,7 +201,7 @@ export default function AdminServers() {
onClick={() => toggleTrialMutation.mutate(server.id)} onClick={() => toggleTrialMutation.mutate(server.id)}
className={`rounded-lg p-2 transition-colors ${ className={`rounded-lg p-2 transition-colors ${
server.is_trial_eligible server.is_trial_eligible
? 'bg-accent-500/20 text-accent-400 hover:bg-accent-500/30' ? 'bg-warning-500/20 text-warning-400 hover:bg-warning-500/30'
: 'bg-dark-700 text-dark-400 hover:bg-dark-600' : 'bg-dark-700 text-dark-400 hover:bg-dark-600'
}`} }`}
title={t('admin.servers.toggleTrial')} title={t('admin.servers.toggleTrial')}