Files
LanMountainDesktop/LanMountainDesktop/Models/AppSettingsSnapshot.cs

188 lines
5.3 KiB
C#
Raw Normal View History

using System.Collections.Generic;
2026-03-20 00:41:14 +08:00
using LanMountainDesktop.Settings.Core;
2026-02-28 03:00:25 +08:00
2026-03-04 15:22:52 +08:00
namespace LanMountainDesktop.Models;
2026-02-28 03:00:25 +08:00
public sealed class AppSettingsSnapshot
{
public int GridShortSideCells { get; set; } = 12;
2026-03-02 20:02:14 +08:00
public string GridSpacingPreset { get; set; } = "Relaxed";
public int DesktopEdgeInsetPercent { get; set; } = 18;
2026-02-28 03:00:25 +08:00
public bool? IsNightMode { get; set; }
public string? ThemeColor { get; set; }
2026-03-13 22:20:12 +08:00
public bool UseSystemChrome { get; set; }
2026-03-20 00:41:14 +08:00
public double GlobalCornerRadiusScale { get; set; } = GlobalAppearanceSettings.DefaultCornerRadiusScale;
2026-03-15 17:08:07 +08:00
public string ThemeColorMode { get; set; } = "default_neutral";
public string SystemMaterialMode { get; set; } = "none";
public string? SelectedWallpaperSeed { get; set; }
2026-02-28 03:00:25 +08:00
public string? WallpaperPath { get; set; }
2026-03-14 16:38:56 +08:00
public string WallpaperType { get; set; } = "Image";
public string? WallpaperColor { get; set; }
2026-02-28 03:00:25 +08:00
public string WallpaperPlacement { get; set; } = "Fill";
public int SystemWallpaperRefreshIntervalSeconds { get; set; } = 300;
2026-02-28 03:00:25 +08:00
public int SettingsTabIndex { get; set; } = 0;
2026-03-09 12:27:33 +08:00
public string? SettingsTabTag { get; set; }
2026-02-28 04:23:28 +08:00
public string LanguageCode { get; set; } = "zh-CN";
2026-03-01 16:50:06 +08:00
public string? TimeZoneId { get; set; }
2026-03-03 04:56:04 +08:00
public string WeatherLocationMode { get; set; } = "CitySearch";
public string WeatherLocationKey { get; set; } = string.Empty;
public string WeatherLocationName { get; set; } = string.Empty;
public double WeatherLatitude { get; set; } = 39.9042;
public double WeatherLongitude { get; set; } = 116.4074;
public bool WeatherAutoRefreshLocation { get; set; }
public string WeatherLocationQuery { get; set; } = string.Empty;
public string WeatherExcludedAlerts { get; set; } = string.Empty;
2026-03-14 22:45:09 +08:00
public string WeatherIconPackId { get; set; } = "HyperOS3";
public bool WeatherNoTlsRequests { get; set; }
2026-03-05 12:34:39 +08:00
public bool AutoStartWithWindows { get; set; }
public string AppRenderMode { get; set; } = "Default";
public bool IncludePrereleaseUpdates { get; set; }
2026-03-15 17:08:07 +08:00
public bool UploadAnonymousCrashData { get; set; }
public bool UploadAnonymousUsageData { get; set; }
2026-03-21 16:16:02 +08:00
public string? TelemetryInstallId { get; set; }
2026-03-16 09:50:48 +08:00
2026-03-21 16:16:02 +08:00
public string? TelemetryId { get; set; }
public bool HasReportedTelemetryBaseline { get; set; }
2026-03-15 04:35:34 +08:00
public string UpdateChannel { get; set; } = "stable";
public string UpdateMode { get; set; } = "download_then_confirm";
public string UpdateDownloadSource { get; set; } = "github";
public int UpdateDownloadThreads { get; set; } = 4;
public string? PendingUpdateInstallerPath { get; set; }
public string? PendingUpdateVersion { get; set; }
public long? PendingUpdatePublishedAtUtcMs { get; set; }
public long? LastUpdateCheckUtcMs { get; set; }
public string? PendingUpdateSha256 { get; set; }
2026-02-28 03:00:25 +08:00
public List<string> TopStatusComponentIds { get; set; } = [];
public List<string> PinnedTaskbarActions { get; set; } =
[
2026-03-13 00:33:00 +08:00
TaskbarActionId.MinimizeToWindows.ToString()
2026-02-28 03:00:25 +08:00
];
2026-03-02 20:02:14 +08:00
public bool EnableDynamicTaskbarActions { get; set; } = true;
2026-02-28 03:00:25 +08:00
public string TaskbarLayoutMode { get; set; } = "BottomFullRowMacStyle";
2026-03-01 00:34:07 +08:00
2026-03-02 20:02:14 +08:00
public string ClockDisplayFormat { get; set; } = "HourMinuteSecond";
2026-03-19 00:17:21 +08:00
public bool StatusBarClockTransparentBackground { get; set; }
2026-03-02 20:02:14 +08:00
public string StatusBarSpacingMode { get; set; } = "Relaxed";
public int StatusBarCustomSpacingPercent { get; set; } = 12;
public bool EnableThreeFingerSwipe { get; set; } = false;
2026-03-09 12:27:33 +08:00
public List<string> DisabledPluginIds { get; set; } = [];
#region Study Settings
2026-03-31 01:16:53 +08:00
public bool StudyEnabled { get; set; } = true;
public int? StudyFrameMs { get; set; }
public double? StudyScoreThresholdDbfs { get; set; }
public int? StudyFocusDurationMinutes { get; set; }
public int? StudyBreakDurationMinutes { get; set; }
public int? StudyLongBreakDurationMinutes { get; set; }
public int? StudySessionsBeforeLongBreak { get; set; }
public bool? StudyAutoStartBreak { get; set; }
public bool? StudyAutoStartFocus { get; set; }
public bool? StudyNoiseAlertEnabled { get; set; }
public int? StudyMaxInterruptsPerMinute { get; set; }
public bool? StudyShowRealtimeDb { get; set; }
public double? StudyBaselineDb { get; set; }
public int? StudyAvgWindowSec { get; set; }
#endregion
#region Notification Settings
public bool NotificationEnabled { get; set; } = true;
public string NotificationDefaultPosition { get; set; } = "TopRight";
public int NotificationDurationSeconds { get; set; } = 4;
public bool NotificationHoverPauseEnabled { get; set; } = true;
public bool NotificationClickCloseEnabled { get; set; } = true;
public int NotificationMaxPerPosition { get; set; } = 5;
#endregion
2026-03-05 14:34:33 +08:00
public AppSettingsSnapshot Clone()
{
var clone = (AppSettingsSnapshot)MemberwiseClone();
clone.TopStatusComponentIds = TopStatusComponentIds is { Count: > 0 }
? new List<string>(TopStatusComponentIds)
: [];
clone.PinnedTaskbarActions = PinnedTaskbarActions is { Count: > 0 }
? new List<string>(PinnedTaskbarActions)
: [];
2026-03-09 12:27:33 +08:00
clone.DisabledPluginIds = DisabledPluginIds is { Count: > 0 }
? new List<string>(DisabledPluginIds)
: [];
2026-03-05 14:34:33 +08:00
return clone;
}
2026-02-28 03:00:25 +08:00
}