Nearby (AutoDetect) Phase 1 — settings, window, compact section; UmbraSync theme; minor fixes

This commit is contained in:
2025-09-11 11:30:09 +02:00
parent 6ebb73040b
commit a70968d30c
9 changed files with 193 additions and 13 deletions

View File

@@ -211,6 +211,40 @@ public class SettingsUi : WindowMediatorSubscriberBase
_configService.Save();
}
ImGui.Separator();
_uiShared.BigText("Nearby");
bool enableDiscovery = _configService.Current.EnableAutoDetectDiscovery;
if (ImGui.Checkbox("Enable Nearby detection (beta)", ref enableDiscovery))
{
_configService.Current.EnableAutoDetectDiscovery = enableDiscovery;
_configService.Save();
}
bool allowRequests = _configService.Current.AllowAutoDetectPairRequests;
if (ImGui.Checkbox("Allow pair requests", ref allowRequests))
{
_configService.Current.AllowAutoDetectPairRequests = allowRequests;
_configService.Save();
}
if (enableDiscovery)
{
ImGui.Indent();
int maxMeters = _configService.Current.AutoDetectMaxDistanceMeters;
ImGui.SetNextItemWidth(200 * ImGuiHelpers.GlobalScale);
if (ImGui.SliderInt("Max distance (meters)", ref maxMeters, 5, 100))
{
_configService.Current.AutoDetectMaxDistanceMeters = maxMeters;
_configService.Save();
}
int muteMin = _configService.Current.AutoDetectMuteMinutes;
ImGui.SetNextItemWidth(200 * ImGuiHelpers.GlobalScale);
if (ImGui.SliderInt("Default mute duration (minutes)", ref muteMin, 1, 120))
{
_configService.Current.AutoDetectMuteMinutes = muteMin;
_configService.Save();
}
ImGui.Unindent();
}
ImGui.Separator();
_uiShared.BigText("Transfer UI");