113 lines
5.1 KiB
XML
113 lines
5.1 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage
|
|
x:Class="cfs_tracker.Views.DayPage"
|
|
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
|
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
x:Name="ThisPage"
|
|
Title="Tag">
|
|
|
|
<ScrollView>
|
|
<VerticalStackLayout Padding="16" Spacing="14">
|
|
|
|
<Grid ColumnDefinitions="Auto,*,Auto,Auto">
|
|
<Button
|
|
Grid.Column="0"
|
|
Text="◀"
|
|
WidthRequest="52"
|
|
HeightRequest="44"
|
|
Command="{Binding PreviousDayCommand}" />
|
|
|
|
<Label
|
|
Grid.Column="1"
|
|
Text="{Binding SelectedDateText}"
|
|
HorizontalTextAlignment="Center"
|
|
VerticalTextAlignment="Center"
|
|
FontSize="22"
|
|
FontAttributes="Bold" />
|
|
|
|
<Button
|
|
Grid.Column="2"
|
|
Text="Heute"
|
|
Margin="8,0,0,0"
|
|
Command="{Binding TodayCommand}" />
|
|
|
|
<Button
|
|
Grid.Column="3"
|
|
Text="+"
|
|
Margin="8,0,0,0"
|
|
WidthRequest="52"
|
|
HeightRequest="44"
|
|
Command="{Binding AddEntryCommand}" />
|
|
</Grid>
|
|
|
|
<Grid ColumnDefinitions="*,*" RowDefinitions="Auto,Auto" ColumnSpacing="10" RowSpacing="10">
|
|
|
|
<Border Grid.Row="0" Grid.Column="0" BackgroundColor="#4CAF50" StrokeThickness="0" StrokeShape="RoundRectangle 12" Padding="12">
|
|
<VerticalStackLayout>
|
|
<Label Text="Grün" TextColor="White" FontAttributes="Bold" />
|
|
<Label Text="{Binding GreenCount}" TextColor="White" FontSize="22" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
|
|
<Border Grid.Row="0" Grid.Column="1" BackgroundColor="#FBC02D" StrokeThickness="0" StrokeShape="RoundRectangle 12" Padding="12">
|
|
<VerticalStackLayout>
|
|
<Label Text="Gelb" FontAttributes="Bold" />
|
|
<Label Text="{Binding YellowCount}" FontSize="22" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
|
|
<Border Grid.Row="1" Grid.Column="0" BackgroundColor="#E53935" StrokeThickness="0" StrokeShape="RoundRectangle 12" Padding="12">
|
|
<VerticalStackLayout>
|
|
<Label Text="Rot" TextColor="White" FontAttributes="Bold" />
|
|
<Label Text="{Binding RedCount}" TextColor="White" FontSize="22" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
|
|
<Border Grid.Row="1" Grid.Column="1" BackgroundColor="#757575" StrokeThickness="0" StrokeShape="RoundRectangle 12" Padding="12">
|
|
<VerticalStackLayout>
|
|
<Label Text="Grau" TextColor="White" FontAttributes="Bold" />
|
|
<Label Text="{Binding GrayCount}" TextColor="White" FontSize="22" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
|
|
</Grid>
|
|
|
|
<CollectionView ItemsSource="{Binding Entries}" SelectionMode="None">
|
|
<CollectionView.ItemTemplate>
|
|
<DataTemplate>
|
|
<Border
|
|
Margin="0,0,0,8"
|
|
Padding="12"
|
|
BackgroundColor="{Binding BackgroundColor}"
|
|
StrokeThickness="0"
|
|
StrokeShape="RoundRectangle 12">
|
|
|
|
<Grid ColumnDefinitions="Auto,*,Auto" ColumnSpacing="12">
|
|
<Label
|
|
Grid.Column="0"
|
|
Text="{Binding TimeText}"
|
|
TextColor="{Binding TextColor}"
|
|
FontAttributes="Bold"
|
|
VerticalOptions="Center" />
|
|
|
|
<VerticalStackLayout Grid.Column="1" Spacing="2">
|
|
<Label Text="{Binding StateText}" TextColor="{Binding TextColor}" FontAttributes="Bold" />
|
|
<Label Text="{Binding SourceText}" TextColor="{Binding TextColor}" FontSize="12" />
|
|
</VerticalStackLayout>
|
|
|
|
<Button
|
|
Grid.Column="2"
|
|
Text="X"
|
|
WidthRequest="44"
|
|
HeightRequest="44"
|
|
Command="{Binding Source={x:Reference ThisPage}, Path=BindingContext.DeleteEntryCommand}"
|
|
CommandParameter="{Binding .}" />
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</CollectionView.ItemTemplate>
|
|
</CollectionView>
|
|
|
|
</VerticalStackLayout>
|
|
</ScrollView>
|
|
</ContentPage> |