Files
LanMountainDesktop/LanMountainDesktop.Launcher/Models/PrivacyAgreementState.cs
lincube cbaf2a0c38 Add privacy agreement UI, models, and service
Introduce privacy/telemetry support: add PrivacyConfig and PrivacyAgreementState models, and a PrivacyAgreementService that saves/validates agreement state with HMAC integrity protection (privacy-agreement.state.json). Update AppJsonContext to include new types. Extend OOBE UI (OobeWindow.axaml/.cs) with a Data Location redesign and a new Privacy step (telemetry toggles, telemetry ID, agreement checkbox) and wire up handlers to save privacy-config.json and agreement state. Add a PrivacyPolicyWindow using Markdown.Avalonia to display the privacy policy; add CommunityToolkit.Mvvm and Markdown.Avalonia package references.
2026-04-27 23:01:49 +08:00

43 lines
1.0 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
namespace LanMountainDesktop.Launcher.Models;
/// <summary>
/// 隐私协议同意状态模型(带防篡改保护)
/// </summary>
public class PrivacyAgreementState
{
/// <summary>
/// 用户是否同意隐私协议
/// </summary>
public bool IsAgreed { get; set; } = false;
/// <summary>
/// 同意时间UTC
/// </summary>
public DateTime AgreedAtUtc { get; set; }
/// <summary>
/// 同意的协议版本
/// </summary>
public string AgreementVersion { get; set; } = "1.0";
/// <summary>
/// 用户标识(匿名)
/// </summary>
public string UserId { get; set; } = string.Empty;
/// <summary>
/// 设备标识
/// </summary>
public string DeviceId { get; set; } = string.Empty;
/// <summary>
/// 数据完整性校验哈希HMAC-SHA256
/// </summary>
public string IntegrityHash { get; set; } = string.Empty;
/// <summary>
/// 用于生成哈希的随机盐值
/// </summary>
public string Salt { get; set; } = string.Empty;
}