UI/SpawnMenu/ServerSettingsPage.razor

The server settings UI page. It displays configuration options grouped by category, and controls its own visibility based on project settings.

@using Sandbox;
@using Sandbox.UI;
@inherits UtilityPage
@namespace Sandbox

<root class="page">
    <UISheet Target="@Rows" PropertyFilter="@UISheet.PropertiesAndButtons" />
</root>

@code
{
    public string Group { get; init; }

    List<SerializedProperty> _rows;

    List<SerializedProperty> Rows => _rows ??= ServerSettings.CreateRows( Group );

    // the utility tab adds one of these per group, it never lists the type itself
    public override bool IsPageVisible() => Group is not null && ServerSettings.CanEdit;
}