mirror of
https://github.com/wwiinnddyy/LanMountainDesktop.git
synced 2026-06-21 16:14:28 +08:00
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.
This commit is contained in:
22
LanMountainDesktop.Launcher/Models/PrivacyConfig.cs
Normal file
22
LanMountainDesktop.Launcher/Models/PrivacyConfig.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
namespace LanMountainDesktop.Launcher.Models;
|
||||
|
||||
/// <summary>
|
||||
/// 隐私配置模型
|
||||
/// </summary>
|
||||
public class PrivacyConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否启用崩溃报告遥测
|
||||
/// </summary>
|
||||
public bool CrashTelemetryEnabled { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用使用统计遥测
|
||||
/// </summary>
|
||||
public bool UsageTelemetryEnabled { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 隐私追踪 ID
|
||||
/// </summary>
|
||||
public string TelemetryId { get; set; } = string.Empty;
|
||||
}
|
||||
Reference in New Issue
Block a user