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:
+153
-19
@@ -1,23 +1,157 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<ContentPage x:Class="cfs_tracker.Views.QuickEntryPage"
|
||||
<ContentPage
|
||||
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
||||
Title="Eintrag">
|
||||
<ScrollView><VerticalStackLayout Padding="20" Spacing="18">
|
||||
<Label Text="Wie geht es dir?" FontSize="28" FontAttributes="Bold" HorizontalTextAlignment="Center" />
|
||||
<Label Text="{Binding SelectedDateText}" FontSize="16" HorizontalTextAlignment="Center" />
|
||||
<VerticalStackLayout IsVisible="{Binding IsPastDate}" Spacing="8">
|
||||
<Label Text="Tageszeit" FontAttributes="Bold" HorizontalTextAlignment="Center" />
|
||||
<Picker Title="Tageszeit" ItemsSource="{Binding AvailableParts}" SelectedItem="{Binding SelectedPartText}" />
|
||||
xmlns:viewModels="clr-namespace:cfs_tracker.ViewModels"
|
||||
x:DataType="viewModels:QuickEntryViewModel"
|
||||
x:Class="cfs_tracker.Views.QuickEntryPage"
|
||||
Title="Eintrag"
|
||||
BackgroundColor="{DynamicResource AppBackground}">
|
||||
|
||||
<ScrollView>
|
||||
<VerticalStackLayout Padding="16" Spacing="16">
|
||||
|
||||
<Label Text="{Binding SelectedDateText}"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
HorizontalTextAlignment="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Label Text="{Binding ModeText}"
|
||||
IsVisible="{Binding IsFutureDate}"
|
||||
HorizontalTextAlignment="Center"
|
||||
TextColor="IndianRed" />
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14"
|
||||
IsVisible="{Binding IsPastDate}">
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Label Text="Nachtrag"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Picker Title="Tageszeit"
|
||||
ItemsSource="{Binding Parts}"
|
||||
ItemDisplayBinding="{Binding Name}"
|
||||
SelectedItem="{Binding SelectedPart}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Label Text="Tätigkeit"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Picker Title="Tätigkeit"
|
||||
ItemsSource="{Binding Activities}"
|
||||
ItemDisplayBinding="{Binding Name}"
|
||||
SelectedItem="{Binding SelectedActivity}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Label Text="Symptome"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding Symptoms}"
|
||||
Spacing="6">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:SelectableSymptomItemViewModel">
|
||||
<Grid ColumnDefinitions="Auto,*"
|
||||
ColumnSpacing="10"
|
||||
Padding="0,4">
|
||||
<CheckBox IsChecked="{Binding IsSelected}" />
|
||||
<Label Grid.Column="1"
|
||||
Text="{Binding Name}"
|
||||
VerticalOptions="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Grid ColumnDefinitions="*,*"
|
||||
RowDefinitions="Auto,Auto"
|
||||
ColumnSpacing="12"
|
||||
RowSpacing="12">
|
||||
<Button Grid.Row="0"
|
||||
Grid.Column="0"
|
||||
Text="{Binding GreenStatusText}"
|
||||
FontSize="22"
|
||||
FontAttributes="Bold"
|
||||
HeightRequest="110"
|
||||
BackgroundColor="{Binding GreenStateColor}"
|
||||
TextColor="White"
|
||||
Command="{Binding SaveGreenCommand}"
|
||||
IsEnabled="{Binding CanSave}" />
|
||||
|
||||
<Button Grid.Row="0"
|
||||
Grid.Column="1"
|
||||
Text="{Binding YellowStatusText}"
|
||||
FontSize="22"
|
||||
FontAttributes="Bold"
|
||||
HeightRequest="110"
|
||||
BackgroundColor="{Binding YellowStateColor}"
|
||||
TextColor="Black"
|
||||
Command="{Binding SaveYellowCommand}"
|
||||
IsEnabled="{Binding CanSave}" />
|
||||
|
||||
<Button Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
Text="{Binding RedStatusText}"
|
||||
FontSize="22"
|
||||
FontAttributes="Bold"
|
||||
HeightRequest="110"
|
||||
BackgroundColor="{Binding RedStateColor}"
|
||||
TextColor="White"
|
||||
Command="{Binding SaveRedCommand}"
|
||||
IsEnabled="{Binding CanSave}" />
|
||||
|
||||
<Button Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Text="{Binding GrayStatusText}"
|
||||
FontSize="22"
|
||||
FontAttributes="Bold"
|
||||
HeightRequest="110"
|
||||
BackgroundColor="{Binding GrayStateColor}"
|
||||
TextColor="White"
|
||||
Command="{Binding SaveGrayCommand}"
|
||||
IsEnabled="{Binding CanSave}" />
|
||||
</Grid>
|
||||
|
||||
<Border Padding="12"
|
||||
IsVisible="{Binding ShowSaveButton}"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="10">
|
||||
<Label Text="{Binding SelectedStateSummaryText}"
|
||||
HorizontalTextAlignment="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Button Text="Eintrag speichern"
|
||||
Command="{Binding SaveCommand}"
|
||||
IsEnabled="{Binding CanExplicitSave}"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
HorizontalOptions="Fill" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Button Text="Abbrechen"
|
||||
Command="{Binding CancelCommand}"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
HorizontalOptions="Fill" />
|
||||
</VerticalStackLayout>
|
||||
<Border Padding="12"><VerticalStackLayout Spacing="8"><Label Text="Tätigkeit" FontAttributes="Bold" /><Picker Title="Tätigkeit" ItemsSource="{Binding Activities}" ItemDisplayBinding="{Binding Name}" SelectedItem="{Binding SelectedActivity}" /></VerticalStackLayout></Border>
|
||||
<Border Padding="12"><VerticalStackLayout Spacing="8"><Label Text="Symptome" FontAttributes="Bold" /><CollectionView ItemsSource="{Binding Symptoms}" SelectionMode="None"><CollectionView.ItemTemplate><DataTemplate><Grid ColumnDefinitions="Auto,*" Padding="0,4"><CheckBox IsChecked="{Binding IsSelected}" /><Label Grid.Column="1" Text="{Binding Name}" VerticalOptions="Center" /></Grid></DataTemplate></CollectionView.ItemTemplate></CollectionView></VerticalStackLayout></Border>
|
||||
<Label IsVisible="{Binding IsFutureDate}" Text="Für zukünftige Tage können keine Einträge gesetzt werden." TextColor="{StaticResource StateRed}" HorizontalTextAlignment="Center" />
|
||||
<Grid ColumnDefinitions="*,*" RowDefinitions="Auto,Auto" ColumnSpacing="12" RowSpacing="12">
|
||||
<Button Grid.Row="0" Grid.Column="0" Text="Grün Gut" FontSize="22" FontAttributes="Bold" HeightRequest="120" BackgroundColor="{StaticResource StateGreen}" TextColor="White" Command="{Binding SaveGreenCommand}" />
|
||||
<Button Grid.Row="0" Grid.Column="1" Text="Gelb So lala" FontSize="22" FontAttributes="Bold" HeightRequest="120" BackgroundColor="{StaticResource StateYellow}" TextColor="Black" Command="{Binding SaveYellowCommand}" />
|
||||
<Button Grid.Row="1" Grid.Column="0" Text="Rot Schlecht" FontSize="22" FontAttributes="Bold" HeightRequest="120" BackgroundColor="{StaticResource StateRed}" TextColor="White" Command="{Binding SaveRedCommand}" />
|
||||
<Button Grid.Row="1" Grid.Column="1" Text="Grau Totalausfall" FontSize="22" FontAttributes="Bold" HeightRequest="120" BackgroundColor="{StaticResource StateGray}" TextColor="White" Command="{Binding SaveGrayCommand}" />
|
||||
</Grid>
|
||||
</VerticalStackLayout></ScrollView>
|
||||
</ContentPage>
|
||||
</ScrollView>
|
||||
</ContentPage>
|
||||
Reference in New Issue
Block a user