feat: complete UM Trace iOS and field UI integration

This commit is contained in:
Brent Perteet
2026-08-23 20:54:03 -05:00
parent 16c2ada09b
commit 36f583169c
38 changed files with 548 additions and 212 deletions

View File

@@ -2,11 +2,20 @@
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:vm="clr-namespace:FieldLogger.ViewModels"
xmlns:controls="clr-namespace:FieldLogger.Views.Controls"
x:Class="FieldLogger.Views.SettingsPage"
x:DataType="vm:SettingsViewModel"
Title="Settings">
<ScrollView>
<VerticalStackLayout Padding="16" Spacing="12">
Title="Settings"
Shell.NavBarIsVisible="False"
BackgroundColor="{DynamicResource UlColorCanvas}">
<Grid RowDefinitions="Auto,*">
<controls:AppStatusBar x:Name="AppStatus" />
<ScrollView Grid.Row="1">
<VerticalStackLayout Padding="16,16,16,88" Spacing="12">
<Label Text="Settings" Style="{StaticResource UlPageTitle}"
TextColor="{DynamicResource UlColorText}"
SemanticProperties.HeadingLevel="Level1" />
<Label Text="Devices" FontAttributes="Bold" FontSize="16" />
@@ -40,36 +49,33 @@
</VerticalStackLayout>
</Border>
<Label Text="Map" FontAttributes="Bold" FontSize="16" Margin="0,12,0,0" />
<Border StrokeThickness="0" Background="{AppThemeBinding Light=#F2F2F7, Dark=#1C1C1E}" StrokeShape="RoundRectangle 12" Padding="12">
<VerticalStackLayout Spacing="6">
<Label Text="Google Maps API Key (Windows map view)" FontSize="12" TextColor="Gray" />
<Entry Text="{Binding MapsApiKey}" Placeholder="AIza…" IsPassword="False" />
<Label FontSize="11" TextColor="Gray"
Text="On Android the key is configured in AndroidManifest.xml; iOS and macOS use Apple Maps and need no key." />
</VerticalStackLayout>
</Border>
<Label Text="Sync" FontAttributes="Bold" FontSize="16" Margin="0,12,0,0" />
<Border StrokeThickness="0" Background="{AppThemeBinding Light=#F2F2F7, Dark=#1C1C1E}" StrokeShape="RoundRectangle 12" Padding="12">
<VerticalStackLayout Spacing="8">
<Grid ColumnDefinitions="*,Auto">
<Label Text="Durable cloud sync" VerticalOptions="Center" />
<Switch Grid.Column="1" IsToggled="{Binding MqttEnabled}" />
<VerticalStackLayout Spacing="8" Margin="0,12,0,0">
<Label Text="Diagnostics" FontAttributes="Bold" FontSize="16" />
<Border Style="{StaticResource UlCard}"
BackgroundColor="{DynamicResource UlColorSurfaceRaised}"
Stroke="{DynamicResource UlColorBorder}" StrokeShape="RoundRectangle 12" Padding="12">
<Grid ColumnDefinitions="*,Auto" ColumnSpacing="12">
<VerticalStackLayout Spacing="2" VerticalOptions="Center">
<Label Text="Debug" FontAttributes="Bold" FontSize="16"
TextColor="{DynamicResource UlColorText}" />
<Label Text="Capture readiness, device state, sync, recent points, and console tools"
FontSize="12" TextColor="{DynamicResource UlColorTextMuted}" />
</VerticalStackLayout>
<Button Grid.Column="1" Text="Open" Command="{Binding OpenDebugCommand}"
Style="{StaticResource UlButtonSecondary}"
MinimumHeightRequest="{StaticResource UlTouchMinimum}"
SemanticProperties.Description="Open UM Trace diagnostics" />
</Grid>
<Entry Text="{Binding MqttHost}" Placeholder="dev.hub.umagul.net" />
<Entry Text="{Binding MqttPort}" Placeholder="443 (WSS) or 8884 (MQTTS)" Keyboard="Numeric" />
<Entry Text="{Binding MqttOrgId}" Placeholder="Organization ID / MQTT username" />
<Entry Text="{Binding MqttPassword}" Placeholder="New MQTT password (stored securely)" IsPassword="True" />
<Label Text="{Binding MqttClientId, StringFormat='Client: {0}'}" FontSize="10" TextColor="Gray" />
<Label Text="{Binding SyncStatus}" FontSize="12" TextColor="DodgerBlue" />
<Button Text="Save &amp; Connect" Command="{Binding SaveSyncCommand}" />
</VerticalStackLayout>
</Border>
</Border>
</VerticalStackLayout>
<Label Text="{Binding AppVersion, StringFormat='Field Logger v{0}'}"
FontSize="11" TextColor="Gray" HorizontalOptions="Center" Margin="0,20,0,0" />
<Label Text="{Binding AppVersion, StringFormat='UM Trace v{0}'}"
FontSize="11" TextColor="{DynamicResource UlColorTextMuted}"
HorizontalOptions="Center" Margin="0,20,0,0" />
</VerticalStackLayout>
</ScrollView>
</ScrollView>
<controls:FloatingMenuButton Grid.RowSpan="2" HorizontalOptions="End" VerticalOptions="End" ZIndex="20" />
</Grid>
</ContentPage>