Enhance VpnConfigDto to include ClientEmail and update related components
CI / Backend (build + test) (push) Successful in 1m17s
CI / Frontend (lint + typecheck + build) (push) Successful in 32s

- Added ClientEmail property to VpnConfigDto for better client identification.
- Updated ConfigCard to display the ClientEmail in the UI for improved user information.
- Modified API schema and types to accommodate the new ClientEmail field.
- Enhanced localization for displaying the ClientEmail in both Russian and English.
This commit is contained in:
Leonid Pershin
2026-07-13 15:59:09 +03:00
parent 24d9ea1099
commit 7fce5ef181
5 changed files with 12 additions and 3 deletions
@@ -5,13 +5,15 @@ namespace PnvPanel.Application.Configs;
/// <summary>
/// Пользователю показываем только DisplayName + протокол инбаунда — адрес/хост ноды и прочие
/// детали 3x-ui в этот DTO не попадают (см. domain-model.md).
/// детали 3x-ui в этот DTO не попадают (см. domain-model.md). Исключение — ClientEmail: это не
/// секрет и не адрес ноды, а просто ключ клиента в 3x-ui, полезный владельцу для диагностики
/// (сверка конфига с записью в панели у админа).
/// </summary>
public sealed record VpnConfigDto(
Guid Id, string? Label, VpnProtocol Protocol, string Location,
Guid Id, string? Label, string ClientEmail, VpnProtocol Protocol, string Location,
long UsedUpBytes, long UsedDownBytes, DateTimeOffset? ExpiresAt, ConfigStatus Status, DateTimeOffset CreatedAt)
{
public static VpnConfigDto FromDomain(VpnConfig config, Inbound inbound) => new(
config.Id, config.Label, config.Protocol, inbound.DisplayName ?? inbound.Remark,
config.Id, config.Label, config.ClientEmail, config.Protocol, inbound.DisplayName ?? inbound.Remark,
config.UsedUpBytes, config.UsedDownBytes, config.ExpiresAt, config.Status, config.CreatedAt);
}