Farbpalette vorladen lassen

Bootstraper läd jetzt die farbeinstellung sofort und nicht nachträglich

cleanup and rework

PDF switch to HTML

export fix

Colorsystem

Farben für knöpfe hinzugefügt als anpassung

button color

button color primary and secondary change
This commit is contained in:
2026-03-23 22:42:52 +01:00
parent d5649dc189
commit d85f2e0fb3
84 changed files with 4216 additions and 1814 deletions
+132 -188
View File
@@ -1,210 +1,154 @@
<?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">
<ContentPage x:Class="cfs_tracker.Views.DayPage"
x:Name="RootPage"
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:viewModels="clr-namespace:cfs_tracker.ViewModels"
x:DataType="viewModels:DayViewModel"
Title="Tag"
BackgroundColor="{DynamicResource AppBackground}">
<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}" />
<VerticalStackLayout Padding="16" Spacing="16">
<Grid ColumnDefinitions="Auto,*,Auto"
VerticalOptions="Center">
<Button Text="←"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding PreviousDayCommand}" />
<Label Grid.Column="1"
Text="{Binding SelectedDateText}"
HorizontalTextAlignment="Center"
VerticalTextAlignment="Center"
FontSize="20"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<Button Grid.Column="2"
Text="→"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding NextDayCommand}" />
</Grid>
<Grid ColumnDefinitions="*,*" RowDefinitions="Auto,Auto" ColumnSpacing="10" RowSpacing="10">
<Border
Grid.Row="0"
Grid.Column="0"
BackgroundColor="{DynamicResource StateGreen}"
StrokeThickness="0"
StrokeShape="RoundRectangle 12"
Padding="12">
<Border.GestureRecognizers>
<TapGestureRecognizer Command="{Binding SaveGreenQuickCommand}" />
</Border.GestureRecognizers>
<VerticalStackLayout>
<Label Text="{Binding GreenStatusText}" TextColor="White" FontAttributes="Bold" />
<Label Text="{Binding GreenCount}" TextColor="White" FontSize="22" />
</VerticalStackLayout>
</Border>
<Border
Grid.Row="0"
Grid.Column="1"
BackgroundColor="{DynamicResource StateYellow}"
StrokeThickness="0"
StrokeShape="RoundRectangle 12"
Padding="12">
<Border.GestureRecognizers>
<TapGestureRecognizer Command="{Binding SaveYellowQuickCommand}" />
</Border.GestureRecognizers>
<VerticalStackLayout>
<Label Text="{Binding YellowStatusText}" TextColor="White" FontAttributes="Bold" />
<Label Text="{Binding YellowCount}" TextColor="White" FontSize="22" />
</VerticalStackLayout>
</Border>
<Border
Grid.Row="1"
Grid.Column="0"
BackgroundColor="{DynamicResource StateRed}"
StrokeThickness="0"
StrokeShape="RoundRectangle 12"
Padding="12">
<Border.GestureRecognizers>
<TapGestureRecognizer Command="{Binding SaveRedQuickCommand}" />
</Border.GestureRecognizers>
<VerticalStackLayout>
<Label Text="{Binding RedStatusText}" TextColor="White" FontAttributes="Bold" />
<Label Text="{Binding RedCount}" TextColor="White" FontSize="22" />
</VerticalStackLayout>
</Border>
<Border
Grid.Row="1"
Grid.Column="1"
BackgroundColor="{DynamicResource StateGray}"
StrokeThickness="0"
StrokeShape="RoundRectangle 12"
Padding="12">
<Border.GestureRecognizers>
<TapGestureRecognizer Command="{Binding SaveGrayQuickCommand}" />
</Border.GestureRecognizers>
<VerticalStackLayout>
<Label Text="{Binding GrayStatusText}" TextColor="White" FontAttributes="Bold" />
<Label Text="{Binding GrayCount}" TextColor="White" FontSize="22" />
</VerticalStackLayout>
</Border>
<Grid ColumnDefinitions="*,*"
ColumnSpacing="12">
<Button Text="Heute"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding TodayCommand}" />
<Button Grid.Column="1"
Text="Export"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding ExportPdfCommand}" />
</Grid>
<Label
Text="Einträge"
FontSize="20"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<Grid ColumnDefinitions="*,*"
RowDefinitions="Auto,Auto"
ColumnSpacing="12"
RowSpacing="12">
<Button Grid.Row="0"
Grid.Column="0"
Text="{Binding GreenCounterText}"
HeightRequest="92"
Command="{Binding SaveGreenQuickCommand}"
BackgroundColor="{Binding GreenStateColor}"
TextColor="White" />
<CollectionView
ItemsSource="{Binding Entries}"
SelectionMode="None">
<Button Grid.Row="0"
Grid.Column="1"
Text="{Binding YellowCounterText}"
HeightRequest="92"
Command="{Binding SaveYellowQuickCommand}"
BackgroundColor="{Binding YellowStateColor}"
TextColor="Black" />
<Button Grid.Row="1"
Grid.Column="0"
Text="{Binding RedCounterText}"
HeightRequest="92"
Command="{Binding SaveRedQuickCommand}"
BackgroundColor="{Binding RedStateColor}"
TextColor="White" />
<Button Grid.Row="1"
Grid.Column="1"
Text="{Binding GrayCounterText}"
HeightRequest="92"
Command="{Binding SaveGrayQuickCommand}"
BackgroundColor="{Binding GrayStateColor}"
TextColor="White" />
</Grid>
<Button Text="{Binding AddEntryButtonText}"
Command="{Binding AddEntryCommand}"
Style="{StaticResource PrimaryButtonStyle}"
IsEnabled="{Binding CanAddEntry}" />
<Label Text="Noch keine Einträge vorhanden."
IsVisible="{Binding HasNoEntries}"
HorizontalTextAlignment="Center"
TextColor="{DynamicResource TextMuted}" />
<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">
<VerticalStackLayout Spacing="8">
<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" />
<Button
Text="{Binding FoldoutText}"
Command="{Binding ToggleExpandedCommand}"
IsVisible="{Binding HasDetails}"
Padding="0"
FontSize="12"
BackgroundColor="Transparent"
TextColor="{Binding TextColor}"
HorizontalOptions="Start" />
<DataTemplate x:DataType="viewModels:DayEntryItemViewModel">
<Border Margin="0,0,0,12"
Padding="12"
Stroke="{DynamicResource Border}"
BackgroundColor="{DynamicResource SurfaceBackground}"
StrokeShape="RoundRectangle 14">
<VerticalStackLayout Spacing="10">
<Grid ColumnDefinitions="*,Auto,Auto"
ColumnSpacing="10">
<VerticalStackLayout Spacing="4">
<Label Text="{Binding SlotText}"
FontAttributes="Bold"
TextColor="{DynamicResource TextMuted}" />
<Label Text="{Binding StateText}"
FontSize="18"
FontAttributes="Bold"
TextColor="{Binding ForegroundColor}" />
</VerticalStackLayout>
<Button
Grid.Column="2"
Text="X"
WidthRequest="44"
HeightRequest="44"
Command="{Binding Source={x:Reference ThisPage}, Path=BindingContext.DeleteEntryCommand}"
CommandParameter="{Binding .}" />
<Button Grid.Column="1"
Text="Bearbeiten"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.EditEntryCommand}"
CommandParameter="{Binding .}" />
<Button Grid.Column="2"
Text="Löschen"
Style="{StaticResource SecondaryButtonStyle}"
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.DeleteEntryCommand}"
CommandParameter="{Binding .}" />
</Grid>
<Border
IsVisible="{Binding IsExpanded}"
Padding="10"
BackgroundColor="{DynamicResource PanelBackground2}"
Stroke="{DynamicResource PanelBorder}"
StrokeThickness="1"
StrokeShape="RoundRectangle 10">
<VerticalStackLayout Spacing="6">
<VerticalStackLayout IsVisible="{Binding HasActivity}" Spacing="2">
<Label
Text="Tätigkeit"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<Label
Text="{Binding ActivityText}"
TextColor="{DynamicResource TextMuted}" />
</VerticalStackLayout>
<VerticalStackLayout IsVisible="{Binding HasSymptoms}" Spacing="2">
<Label
Text="Symptome"
FontAttributes="Bold"
TextColor="{DynamicResource TextPrimary}" />
<Label
Text="{Binding SymptomsText}"
TextColor="{DynamicResource TextMuted}" />
</VerticalStackLayout>
</VerticalStackLayout>
<Border Padding="8"
StrokeThickness="0"
StrokeShape="RoundRectangle 10"
BackgroundColor="{Binding StateColor}">
<Label Text="{Binding StateText}"
FontAttributes="Bold"
TextColor="{Binding ForegroundColor}" />
</Border>
<Button Text="{Binding DetailsButtonText}"
IsVisible="{Binding HasDetails}"
Style="{StaticResource PrimaryButtonStyle}"
Command="{Binding ToggleExpandedCommand}" />
<VerticalStackLayout IsVisible="{Binding IsExpanded}"
Spacing="6">
<Label Text="{Binding ActivityText, StringFormat='Tätigkeit: {0}'}"
IsVisible="{Binding HasActivity}"
TextColor="{DynamicResource TextPrimary}" />
<Label Text="{Binding SymptomsText, StringFormat='Symptome: {0}'}"
IsVisible="{Binding HasSymptoms}"
TextColor="{DynamicResource TextPrimary}" />
</VerticalStackLayout>
</VerticalStackLayout>
</Border>
</DataTemplate>
</CollectionView.ItemTemplate>
</CollectionView>
</VerticalStackLayout>
</ScrollView>
</ContentPage>
</ContentPage>