Files
ulapp/FieldLogger/Views/SettingsPage.xaml
2026-08-23 20:54:03 -05:00

82 lines
5.1 KiB
XML

<?xml version="1.0" encoding="utf-8" ?>
<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"
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" />
<Border StrokeThickness="0" Background="{AppThemeBinding Light=#F2F2F7, Dark=#1C1C1E}" StrokeShape="RoundRectangle 12" Padding="12">
<VerticalStackLayout Spacing="10">
<Grid ColumnDefinitions="16,*,Auto,Auto" ColumnSpacing="8">
<Ellipse WidthRequest="12" HeightRequest="12" VerticalOptions="Center"
Fill="{Binding Manager.LocatorState, Converter={StaticResource StateColor}}" />
<VerticalStackLayout Grid.Column="1" Spacing="0">
<Label Text="Locating Receiver" FontSize="12" TextColor="Gray" />
<Label Text="{Binding Manager.LocatorName, TargetNullValue='Not selected'}" FontAttributes="Bold" />
</VerticalStackLayout>
<Button Grid.Column="2" Text="Change" FontSize="12" Padding="10,4" Command="{Binding ChangeLocatorCommand}" />
<Button Grid.Column="3" Text="Forget" FontSize="12" Padding="10,4"
BackgroundColor="Transparent" TextColor="IndianRed" Command="{Binding ForgetLocatorCommand}" />
</Grid>
<BoxView HeightRequest="1" Color="{AppThemeBinding Light=#E0E0E0, Dark=#333}" />
<Grid ColumnDefinitions="16,*,Auto,Auto" ColumnSpacing="8">
<Ellipse WidthRequest="12" HeightRequest="12" VerticalOptions="Center"
Fill="{Binding Manager.GpsState, Converter={StaticResource StateColor}}" />
<VerticalStackLayout Grid.Column="1" Spacing="0">
<Label Text="Maglink RTK GPS" FontSize="12" TextColor="Gray" />
<Label Text="{Binding Manager.GpsName, TargetNullValue='Not selected'}" FontAttributes="Bold" />
</VerticalStackLayout>
<Button Grid.Column="2" Text="Change" FontSize="12" Padding="10,4" Command="{Binding ChangeGpsCommand}" />
<Button Grid.Column="3" Text="Forget" FontSize="12" Padding="10,4"
BackgroundColor="Transparent" TextColor="IndianRed" Command="{Binding ForgetGpsCommand}" />
</Grid>
</VerticalStackLayout>
</Border>
<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>
</Border>
</VerticalStackLayout>
<Label Text="{Binding AppVersion, StringFormat='UM Trace v{0}'}"
FontSize="11" TextColor="{DynamicResource UlColorTextMuted}"
HorizontalOptions="Center" Margin="0,20,0,0" />
</VerticalStackLayout>
</ScrollView>
<controls:FloatingMenuButton Grid.RowSpan="2" HorizontalOptions="End" VerticalOptions="End" ZIndex="20" />
</Grid>
</ContentPage>