107 lines
7.3 KiB
XML
107 lines
7.3 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:models="clr-namespace:FieldLogger.Models"
|
|
x:Class="FieldLogger.Views.JobDetailPage"
|
|
x:DataType="vm:JobDetailViewModel"
|
|
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>
|
|
|
|
<CollectionView Grid.Row="1" ItemsSource="{Binding Points}"
|
|
SemanticProperties.Description="Captured points for this job">
|
|
<CollectionView.EmptyView>
|
|
<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 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="{}Point #{0} · {1} · {2} Hz">
|
|
<Binding Path="Id" />
|
|
<Binding Path="Utility" Converter="{StaticResource UtilityName}" />
|
|
<Binding Path="Frequency" />
|
|
</MultiBinding>
|
|
</Label.Text>
|
|
</Label>
|
|
<Label Grid.Column="1" FontSize="14" TextColor="{DynamicResource UlColorTextMuted}"
|
|
Text="{Binding TimestampUtc, StringFormat='{0:g}'}" />
|
|
<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" />
|
|
<Binding Path="CurrentRaw" />
|
|
<Binding Path="Signal" />
|
|
<Binding Path="GainDb" />
|
|
</MultiBinding>
|
|
</Label.Text>
|
|
</Label>
|
|
<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" />
|
|
<Binding Path="Longitude" />
|
|
</MultiBinding>
|
|
</Label.Text>
|
|
</Label>
|
|
<Label Grid.Row="3" FontSize="14" TextColor="{DynamicResource UlColorTextMuted}">
|
|
<Label.Text>
|
|
<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" 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 .}"
|
|
SemanticProperties.Description="Delete this locally saved point" />
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
</Grid>
|
|
</ContentPage>
|