feature: Phase 18.6 Track A — public Settings menu + streaming-quality toggle
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
@using DeepDrftPublic.Client.Common
|
||||
@using DeepDrftPublic.Client.Controls.Settings
|
||||
|
||||
@*
|
||||
The public-site Settings menu (Phase 18 wave 18.6, §4a). An app-bar trigger opening a MudMenu that renders
|
||||
a settings-item list — NOT a hard-coded control stack. Each entry is a SettingsItem (label + a control
|
||||
fragment bound to a persisted preference), so a future tenant (dark mode) plugs in as a new list entry, not
|
||||
a menu rewire. Today the list holds one item: the streaming-quality toggle.
|
||||
|
||||
The MudMenu items carry OnClick="@(() => {})" + OnTouch so a click inside a control row does not dismiss the
|
||||
menu (MudMenu auto-closes on item activation otherwise), keeping the radio group usable.
|
||||
*@
|
||||
<div class="dd-accent-icon">
|
||||
<MudMenu Icon="@Icons.Material.Filled.Settings"
|
||||
Color="Color.Inherit"
|
||||
AnchorOrigin="Origin.BottomRight"
|
||||
TransformOrigin="Origin.TopRight"
|
||||
AriaLabel="Settings"
|
||||
Class="dd-settings-menu">
|
||||
<div class="dd-settings-panel">
|
||||
<div class="dd-settings-heading">Settings</div>
|
||||
@foreach (var item in _items)
|
||||
{
|
||||
<div class="dd-settings-item">
|
||||
<div class="dd-settings-item-label">@item.Label</div>
|
||||
@item.Control
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</MudMenu>
|
||||
</div>
|
||||
|
||||
@code {
|
||||
// The settings-item list. Built once; adding a preference is appending one SettingsItem with its control
|
||||
// fragment — the menu body above renders whatever is here without knowing what each item is.
|
||||
private readonly List<SettingsItem> _items =
|
||||
[
|
||||
new SettingsItem("Streaming quality", @<StreamQualitySetting />)
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user