2026-03-13 22:20:12 +08:00
|
|
|
using System;
|
|
|
|
|
|
2026-08-11 23:03:55 +08:00
|
|
|
namespace LanMountainDesktop.AirAppSdk;
|
2026-03-13 22:20:12 +08:00
|
|
|
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = false)]
|
2026-08-11 23:03:55 +08:00
|
|
|
public sealed class AirAppSettingsPageInfoAttribute : Attribute
|
2026-03-13 22:20:12 +08:00
|
|
|
{
|
2026-08-11 23:03:55 +08:00
|
|
|
public AirAppSettingsPageInfoAttribute(
|
2026-03-13 22:20:12 +08:00
|
|
|
string id,
|
|
|
|
|
string name,
|
2026-08-11 23:03:55 +08:00
|
|
|
AirAppSettingsPageCategory category)
|
2026-03-13 22:20:12 +08:00
|
|
|
{
|
|
|
|
|
ArgumentException.ThrowIfNullOrWhiteSpace(id);
|
|
|
|
|
ArgumentException.ThrowIfNullOrWhiteSpace(name);
|
|
|
|
|
|
|
|
|
|
Id = id.Trim();
|
|
|
|
|
Name = name.Trim();
|
|
|
|
|
Category = category;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public string Id { get; }
|
|
|
|
|
|
|
|
|
|
public string Name { get; }
|
|
|
|
|
|
2026-08-11 23:03:55 +08:00
|
|
|
public AirAppSettingsPageCategory Category { get; }
|
2026-03-13 22:20:12 +08:00
|
|
|
|
|
|
|
|
public string? TitleLocalizationKey { get; init; }
|
|
|
|
|
|
|
|
|
|
public string? DescriptionLocalizationKey { get; init; }
|
|
|
|
|
|
|
|
|
|
public string IconKey { get; init; } = "Settings";
|
|
|
|
|
|
|
|
|
|
public string? SelectedIconKey { get; init; }
|
|
|
|
|
|
|
|
|
|
public int SortOrder { get; init; }
|
|
|
|
|
|
|
|
|
|
public bool HideDefault { get; init; }
|
|
|
|
|
|
|
|
|
|
public bool HidePageTitle { get; init; }
|
|
|
|
|
|
|
|
|
|
public bool UseFullWidth { get; init; }
|
|
|
|
|
|
|
|
|
|
public string? GroupId { get; init; }
|
|
|
|
|
|
2026-08-11 23:03:55 +08:00
|
|
|
public AirAppSettingsScope Scope { get; init; } = AirAppSettingsScope.App;
|
2026-03-13 22:20:12 +08:00
|
|
|
}
|