client: Windows 客户端(WinUI3 壳 + agent-core;调试用 Electron 壳存档);localserver token 改为常数时间比较
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace EveryPublish.Client.Models;
|
||||
|
||||
/// <summary>agent-core 写入的 local.json(随机端口 + token)</summary>
|
||||
public class LocalInfo
|
||||
{
|
||||
[JsonPropertyName("port")]
|
||||
public int Port { get; set; }
|
||||
|
||||
[JsonPropertyName("token")]
|
||||
public string Token { get; set; } = "";
|
||||
}
|
||||
|
||||
/// <summary>核心状态(/status 返回)</summary>
|
||||
public class CoreStatus
|
||||
{
|
||||
[JsonPropertyName("online")]
|
||||
public bool Online { get; set; }
|
||||
|
||||
[JsonPropertyName("session")]
|
||||
public string Session { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("server")]
|
||||
public string Server { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("deviceId")]
|
||||
public long DeviceId { get; set; }
|
||||
|
||||
[JsonPropertyName("name")]
|
||||
public string Name { get; set; } = "";
|
||||
}
|
||||
|
||||
/// <summary>挑战(/challenges 返回,与 shared/proto.Challenge 一致)</summary>
|
||||
public class ChallengeItem
|
||||
{
|
||||
[JsonPropertyName("challengeId")]
|
||||
public string ChallengeId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("accountId")]
|
||||
public string AccountId { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("platform")]
|
||||
public string Platform { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("kind")]
|
||||
public string Kind { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("qrToken")]
|
||||
public string QrToken { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("prompt")]
|
||||
public string Prompt { get; set; } = "";
|
||||
|
||||
[JsonPropertyName("expiresAt")]
|
||||
public long ExpiresAt { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user