feat(sprint-3): apply Survey Teal field UI

This commit is contained in:
Brent Perteet
2026-08-20 22:00:31 -05:00
parent f9fb9f59f4
commit 5e87d81bb6
16 changed files with 954 additions and 562 deletions

View File

@@ -5,37 +5,64 @@
xmlns:models="clr-namespace:FieldLogger.Models"
x:Class="FieldLogger.Views.JobDetailPage"
x:DataType="vm:JobDetailViewModel"
Title="{Binding JobName}">
<ContentPage.ToolbarItems>
<ToolbarItem Text="Map" Command="{Binding ViewMapCommand}" />
</ContentPage.ToolbarItems>
Title="{Binding JobName}"
BackgroundColor="{DynamicResource UlColorCanvas}">
<Grid RowDefinitions="Auto,*" Padding="16" RowSpacing="16">
<Border Style="{StaticResource UlCard}" BackgroundColor="{DynamicResource UlColorSurfaceRaised}"
Stroke="{DynamicResource UlColorBorder}" StrokeShape="RoundRectangle 12" Padding="16">
<Grid RowDefinitions="Auto,Auto" ColumnDefinitions="*,Auto" RowSpacing="6" ColumnSpacing="12">
<VerticalStackLayout>
<Label Text="JOB DETAIL" FontSize="14" FontAttributes="Bold" CharacterSpacing="1.5"
TextColor="{DynamicResource UlColorPrimary}" />
<Label Text="{Binding JobName}" Style="{StaticResource UlPageTitle}"
TextColor="{DynamicResource UlColorText}" LineBreakMode="TailTruncation"
SemanticProperties.HeadingLevel="Level1" />
</VerticalStackLayout>
<Button Grid.Column="1" Style="{StaticResource UlButtonSecondary}"
Text="View map" Command="{Binding ViewMapCommand}"
MinimumHeightRequest="{StaticResource UlTouchMinimum}" MinimumWidthRequest="96"
SemanticProperties.Description="View this job's captured points on the map" />
<Label Grid.Row="1" Grid.ColumnSpan="2" FontSize="16"
TextColor="{DynamicResource UlColorTextMuted}"
Text="{Binding PointCount, StringFormat='{0} locally logged points'}" />
</Grid>
</Border>
<Grid RowDefinitions="Auto,*" Padding="16" RowSpacing="8">
<Label Grid.Row="0" FontSize="13" TextColor="Gray"
Text="{Binding PointCount, StringFormat='{0} logged points'}" />
<CollectionView Grid.Row="1" ItemsSource="{Binding Points}">
<CollectionView Grid.Row="1" ItemsSource="{Binding Points}"
SemanticProperties.Description="Captured points for this job">
<CollectionView.EmptyView>
<Label Text="No points logged for this job yet." TextColor="Gray" Margin="8" />
<Border Style="{StaticResource UlCard}" BackgroundColor="{DynamicResource UlColorSurfaceRaised}"
Stroke="{DynamicResource UlColorBorder}"
StrokeShape="RoundRectangle 12" Padding="24">
<VerticalStackLayout Spacing="8">
<Label Text="No captures for this job" Style="{StaticResource UlEmptyStateTitle}"
HorizontalTextAlignment="Center" TextColor="{DynamicResource UlColorText}" />
<Label Text="Return Home and press LOG on the receiver when the job is active."
Style="{StaticResource UlEmptyStateBody}"
FontSize="16" HorizontalTextAlignment="Center"
TextColor="{DynamicResource UlColorTextMuted}" />
</VerticalStackLayout>
</Border>
</CollectionView.EmptyView>
<CollectionView.ItemTemplate>
<DataTemplate x:DataType="models:LoggedPoint">
<Border StrokeThickness="0" Background="{AppThemeBinding Light=#F2F2F7, Dark=#1C1C1E}"
StrokeShape="RoundRectangle 10" Padding="12" Margin="0,4">
<Grid ColumnDefinitions="*,Auto" RowDefinitions="Auto,Auto,Auto,Auto" RowSpacing="2">
<Label Grid.Row="0" FontAttributes="Bold" FontSize="14">
<Border Style="{StaticResource UlJobRow}" BackgroundColor="{DynamicResource UlColorSurfaceRaised}"
Stroke="{DynamicResource UlColorBorder}" StrokeShape="RoundRectangle 12"
Padding="16" Margin="0,0,0,12" MinimumHeightRequest="168">
<Grid ColumnDefinitions="*,Auto" RowDefinitions="Auto,Auto,Auto,Auto" RowSpacing="8" ColumnSpacing="12">
<Label FontSize="18" FontAttributes="Bold" TextColor="{DynamicResource UlColorText}">
<Label.Text>
<MultiBinding StringFormat="{}#{0} · {1} · {2} Hz">
<MultiBinding StringFormat="{}Point #{0} · {1} · {2} Hz">
<Binding Path="Id" />
<Binding Path="Utility" Converter="{StaticResource UtilityName}" />
<Binding Path="Frequency" />
</MultiBinding>
</Label.Text>
</Label>
<Label Grid.Row="0" Grid.Column="1" FontSize="12" TextColor="Gray"
<Label Grid.Column="1" FontSize="14" TextColor="{DynamicResource UlColorTextMuted}"
Text="{Binding TimestampUtc, StringFormat='{0:g}'}" />
<Label Grid.Row="1" Grid.ColumnSpan="2" FontSize="12">
<Label Grid.Row="1" Grid.ColumnSpan="2" FontSize="16"
TextColor="{DynamicResource UlColorText}">
<Label.Text>
<MultiBinding StringFormat="Depth {0} · Current {1} · Signal {2} · Gain {3} dB">
<Binding Path="DepthRaw" />
@@ -45,8 +72,8 @@
</MultiBinding>
</Label.Text>
</Label>
<Label Grid.Row="2" Grid.ColumnSpan="2" FontSize="12" FontFamily="Courier New">
<Label Grid.Row="2" Grid.ColumnSpan="2" FontSize="16" FontFamily="{StaticResource UlTypeFamilyMono}"
TextColor="{DynamicResource UlColorText}">
<Label.Text>
<MultiBinding StringFormat="{}{0:F8}, {1:F8}">
<Binding Path="Latitude" />
@@ -54,20 +81,22 @@
</MultiBinding>
</Label.Text>
</Label>
<Label Grid.Row="3" FontSize="11" TextColor="Gray">
<Label Grid.Row="3" FontSize="14" TextColor="{DynamicResource UlColorTextMuted}">
<Label.Text>
<MultiBinding StringFormat="{}{0} · H ±{1:F3} m · {2} sats">
<MultiBinding StringFormat="{}{0} · H ±{1:F3} m · {2} satellites">
<Binding Path="FixStatus" Converter="{StaticResource FixStatusName}" />
<Binding Path="Hrms" />
<Binding Path="SatellitesUsed" />
</MultiBinding>
</Label.Text>
</Label>
<Button Grid.Row="3" Grid.Column="1" Text="Delete" FontSize="11" Padding="8,2"
BackgroundColor="Transparent" TextColor="IndianRed"
<Button Grid.Row="3" Grid.Column="1" Style="{StaticResource UlButtonAccent}"
Text="Delete point" MinimumHeightRequest="{StaticResource UlTouchMinimum}"
BackgroundColor="{DynamicResource UlColorAccent}"
TextColor="{DynamicResource UlColorOnAccent}"
Command="{Binding DeletePointCommand, Source={RelativeSource AncestorType={x:Type vm:JobDetailViewModel}}}"
CommandParameter="{Binding .}" />
CommandParameter="{Binding .}"
SemanticProperties.Description="Delete this locally saved point" />
</Grid>
</Border>
</DataTemplate>