mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-28 09:33:46 +00:00
fix: show email for OAuth/email users in traffic table
Add email field to UserTrafficItem type and display it below user name when no Telegram username is present.
This commit is contained in:
@@ -10,6 +10,7 @@ export interface UserTrafficItem {
|
|||||||
user_id: number;
|
user_id: number;
|
||||||
telegram_id: number | null;
|
telegram_id: number | null;
|
||||||
username: string | null;
|
username: string | null;
|
||||||
|
email: string | null;
|
||||||
full_name: string;
|
full_name: string;
|
||||||
tariff_name: string | null;
|
tariff_name: string | null;
|
||||||
subscription_status: string | null;
|
subscription_status: string | null;
|
||||||
|
|||||||
@@ -1381,11 +1381,15 @@ export default function AdminTrafficUsage() {
|
|||||||
</div>
|
</div>
|
||||||
<div className="min-w-0">
|
<div className="min-w-0">
|
||||||
<div className="truncate text-xs font-medium text-dark-100">{item.full_name}</div>
|
<div className="truncate text-xs font-medium text-dark-100">{item.full_name}</div>
|
||||||
{item.username && (
|
{item.username ? (
|
||||||
<div className="truncate text-[10px] leading-tight text-dark-500">
|
<div className="truncate text-[10px] leading-tight text-dark-500">
|
||||||
@{item.username}
|
@{item.username}
|
||||||
</div>
|
</div>
|
||||||
)}
|
) : item.email ? (
|
||||||
|
<div className="truncate text-[10px] leading-tight text-dark-500">
|
||||||
|
{item.email}
|
||||||
|
</div>
|
||||||
|
) : null}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user