mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 17:43:47 +00:00
fix: hide panel info/traffic/devices from subscription list level, show only in detail
This commit is contained in:
@@ -1818,7 +1818,9 @@ export default function AdminUserDetail() {
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Panel Info */}
|
||||
{/* Panel Info, Traffic, Devices — only inside subscription detail */}
|
||||
{(subscriptionDetailView || userSubscriptions.length <= 1) && (
|
||||
<>
|
||||
{panelInfoLoading ? (
|
||||
<div className="flex justify-center rounded-xl bg-dark-800/50 py-8">
|
||||
<div className="h-6 w-6 animate-spin rounded-full border-2 border-accent-500 border-t-transparent" />
|
||||
@@ -1833,7 +1835,8 @@ export default function AdminUserDetail() {
|
||||
{(panelInfo.subscription_url || panelInfo.happ_link) && (
|
||||
<div className="rounded-xl bg-dark-800/50 p-4">
|
||||
<div className="mb-3 text-sm font-medium text-dark-200">
|
||||
{t('admin.users.detail.subscriptionUrl')} / {t('admin.users.detail.happLink')}
|
||||
{t('admin.users.detail.subscriptionUrl')} /{' '}
|
||||
{t('admin.users.detail.happLink')}
|
||||
</div>
|
||||
<div className="space-y-2">
|
||||
{panelInfo.subscription_url && (
|
||||
@@ -1867,7 +1870,9 @@ export default function AdminUserDetail() {
|
||||
)}
|
||||
|
||||
{/* Config */}
|
||||
{(panelInfo.trojan_password || panelInfo.vless_uuid || panelInfo.ss_password) && (
|
||||
{(panelInfo.trojan_password ||
|
||||
panelInfo.vless_uuid ||
|
||||
panelInfo.ss_password) && (
|
||||
<div className="rounded-xl bg-dark-800/50 p-4">
|
||||
<div className="mb-3 text-sm font-medium text-dark-200">
|
||||
{t('admin.users.detail.panelConfig')}
|
||||
@@ -1931,7 +1936,9 @@ export default function AdminUserDetail() {
|
||||
<div className="text-xs text-dark-500">
|
||||
{t('admin.users.detail.lastOnline')}
|
||||
</div>
|
||||
<div className="text-sm text-dark-100">{formatDate(panelInfo.online_at)}</div>
|
||||
<div className="text-sm text-dark-100">
|
||||
{formatDate(panelInfo.online_at)}
|
||||
</div>
|
||||
</div>
|
||||
{panelInfo.last_connected_node_name && (
|
||||
<div className="col-span-2">
|
||||
@@ -2021,11 +2028,15 @@ export default function AdminUserDetail() {
|
||||
<div className="mb-1 flex justify-between text-xs">
|
||||
<span className="text-dark-300">
|
||||
{item.country_code && (
|
||||
<span className="mr-1">{getCountryFlag(item.country_code)}</span>
|
||||
<span className="mr-1">
|
||||
{getCountryFlag(item.country_code)}
|
||||
</span>
|
||||
)}
|
||||
{item.node_name}
|
||||
</span>
|
||||
<span className="text-dark-400">{formatBytes(item.total_bytes)}</span>
|
||||
<span className="text-dark-400">
|
||||
{formatBytes(item.total_bytes)}
|
||||
</span>
|
||||
</div>
|
||||
<div className="h-1.5 overflow-hidden rounded-full bg-dark-700">
|
||||
<div
|
||||
@@ -2096,7 +2107,9 @@ export default function AdminUserDetail() {
|
||||
)}
|
||||
<span className="font-mono">{device.hwid.slice(0, 8)}...</span>
|
||||
{device.created_at && (
|
||||
<span>{new Date(device.created_at).toLocaleDateString(locale)}</span>
|
||||
<span>
|
||||
{new Date(device.created_at).toLocaleDateString(locale)}
|
||||
</span>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@@ -2124,6 +2137,8 @@ export default function AdminUserDetail() {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user