Enhance documentation with new features: added dark/light/system theme support, instructions page, and application catalog. Updated API and domain model for app management and automatic migrations on startup. Improved frontend structure with new routes and features for user instructions and app management.

This commit is contained in:
Leonid Pershin committed 2026-07-01 22:38:01 +03:00
1 parent d8930409fe
commit 1a8d33efa3
229 files changed
+9226 -20

No files matched your search

@@ -0,0 +1,60 @@
using PnvPanel.Domain.Common;
namespace PnvPanel.Domain.Inbounds;
/// <summary>
/// Проекция inbound из 3x-ui. <see cref="RemoteInboundId"/> — идентификатор на стороне панели
/// (в ThreeXui.Net это string, а не число — так отдаёт API 3x-ui).
/// AllowedRoleIds хранит только Guid ролей (не навигацию на AppRole — тот живёт в Infrastructure/Identity,
/// Domain не должен на него ссылаться).
/// </summary>
public sealed class Inbound : Entity
{
public Guid NodeId { get; private set; }
public string RemoteInboundId { get; private set; } = string.Empty;
public VpnProtocol Protocol { get; private set; }
public string Remark { get; private set; } = string.Empty;
public int Port { get; private set; }
public bool IsPublished { get; private set; }
public string? DisplayName { get; private set; }
public int? MaxClients { get; private set; }
public IReadOnlyList<Guid> AllowedRoleIds { get; private set; } = [];
public DateTimeOffset? LastSyncAt { get; private set; }
private Inbound()
{
}
public static Inbound FromRemote(Guid nodeId, string remoteInboundId, VpnProtocol protocol, string remark, int port)
{
return new Inbound
{
Id = Guid.NewGuid(),
NodeId = nodeId,
RemoteInboundId = remoteInboundId,
Protocol = protocol,
Remark = remark,
Port = port,
IsPublished = false,
LastSyncAt = DateTimeOffset.UtcNow,
};
}
public void UpdateFromRemote(VpnProtocol protocol, string remark, int port)
{
Protocol = protocol;
Remark = remark;
Port = port;
LastSyncAt = DateTimeOffset.UtcNow;
}
public void Publish(string? displayName, IReadOnlyCollection<Guid> allowedRoleIds, int? maxClients)
{
IsPublished = true;
DisplayName = displayName;
AllowedRoleIds = allowedRoleIds.Distinct().ToList();
MaxClients = maxClients;
}
public void Unpublish() => IsPublished = false;
}