Options fix
clean up and fixes - Heute gefixt - Code Cleanup NotificationScheduleItemViewModel -fixed NotificationScheduleItemViewModel for Windows compat push implementation Push fixes Push benachrichtungen eingebaut - Status bei push - Push auch in background - Toggle für symtome angepasst push system change exporter update Optionen fix - Optionen aufgeteilt auf 3 tabs - Anpassungen haben jetzt Farbslider Optimierung fix
This commit is contained in:
+6
-3
@@ -111,13 +111,13 @@
|
||||
<Button Grid.Column="1"
|
||||
Text="Bearbeiten"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.EditEntryCommand}"
|
||||
Command="{Binding Source={RelativeSource AncestorType={x:Type viewModels:DayViewModel}}, Path=EditEntryCommand, x:DataType='viewModels:DayViewModel'}"
|
||||
CommandParameter="{Binding .}" />
|
||||
|
||||
<Button Grid.Column="2"
|
||||
Text="Löschen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.DeleteEntryCommand}"
|
||||
Command="{Binding Source={RelativeSource AncestorType={x:Type viewModels:DayViewModel}}, Path=DeleteEntryCommand, x:DataType='viewModels:DayViewModel'}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Grid>
|
||||
|
||||
@@ -140,6 +140,9 @@
|
||||
<Label Text="{Binding ActivityText, StringFormat='Tätigkeit: {0}'}"
|
||||
IsVisible="{Binding HasActivity}"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Label Text="{Binding DurationText, StringFormat='Dauer: {0}'}"
|
||||
IsVisible="{Binding HasDuration}"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Label Text="{Binding SymptomsText, StringFormat='Symptome: {0}'}"
|
||||
IsVisible="{Binding HasSymptoms}"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
@@ -151,4 +154,4 @@
|
||||
</CollectionView>
|
||||
</VerticalStackLayout>
|
||||
</ScrollView>
|
||||
</ContentPage>
|
||||
</ContentPage>
|
||||
@@ -65,7 +65,7 @@
|
||||
StrokeShape="RoundRectangle 10">
|
||||
<Border.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.OpenDayCommand}"
|
||||
Command="{Binding Source={RelativeSource AncestorType={x:Type viewModels:MonthViewModel}}, Path=OpenDayCommand, x:DataType='viewModels:MonthViewModel'}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Border.GestureRecognizers>
|
||||
|
||||
|
||||
+594
-287
@@ -8,6 +8,25 @@
|
||||
Title="Optionen"
|
||||
BackgroundColor="{DynamicResource AppBackground}">
|
||||
|
||||
<ContentPage.Resources>
|
||||
<Style x:Key="DayToggleButtonStyle" TargetType="Button">
|
||||
<Setter Property="CornerRadius" Value="10" />
|
||||
<Setter Property="Padding" Value="8,6" />
|
||||
<Setter Property="FontSize" Value="12" />
|
||||
<Setter Property="TextColor" Value="{DynamicResource ButtonPrimaryText}" />
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource ButtonPrimaryBackground}" />
|
||||
</Style>
|
||||
|
||||
<Style x:Key="OptionsTabButtonStyle" TargetType="Button">
|
||||
<Setter Property="CornerRadius" Value="14" />
|
||||
<Setter Property="Padding" Value="12,10" />
|
||||
<Setter Property="TextColor" Value="{DynamicResource ButtonPrimaryText}" />
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource ButtonPrimaryBackground}" />
|
||||
<Setter Property="FontAttributes" Value="Bold" />
|
||||
</Style>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<Grid>
|
||||
<ScrollView>
|
||||
<VerticalStackLayout Padding="16" Spacing="16">
|
||||
<Label Text="Optionen"
|
||||
@@ -20,299 +39,587 @@
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Aussehen"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}">
|
||||
<Grid ColumnDefinitions="*,*,*"
|
||||
ColumnSpacing="10">
|
||||
<Button Text="Aussehen"
|
||||
Style="{StaticResource OptionsTabButtonStyle}"
|
||||
Command="{Binding ShowAppearanceTabCommand}">
|
||||
<Button.Triggers>
|
||||
<DataTrigger TargetType="Button"
|
||||
Binding="{Binding IsAppearanceTabSelected}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Button.Triggers>
|
||||
</Button>
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding AppearanceColors}"
|
||||
Spacing="10">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:AppearanceColorItemViewModel">
|
||||
<Grid ColumnDefinitions="*,120"
|
||||
ColumnSpacing="10"
|
||||
Padding="0,6">
|
||||
<VerticalStackLayout>
|
||||
<Label Text="{Binding Title}"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Entry Text="{Binding Value}"
|
||||
Placeholder="#112233" />
|
||||
</VerticalStackLayout>
|
||||
<Button Grid.Column="1"
|
||||
Text="Push-Nachrichten"
|
||||
Style="{StaticResource OptionsTabButtonStyle}"
|
||||
Command="{Binding ShowNotificationsTabCommand}">
|
||||
<Button.Triggers>
|
||||
<DataTrigger TargetType="Button"
|
||||
Binding="{Binding IsNotificationsTabSelected}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Button.Triggers>
|
||||
</Button>
|
||||
|
||||
<Border Grid.Column="1"
|
||||
Padding="8"
|
||||
<Button Grid.Column="2"
|
||||
Text="Datenverwaltung"
|
||||
Style="{StaticResource OptionsTabButtonStyle}"
|
||||
Command="{Binding ShowDataManagementTabCommand}">
|
||||
<Button.Triggers>
|
||||
<DataTrigger TargetType="Button"
|
||||
Binding="{Binding IsDataManagementTabSelected}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Button.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
</Border>
|
||||
|
||||
<VerticalStackLayout IsVisible="{Binding IsAppearanceTabSelected}"
|
||||
Spacing="16">
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
StrokeShape="RoundRectangle 8"
|
||||
BackgroundColor="{Binding PreviewColor}">
|
||||
<Label Text="{Binding Value}"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalTextAlignment="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
</Border>
|
||||
</Grid>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding StatusTexts}"
|
||||
Spacing="10">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:AppearanceTextItemViewModel">
|
||||
<VerticalStackLayout Spacing="4"
|
||||
Padding="0,6">
|
||||
<Label Text="{Binding Title}"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Entry Text="{Binding Value}" />
|
||||
</VerticalStackLayout>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<Grid ColumnDefinitions="*,*"
|
||||
ColumnSpacing="12">
|
||||
<Button Text="Speichern"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding SaveAppearanceCommand}" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Zurücksetzen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding ResetAppearanceCommand}" />
|
||||
</Grid>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Tätigkeiten"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Grid ColumnDefinitions="*,Auto"
|
||||
ColumnSpacing="10">
|
||||
<Entry Text="{Binding NewActivityName}"
|
||||
Placeholder="Neue Tätigkeit" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Hinzufügen"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding AddActivityCommand}" />
|
||||
</Grid>
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding Activities}"
|
||||
Spacing="10">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:ActivityManageItemViewModel">
|
||||
<Border Padding="10"
|
||||
Stroke="{DynamicResource Border}"
|
||||
StrokeShape="RoundRectangle 10"
|
||||
BackgroundColor="{DynamicResource SurfaceBackgroundAlt}">
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Entry Text="{Binding Name}" />
|
||||
<Label Text="{Binding UsageHint}"
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
<Grid ColumnDefinitions="*,*,*"
|
||||
ColumnSpacing="8">
|
||||
<Button Text="Speichern"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.SaveActivityCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Aktiv/Inaktiv"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.ToggleActivityActiveCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
<Button Grid.Column="2"
|
||||
Text="Entfernen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.DeleteActivityCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Grid>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Symptome"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Grid ColumnDefinitions="*,Auto"
|
||||
ColumnSpacing="10">
|
||||
<Entry Text="{Binding NewSymptomName}"
|
||||
Placeholder="Neues Symptom" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Hinzufügen"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding AddSymptomCommand}" />
|
||||
</Grid>
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding Symptoms}"
|
||||
Spacing="10">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:SymptomManageItemViewModel">
|
||||
<Border Padding="10"
|
||||
Stroke="{DynamicResource Border}"
|
||||
StrokeShape="RoundRectangle 10"
|
||||
BackgroundColor="{DynamicResource SurfaceBackgroundAlt}">
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Entry Text="{Binding Name}" />
|
||||
<Label Text="{Binding UsageHint}"
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
<Grid ColumnDefinitions="*,*,*"
|
||||
ColumnSpacing="8">
|
||||
<Button Text="Speichern"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.SaveSymptomCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Aktiv/Inaktiv"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.ToggleSymptomActiveCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
<Button Grid.Column="2"
|
||||
Text="Entfernen"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.DeleteSymptomCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Grid>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Push-Benachrichtigungen"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Label Text="Text: 'Wie geht es dir?' mit Schnellwahl für Gelb, Rot und Grau/Schwarz."
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
|
||||
<Button Text="Zeit hinzufügen"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding AddScheduleCommand}" />
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding NotificationSchedules}"
|
||||
Spacing="10">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:NotificationScheduleItemViewModel">
|
||||
<Border Padding="10"
|
||||
Stroke="{DynamicResource Border}"
|
||||
StrokeShape="RoundRectangle 10"
|
||||
BackgroundColor="{DynamicResource SurfaceBackgroundAlt}">
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Picker Title="Wochentag"
|
||||
ItemsSource="{Binding WeekdayOptions}"
|
||||
ItemDisplayBinding="{Binding Name}"
|
||||
SelectedItem="{Binding SelectedWeekday}" />
|
||||
<TimePicker Time="{Binding SelectedTime}" />
|
||||
<Grid ColumnDefinitions="Auto,*"
|
||||
ColumnSpacing="8">
|
||||
<CheckBox IsChecked="{Binding IsEnabled}" />
|
||||
<Label Grid.Column="1"
|
||||
Text="Aktiv"
|
||||
VerticalOptions="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
</Grid>
|
||||
<Button Text="Entfernen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.DeleteScheduleCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<Button Text="Benachrichtigungszeiten speichern"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding SaveSchedulesCommand}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Datenbank"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Label Text="{Binding CurrentDatabasePath, StringFormat='Aktiver Pfad: {0}'}"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
<Grid ColumnDefinitions="Auto,*"
|
||||
ColumnSpacing="8">
|
||||
<CheckBox IsChecked="{Binding UseExternalDatabase}" />
|
||||
<Label Grid.Column="1"
|
||||
Text="Externe Datenbank verwenden"
|
||||
VerticalOptions="Center"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Aussehen"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
</Grid>
|
||||
<Entry Text="{Binding ExternalDatabasePath}"
|
||||
Placeholder="Ordner oder Dateipfad für externe DB" />
|
||||
<Button Text="Datenbankpfad speichern"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding SaveDatabaseLocationCommand}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Alle Einträge löschen"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Label Text="Zum Bestätigen 'löschen' eingeben."
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
<Entry Text="{Binding DeleteConfirmationText}"
|
||||
Placeholder="löschen" />
|
||||
<Button Text="Alles löschen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding DeleteAllDataCommand}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="10">
|
||||
<Label Text="Export"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Label Text="Farben werden direkt im Feld angezeigt. Über "Farbe wählen" öffnet sich ein einzelner Farbdialog mit Zurücksetzen, Abbrechen und Übernehmen."
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
|
||||
<Button Text="Export entleeren"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding ClearExportsCommand}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
<VerticalStackLayout x:Name="AppearanceColorsHost"
|
||||
Spacing="10" />
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding StatusTexts}"
|
||||
Spacing="10">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:AppearanceTextItemViewModel">
|
||||
<VerticalStackLayout Spacing="4"
|
||||
Padding="0,6">
|
||||
<Label Text="{Binding Title}"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Entry Text="{Binding Value}" />
|
||||
</VerticalStackLayout>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<Grid ColumnDefinitions="*,*"
|
||||
ColumnSpacing="12">
|
||||
<Button Text="Speichern"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding SaveAppearanceCommand}" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Zurücksetzen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding ResetAppearanceCommand}" />
|
||||
</Grid>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout IsVisible="{Binding IsNotificationsTabSelected}"
|
||||
Spacing="16">
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Push-Benachrichtigungen"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Label Text="Ein Zeitblock kann auf mehreren Wochentagen aktiv sein."
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
|
||||
<Button Text="Zeit hinzufügen"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding AddScheduleCommand}" />
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding NotificationSchedules}"
|
||||
Spacing="10">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:NotificationScheduleItemViewModel">
|
||||
<Border Padding="10"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackgroundAlt}">
|
||||
<VerticalStackLayout Spacing="10">
|
||||
<Grid ColumnDefinitions="*,Auto,Auto"
|
||||
ColumnSpacing="8">
|
||||
<TimePicker Time="{Binding SelectedTime}" />
|
||||
<CheckBox Grid.Column="1"
|
||||
IsChecked="{Binding IsEnabled}"
|
||||
VerticalOptions="Center" />
|
||||
<Label Grid.Column="2"
|
||||
Text="Aktiv"
|
||||
VerticalOptions="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
</Grid>
|
||||
|
||||
<Grid ColumnDefinitions="*,*,*,*,*,*,*"
|
||||
ColumnSpacing="6">
|
||||
<Button Text="Mo"
|
||||
Style="{StaticResource DayToggleButtonStyle}"
|
||||
Command="{Binding ToggleMondayCommand}">
|
||||
<Button.Triggers>
|
||||
<DataTrigger TargetType="Button"
|
||||
Binding="{Binding Monday}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Button.Triggers>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="1"
|
||||
Text="Di"
|
||||
Style="{StaticResource DayToggleButtonStyle}"
|
||||
Command="{Binding ToggleTuesdayCommand}">
|
||||
<Button.Triggers>
|
||||
<DataTrigger TargetType="Button"
|
||||
Binding="{Binding Tuesday}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Button.Triggers>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="2"
|
||||
Text="Mi"
|
||||
Style="{StaticResource DayToggleButtonStyle}"
|
||||
Command="{Binding ToggleWednesdayCommand}">
|
||||
<Button.Triggers>
|
||||
<DataTrigger TargetType="Button"
|
||||
Binding="{Binding Wednesday}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Button.Triggers>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="3"
|
||||
Text="Do"
|
||||
Style="{StaticResource DayToggleButtonStyle}"
|
||||
Command="{Binding ToggleThursdayCommand}">
|
||||
<Button.Triggers>
|
||||
<DataTrigger TargetType="Button"
|
||||
Binding="{Binding Thursday}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Button.Triggers>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="4"
|
||||
Text="Fr"
|
||||
Style="{StaticResource DayToggleButtonStyle}"
|
||||
Command="{Binding ToggleFridayCommand}">
|
||||
<Button.Triggers>
|
||||
<DataTrigger TargetType="Button"
|
||||
Binding="{Binding Friday}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Button.Triggers>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="5"
|
||||
Text="Sa"
|
||||
Style="{StaticResource DayToggleButtonStyle}"
|
||||
Command="{Binding ToggleSaturdayCommand}">
|
||||
<Button.Triggers>
|
||||
<DataTrigger TargetType="Button"
|
||||
Binding="{Binding Saturday}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Button.Triggers>
|
||||
</Button>
|
||||
|
||||
<Button Grid.Column="6"
|
||||
Text="So"
|
||||
Style="{StaticResource DayToggleButtonStyle}"
|
||||
Command="{Binding ToggleSundayCommand}">
|
||||
<Button.Triggers>
|
||||
<DataTrigger TargetType="Button"
|
||||
Binding="{Binding Sunday}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Button.Triggers>
|
||||
</Button>
|
||||
</Grid>
|
||||
|
||||
<Button Text="Entfernen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.DeleteScheduleCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<Button Text="Benachrichtigungszeiten speichern"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding SaveSchedulesCommand}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<VerticalStackLayout IsVisible="{Binding IsDataManagementTabSelected}"
|
||||
Spacing="16">
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Tätigkeiten"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Grid ColumnDefinitions="*,Auto"
|
||||
ColumnSpacing="10">
|
||||
<Entry Text="{Binding NewActivityName}"
|
||||
Placeholder="Neue Tätigkeit" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Hinzufügen"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding AddActivityCommand}" />
|
||||
</Grid>
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding Activities}"
|
||||
Spacing="10">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:ActivityManageItemViewModel">
|
||||
<Border Padding="10"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackgroundAlt}">
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Entry Text="{Binding Name}" />
|
||||
<Label Text="{Binding UsageHint}"
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
<Grid ColumnDefinitions="*,*,*"
|
||||
ColumnSpacing="8">
|
||||
<Button Text="Speichern"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.SaveActivityCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Aktiv/Inaktiv"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.ToggleActivityActiveCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
<Button Grid.Column="2"
|
||||
Text="Entfernen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.DeleteActivityCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Grid>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Symptome"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Grid ColumnDefinitions="*,Auto"
|
||||
ColumnSpacing="10">
|
||||
<Entry Text="{Binding NewSymptomName}"
|
||||
Placeholder="Neues Symptom" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Hinzufügen"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding AddSymptomCommand}" />
|
||||
</Grid>
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding Symptoms}"
|
||||
Spacing="10">
|
||||
<BindableLayout.ItemTemplate>
|
||||
<DataTemplate x:DataType="viewModels:SymptomManageItemViewModel">
|
||||
<Border Padding="10"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackgroundAlt}">
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Entry Text="{Binding Name}" />
|
||||
<Label Text="{Binding UsageHint}"
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
<Grid ColumnDefinitions="*,*,*"
|
||||
ColumnSpacing="8">
|
||||
<Button Text="Speichern"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.SaveSymptomCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Aktiv/Inaktiv"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.ToggleSymptomActiveCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
<Button Grid.Column="2"
|
||||
Text="Entfernen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.DeleteSymptomCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Grid>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Datenbank"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Label Text="{Binding CurrentDatabasePath, StringFormat='Aktiver Pfad: {0}'}"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
|
||||
<Grid ColumnDefinitions="Auto,*"
|
||||
ColumnSpacing="8">
|
||||
<CheckBox IsChecked="{Binding UseExternalDatabase}" />
|
||||
<Label Grid.Column="1"
|
||||
Text="Externe Datenbank verwenden"
|
||||
VerticalOptions="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
</Grid>
|
||||
|
||||
<Entry Text="{Binding ExternalDatabasePath}"
|
||||
Placeholder="Ordner oder Dateipfad für externe DB" />
|
||||
|
||||
<Label Text="Für SQLite ist ein externer Dateipfad sinnvoll. Für echte Mehrbenutzer-Synchronisierung ist später eher ein eigener Server oder eine API-Schicht besser geeignet."
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
|
||||
<Button Text="Datenbankpfad speichern"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Command="{Binding SaveDatabaseLocationCommand}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}">
|
||||
<VerticalStackLayout Spacing="12">
|
||||
<Label Text="Alle Einträge löschen"
|
||||
FontSize="20"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Label Text="Zum Bestätigen 'löschen' eingeben."
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
<Entry Text="{Binding DeleteConfirmationText}"
|
||||
Placeholder="löschen" />
|
||||
<Button Text="Alles löschen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding DeleteAllDataCommand}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}">
|
||||
<VerticalStackLayout Spacing="10">
|
||||
<Label Text="Export"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Button Text="Export entleeren"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Command="{Binding ClearExportsCommand}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</VerticalStackLayout>
|
||||
</VerticalStackLayout>
|
||||
</ScrollView>
|
||||
|
||||
<Grid x:Name="ColorDialogOverlay"
|
||||
IsVisible="False"
|
||||
BackgroundColor="#99000000"
|
||||
Padding="20"
|
||||
InputTransparent="False">
|
||||
<Border Padding="16"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
HorizontalOptions="Center"
|
||||
VerticalOptions="Center"
|
||||
MaximumWidthRequest="560">
|
||||
<VerticalStackLayout Spacing="14">
|
||||
<Label x:Name="ColorDialogTitleLabel"
|
||||
Text="Farbe bearbeiten"
|
||||
FontSize="22"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<Label x:Name="ColorDialogDefaultLabel"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
|
||||
<Grid ColumnDefinitions="*,110"
|
||||
ColumnSpacing="10">
|
||||
<Entry x:Name="DialogHexEntry"
|
||||
Placeholder="#112233"
|
||||
TextChanged="OnDialogHexEntryTextChanged"
|
||||
Unfocused="OnDialogHexEntryUnfocused" />
|
||||
|
||||
<Border Grid.Column="1"
|
||||
x:Name="DialogPreviewBorder"
|
||||
Padding="8"
|
||||
Stroke="{DynamicResource Border}">
|
||||
<Label x:Name="DialogPreviewLabel"
|
||||
HorizontalTextAlignment="Center"
|
||||
VerticalTextAlignment="Center"
|
||||
LineBreakMode="NoWrap"
|
||||
FontSize="12" />
|
||||
</Border>
|
||||
</Grid>
|
||||
|
||||
<Grid ColumnDefinitions="80,*,56"
|
||||
ColumnSpacing="10">
|
||||
<Label Text="Rot"
|
||||
VerticalOptions="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Slider x:Name="DialogRedSlider"
|
||||
Grid.Column="1"
|
||||
Minimum="0"
|
||||
Maximum="255"
|
||||
ValueChanged="OnDialogSliderValueChanged" />
|
||||
<Label x:Name="DialogRedValueLabel"
|
||||
Grid.Column="2"
|
||||
HorizontalTextAlignment="End"
|
||||
VerticalTextAlignment="Center"
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
</Grid>
|
||||
|
||||
<Grid ColumnDefinitions="80,*,56"
|
||||
ColumnSpacing="10">
|
||||
<Label Text="Grün"
|
||||
VerticalOptions="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Slider x:Name="DialogGreenSlider"
|
||||
Grid.Column="1"
|
||||
Minimum="0"
|
||||
Maximum="255"
|
||||
ValueChanged="OnDialogSliderValueChanged" />
|
||||
<Label x:Name="DialogGreenValueLabel"
|
||||
Grid.Column="2"
|
||||
HorizontalTextAlignment="End"
|
||||
VerticalTextAlignment="Center"
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
</Grid>
|
||||
|
||||
<Grid ColumnDefinitions="80,*,56"
|
||||
ColumnSpacing="10">
|
||||
<Label Text="Blau"
|
||||
VerticalOptions="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Slider x:Name="DialogBlueSlider"
|
||||
Grid.Column="1"
|
||||
Minimum="0"
|
||||
Maximum="255"
|
||||
ValueChanged="OnDialogSliderValueChanged" />
|
||||
<Label x:Name="DialogBlueValueLabel"
|
||||
Grid.Column="2"
|
||||
HorizontalTextAlignment="End"
|
||||
VerticalTextAlignment="Center"
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
</Grid>
|
||||
|
||||
<Grid ColumnDefinitions="80,*,56"
|
||||
ColumnSpacing="10">
|
||||
<Label Text="Hell"
|
||||
VerticalOptions="Center"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Slider x:Name="DialogBrightnessSlider"
|
||||
Grid.Column="1"
|
||||
Minimum="0"
|
||||
Maximum="200"
|
||||
Value="100"
|
||||
ValueChanged="OnDialogSliderValueChanged" />
|
||||
<Label x:Name="DialogBrightnessValueLabel"
|
||||
Grid.Column="2"
|
||||
HorizontalTextAlignment="End"
|
||||
VerticalTextAlignment="Center"
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
</Grid>
|
||||
|
||||
<Label Text="Zurücksetzen lädt nur den Standardwert in den Dialog. Erst Übernehmen speichert die Änderung. Abbrechen verwirft alles aus diesem Dialog wieder."
|
||||
FontSize="12"
|
||||
TextColor="{DynamicResource TextMuted}" />
|
||||
|
||||
<Grid ColumnDefinitions="*,*,*"
|
||||
ColumnSpacing="10">
|
||||
<Button Text="Zurücksetzen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Clicked="OnResetColorDialogClicked" />
|
||||
<Button Grid.Column="1"
|
||||
Text="Abbrechen"
|
||||
Style="{StaticResource SecondaryButtonStyle}"
|
||||
Clicked="OnCancelColorDialogClicked" />
|
||||
<Button Grid.Column="2"
|
||||
Text="Übernehmen"
|
||||
Style="{StaticResource PrimaryButtonStyle}"
|
||||
Clicked="OnApplyColorDialogClicked" />
|
||||
</Grid>
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
</Grid>
|
||||
</Grid>
|
||||
</ContentPage>
|
||||
|
||||
@@ -1,20 +1,394 @@
|
||||
using cfs_tracker.Helpers;
|
||||
using cfs_tracker.ViewModels;
|
||||
using Microsoft.Maui.Controls;
|
||||
using Microsoft.Maui.Graphics;
|
||||
using System;
|
||||
using System.Collections.Specialized;
|
||||
using System.ComponentModel;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace cfs_tracker.Views;
|
||||
|
||||
public partial class OptionsPage : ContentPage
|
||||
{
|
||||
private static readonly Regex HexColorRegex = new("^#([0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$", RegexOptions.Compiled);
|
||||
|
||||
private readonly OptionsViewModel _viewModel;
|
||||
private bool _isLoading;
|
||||
private bool _appearanceEditorsBuilt;
|
||||
private bool _appearanceEditorsDirty = true;
|
||||
private AppearanceColorItemViewModel? _dialogItem;
|
||||
private string _dialogInitialHex = string.Empty;
|
||||
private string _dialogWorkingHex = string.Empty;
|
||||
private bool _dialogIsUpdating;
|
||||
|
||||
public OptionsPage(OptionsViewModel viewModel)
|
||||
{
|
||||
InitializeComponent();
|
||||
BindingContext = _viewModel = viewModel;
|
||||
|
||||
_viewModel.AppearanceColors.CollectionChanged += OnAppearanceColorsCollectionChanged;
|
||||
_viewModel.PropertyChanged += OnViewModelPropertyChanged;
|
||||
}
|
||||
|
||||
protected override async void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
await LoadPageAsync();
|
||||
}
|
||||
|
||||
private async Task LoadPageAsync()
|
||||
{
|
||||
_isLoading = true;
|
||||
_appearanceEditorsDirty = true;
|
||||
_appearanceEditorsBuilt = false;
|
||||
CloseColorDialog();
|
||||
|
||||
if (AppearanceColorsHost is not null)
|
||||
AppearanceColorsHost.Children.Clear();
|
||||
|
||||
await _viewModel.LoadAsync();
|
||||
|
||||
_isLoading = false;
|
||||
EnsureAppearanceEditorsIfNeeded();
|
||||
}
|
||||
|
||||
private void OnAppearanceColorsCollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
|
||||
{
|
||||
_appearanceEditorsDirty = true;
|
||||
|
||||
if (_isLoading)
|
||||
return;
|
||||
|
||||
Dispatcher.Dispatch(EnsureAppearanceEditorsIfNeeded);
|
||||
}
|
||||
|
||||
private void OnViewModelPropertyChanged(object? sender, PropertyChangedEventArgs e)
|
||||
{
|
||||
if (e.PropertyName == nameof(OptionsViewModel.SelectedTab))
|
||||
Dispatcher.Dispatch(EnsureAppearanceEditorsIfNeeded);
|
||||
}
|
||||
|
||||
private void EnsureAppearanceEditorsIfNeeded()
|
||||
{
|
||||
if (AppearanceColorsHost is null)
|
||||
return;
|
||||
|
||||
if (!_viewModel.IsAppearanceTabSelected)
|
||||
return;
|
||||
|
||||
if (_appearanceEditorsBuilt && !_appearanceEditorsDirty)
|
||||
return;
|
||||
|
||||
BuildAppearanceEditors();
|
||||
}
|
||||
|
||||
private void BuildAppearanceEditors()
|
||||
{
|
||||
if (AppearanceColorsHost is null)
|
||||
return;
|
||||
|
||||
AppearanceColorsHost.Children.Clear();
|
||||
|
||||
foreach (var item in _viewModel.AppearanceColors)
|
||||
AppearanceColorsHost.Children.Add(CreateColorEditor(item));
|
||||
|
||||
_appearanceEditorsBuilt = true;
|
||||
_appearanceEditorsDirty = false;
|
||||
}
|
||||
|
||||
private View CreateColorEditor(AppearanceColorItemViewModel item)
|
||||
{
|
||||
var normalizedHex = NormalizeHex(item.Value, item.Fallback);
|
||||
item.Value = normalizedHex;
|
||||
item.PreviewColor = ColorUtility.ParseColor(normalizedHex, item.Fallback);
|
||||
var lastValidHex = normalizedHex;
|
||||
var isUpdating = false;
|
||||
|
||||
var titleLabel = new Label
|
||||
{
|
||||
Text = item.Title,
|
||||
FontAttributes = FontAttributes.Bold,
|
||||
FontSize = 15
|
||||
};
|
||||
titleLabel.SetDynamicResource(Label.TextColorProperty, "TextPrimary");
|
||||
|
||||
var defaultLabel = new Label
|
||||
{
|
||||
Text = $"Standard: {NormalizeHex(item.Fallback, item.Fallback)}",
|
||||
FontSize = 12
|
||||
};
|
||||
defaultLabel.SetDynamicResource(Label.TextColorProperty, "TextMuted");
|
||||
|
||||
var hexEntry = new Entry
|
||||
{
|
||||
Placeholder = "#112233",
|
||||
HorizontalOptions = LayoutOptions.Fill,
|
||||
ClearButtonVisibility = ClearButtonVisibility.WhileEditing,
|
||||
BindingContext = item
|
||||
};
|
||||
hexEntry.SetBinding(Entry.TextProperty, nameof(AppearanceColorItemViewModel.Value), mode: BindingMode.TwoWay);
|
||||
|
||||
var previewBox = new BoxView
|
||||
{
|
||||
WidthRequest = 64,
|
||||
HeightRequest = 34,
|
||||
CornerRadius = 6,
|
||||
HorizontalOptions = LayoutOptions.Center,
|
||||
VerticalOptions = LayoutOptions.Center,
|
||||
BindingContext = item
|
||||
};
|
||||
previewBox.SetBinding(BoxView.ColorProperty, nameof(AppearanceColorItemViewModel.PreviewColor));
|
||||
|
||||
var chooseButton = new Button
|
||||
{
|
||||
Text = "Farbe wählen"
|
||||
};
|
||||
chooseButton.SetDynamicResource(Button.BackgroundColorProperty, "ButtonSecondaryBackground");
|
||||
chooseButton.SetDynamicResource(Button.TextColorProperty, "ButtonSecondaryText");
|
||||
chooseButton.Clicked += (_, _) => OpenColorDialog(item);
|
||||
|
||||
var editorGrid = new Grid
|
||||
{
|
||||
ColumnSpacing = 10,
|
||||
RowSpacing = 10,
|
||||
ColumnDefinitions = new ColumnDefinitionCollection
|
||||
{
|
||||
new ColumnDefinition { Width = GridLength.Star },
|
||||
new ColumnDefinition { Width = new GridLength(80) },
|
||||
new ColumnDefinition { Width = new GridLength(140) }
|
||||
}
|
||||
};
|
||||
editorGrid.Add(hexEntry);
|
||||
editorGrid.Add(previewBox, 1, 0);
|
||||
editorGrid.Add(chooseButton, 2, 0);
|
||||
|
||||
if (item is INotifyPropertyChanged notify)
|
||||
{
|
||||
notify.PropertyChanged += (_, args) =>
|
||||
{
|
||||
if (args.PropertyName == nameof(AppearanceColorItemViewModel.Value))
|
||||
lastValidHex = NormalizeHex(item.Value, item.Fallback);
|
||||
};
|
||||
}
|
||||
|
||||
hexEntry.TextChanged += (_, args) =>
|
||||
{
|
||||
if (isUpdating)
|
||||
return;
|
||||
|
||||
var text = args.NewTextValue?.Trim() ?? string.Empty;
|
||||
if (!HexColorRegex.IsMatch(text))
|
||||
return;
|
||||
|
||||
lastValidHex = NormalizeHex(text, item.Fallback);
|
||||
item.PreviewColor = ColorUtility.ParseColor(lastValidHex, item.Fallback);
|
||||
};
|
||||
|
||||
hexEntry.Unfocused += (_, _) =>
|
||||
{
|
||||
var text = hexEntry.Text?.Trim() ?? string.Empty;
|
||||
isUpdating = true;
|
||||
|
||||
if (HexColorRegex.IsMatch(text))
|
||||
{
|
||||
lastValidHex = NormalizeHex(text, item.Fallback);
|
||||
item.Value = lastValidHex;
|
||||
item.PreviewColor = ColorUtility.ParseColor(lastValidHex, item.Fallback);
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Value = lastValidHex;
|
||||
item.PreviewColor = ColorUtility.ParseColor(lastValidHex, item.Fallback);
|
||||
}
|
||||
|
||||
isUpdating = false;
|
||||
};
|
||||
|
||||
var content = new VerticalStackLayout
|
||||
{
|
||||
Spacing = 8,
|
||||
Children =
|
||||
{
|
||||
titleLabel,
|
||||
defaultLabel,
|
||||
editorGrid
|
||||
}
|
||||
};
|
||||
|
||||
var outerBorder = new Border
|
||||
{
|
||||
Padding = new Thickness(10),
|
||||
StrokeThickness = 1,
|
||||
Content = content
|
||||
};
|
||||
outerBorder.SetDynamicResource(Border.StrokeProperty, "Border");
|
||||
outerBorder.SetDynamicResource(VisualElement.BackgroundColorProperty, "SurfaceBackgroundAlt");
|
||||
|
||||
return outerBorder;
|
||||
}
|
||||
|
||||
private void OpenColorDialog(AppearanceColorItemViewModel item)
|
||||
{
|
||||
_dialogItem = item;
|
||||
_dialogInitialHex = NormalizeHex(item.Value, item.Fallback);
|
||||
_dialogWorkingHex = _dialogInitialHex;
|
||||
|
||||
ColorDialogTitleLabel.Text = item.Title;
|
||||
ColorDialogDefaultLabel.Text = $"Standardwert: {NormalizeHex(item.Fallback, item.Fallback)}";
|
||||
|
||||
ApplyDialogHex(_dialogWorkingHex, resetBrightness: true);
|
||||
ColorDialogOverlay.IsVisible = true;
|
||||
DialogHexEntry.Focus();
|
||||
}
|
||||
|
||||
private void CloseColorDialog()
|
||||
{
|
||||
_dialogItem = null;
|
||||
_dialogInitialHex = string.Empty;
|
||||
_dialogWorkingHex = string.Empty;
|
||||
_dialogIsUpdating = false;
|
||||
|
||||
if (ColorDialogOverlay is not null)
|
||||
ColorDialogOverlay.IsVisible = false;
|
||||
}
|
||||
|
||||
private void ApplyDialogHex(string hex, bool resetBrightness)
|
||||
{
|
||||
if (_dialogItem is null)
|
||||
return;
|
||||
|
||||
var normalizedHex = NormalizeHex(hex, _dialogItem.Fallback);
|
||||
var parsed = ColorUtility.ParseColor(normalizedHex, _dialogItem.Fallback);
|
||||
|
||||
_dialogIsUpdating = true;
|
||||
DialogHexEntry.Text = normalizedHex;
|
||||
DialogRedSlider.Value = ClampByte(parsed.Red * 255d);
|
||||
DialogGreenSlider.Value = ClampByte(parsed.Green * 255d);
|
||||
DialogBlueSlider.Value = ClampByte(parsed.Blue * 255d);
|
||||
if (resetBrightness)
|
||||
DialogBrightnessSlider.Value = 100;
|
||||
UpdateDialogPreview(normalizedHex);
|
||||
UpdateDialogValueLabels();
|
||||
_dialogIsUpdating = false;
|
||||
|
||||
_dialogWorkingHex = normalizedHex;
|
||||
}
|
||||
|
||||
private void UpdateDialogHexFromSliders()
|
||||
{
|
||||
if (_dialogItem is null || _dialogIsUpdating)
|
||||
return;
|
||||
|
||||
_dialogIsUpdating = true;
|
||||
|
||||
var brightnessFactor = DialogBrightnessSlider.Value / 100d;
|
||||
var red = ClampByte(DialogRedSlider.Value * brightnessFactor);
|
||||
var green = ClampByte(DialogGreenSlider.Value * brightnessFactor);
|
||||
var blue = ClampByte(DialogBlueSlider.Value * brightnessFactor);
|
||||
|
||||
_dialogWorkingHex = $"#{red:X2}{green:X2}{blue:X2}";
|
||||
DialogHexEntry.Text = _dialogWorkingHex;
|
||||
UpdateDialogPreview(_dialogWorkingHex);
|
||||
UpdateDialogValueLabels();
|
||||
|
||||
_dialogIsUpdating = false;
|
||||
}
|
||||
|
||||
private void UpdateDialogPreview(string hex)
|
||||
{
|
||||
if (_dialogItem is null)
|
||||
return;
|
||||
|
||||
var normalizedHex = NormalizeHex(hex, _dialogItem.Fallback);
|
||||
var parsed = ColorUtility.ParseColor(normalizedHex, _dialogItem.Fallback);
|
||||
DialogPreviewBorder.BackgroundColor = parsed;
|
||||
DialogPreviewLabel.Text = normalizedHex.ToUpperInvariant();
|
||||
DialogPreviewLabel.TextColor = GetContrastColor(parsed);
|
||||
}
|
||||
|
||||
private void UpdateDialogValueLabels()
|
||||
{
|
||||
DialogRedValueLabel.Text = $"{Math.Round(DialogRedSlider.Value):0}";
|
||||
DialogGreenValueLabel.Text = $"{Math.Round(DialogGreenSlider.Value):0}";
|
||||
DialogBlueValueLabel.Text = $"{Math.Round(DialogBlueSlider.Value):0}";
|
||||
DialogBrightnessValueLabel.Text = $"{Math.Round(DialogBrightnessSlider.Value):0}%";
|
||||
}
|
||||
|
||||
private void OnDialogHexEntryTextChanged(object? sender, TextChangedEventArgs e)
|
||||
{
|
||||
if (_dialogItem is null || _dialogIsUpdating)
|
||||
return;
|
||||
|
||||
var text = e.NewTextValue?.Trim() ?? string.Empty;
|
||||
if (!HexColorRegex.IsMatch(text))
|
||||
return;
|
||||
|
||||
ApplyDialogHex(text, resetBrightness: true);
|
||||
}
|
||||
|
||||
private void OnDialogHexEntryUnfocused(object? sender, FocusEventArgs e)
|
||||
{
|
||||
if (_dialogItem is null || _dialogIsUpdating)
|
||||
return;
|
||||
|
||||
var text = DialogHexEntry.Text?.Trim() ?? string.Empty;
|
||||
if (HexColorRegex.IsMatch(text))
|
||||
{
|
||||
ApplyDialogHex(text, resetBrightness: true);
|
||||
return;
|
||||
}
|
||||
|
||||
ApplyDialogHex(_dialogWorkingHex, resetBrightness: false);
|
||||
}
|
||||
|
||||
private void OnDialogSliderValueChanged(object? sender, ValueChangedEventArgs e)
|
||||
{
|
||||
UpdateDialogHexFromSliders();
|
||||
}
|
||||
|
||||
private void OnResetColorDialogClicked(object? sender, EventArgs e)
|
||||
{
|
||||
if (_dialogItem is null)
|
||||
return;
|
||||
|
||||
ApplyDialogHex(_dialogItem.Fallback, resetBrightness: true);
|
||||
}
|
||||
|
||||
private void OnCancelColorDialogClicked(object? sender, EventArgs e)
|
||||
{
|
||||
if (_dialogItem is not null)
|
||||
ApplyDialogHex(_dialogInitialHex, resetBrightness: true);
|
||||
|
||||
CloseColorDialog();
|
||||
}
|
||||
|
||||
private void OnApplyColorDialogClicked(object? sender, EventArgs e)
|
||||
{
|
||||
if (_dialogItem is null)
|
||||
return;
|
||||
|
||||
var finalHex = NormalizeHex(_dialogWorkingHex, _dialogItem.Fallback);
|
||||
_dialogItem.Value = finalHex;
|
||||
_dialogItem.PreviewColor = ColorUtility.ParseColor(finalHex, _dialogItem.Fallback);
|
||||
CloseColorDialog();
|
||||
}
|
||||
|
||||
private string NormalizeHex(string? value, string fallback)
|
||||
{
|
||||
var parsed = ColorUtility.ParseColor(value, fallback);
|
||||
var red = ClampByte(parsed.Red * 255d);
|
||||
var green = ClampByte(parsed.Green * 255d);
|
||||
var blue = ClampByte(parsed.Blue * 255d);
|
||||
return $"#{red:X2}{green:X2}{blue:X2}";
|
||||
}
|
||||
|
||||
private static int ClampByte(double value) => Math.Clamp((int)Math.Round(value), 0, 255);
|
||||
|
||||
private static Color GetContrastColor(Color color)
|
||||
{
|
||||
var luminance = (0.299 * color.Red) + (0.587 * color.Green) + (0.114 * color.Blue);
|
||||
return luminance >= 0.6 ? Colors.Black : Colors.White;
|
||||
}
|
||||
}
|
||||
|
||||
+94
-25
@@ -1,12 +1,42 @@
|
||||
<?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:viewModels="clr-namespace:cfs_tracker.ViewModels"
|
||||
x:DataType="viewModels:QuickEntryViewModel"
|
||||
x:Class="cfs_tracker.Views.QuickEntryPage"
|
||||
Title="Eintrag"
|
||||
BackgroundColor="{DynamicResource AppBackground}">
|
||||
<ContentPage
|
||||
x:Class="cfs_tracker.Views.QuickEntryPage"
|
||||
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:QuickEntryViewModel"
|
||||
Title="Eintrag"
|
||||
BackgroundColor="{DynamicResource AppBackground}">
|
||||
|
||||
<ContentPage.Resources>
|
||||
<Style x:Key="SymptomToggleBorderStyle" TargetType="Border">
|
||||
<Setter Property="Padding" Value="12,10" />
|
||||
<Setter Property="StrokeThickness" Value="1" />
|
||||
<Setter Property="Stroke" Value="{DynamicResource Border}" />
|
||||
<Setter Property="StrokeShape" Value="RoundRectangle 12" />
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource ButtonPrimaryBackground}" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger TargetType="Border"
|
||||
Binding="{Binding IsSelected}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor" Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
|
||||
<Style x:Key="SymptomToggleLabelStyle" TargetType="Label">
|
||||
<Setter Property="VerticalOptions" Value="Center" />
|
||||
<Setter Property="TextColor" Value="{DynamicResource ButtonPrimaryText}" />
|
||||
<Style.Triggers>
|
||||
<DataTrigger TargetType="Label"
|
||||
Binding="{Binding IsSelected}"
|
||||
Value="True">
|
||||
<Setter Property="TextColor" Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</ContentPage.Resources>
|
||||
|
||||
<ScrollView>
|
||||
<VerticalStackLayout Padding="16" Spacing="16">
|
||||
@@ -33,7 +63,7 @@
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Picker Title="Tageszeit"
|
||||
ItemsSource="{Binding Parts}"
|
||||
ItemDisplayBinding="{Binding Name}"
|
||||
ItemDisplayBinding="{Binding Name, x:DataType={x:Null}}"
|
||||
SelectedItem="{Binding SelectedPart}" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
@@ -48,33 +78,72 @@
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<Picker Title="Tätigkeit"
|
||||
ItemsSource="{Binding Activities}"
|
||||
ItemDisplayBinding="{Binding Name}"
|
||||
ItemDisplayBinding="{Binding Name, x:DataType={x:Null}}"
|
||||
SelectedItem="{Binding SelectedActivity}" />
|
||||
|
||||
<Label Text="Dauer (HH:mm)"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
<TimePicker Time="{Binding ActivityDuration}"
|
||||
Format="HH:mm" />
|
||||
</VerticalStackLayout>
|
||||
</Border>
|
||||
|
||||
<Border Padding="12"
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
Stroke="{DynamicResource Border}"
|
||||
BackgroundColor="{DynamicResource SurfaceBackground}"
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<VerticalStackLayout Spacing="8">
|
||||
<Label Text="Symptome"
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
FontAttributes="Bold"
|
||||
TextColor="{DynamicResource TextPrimary}" />
|
||||
|
||||
<VerticalStackLayout BindableLayout.ItemsSource="{Binding Symptoms}"
|
||||
Spacing="6">
|
||||
Spacing="8">
|
||||
<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>
|
||||
<Border Padding="12,10"
|
||||
StrokeThickness="1"
|
||||
Stroke="{DynamicResource Border}"
|
||||
StrokeShape="RoundRectangle 12"
|
||||
BackgroundColor="{DynamicResource ButtonPrimaryBackground}">
|
||||
<Border.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.ToggleSymptomCommand}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Border.GestureRecognizers>
|
||||
|
||||
<Border.Triggers>
|
||||
<DataTrigger TargetType="Border"
|
||||
Binding="{Binding IsSelected}"
|
||||
Value="True">
|
||||
<Setter Property="BackgroundColor"
|
||||
Value="{DynamicResource ButtonSecondaryBackground}" />
|
||||
</DataTrigger>
|
||||
</Border.Triggers>
|
||||
|
||||
<Grid ColumnDefinitions="Auto,*"
|
||||
ColumnSpacing="12">
|
||||
<CheckBox IsChecked="{Binding IsSelected}"
|
||||
InputTransparent="True"
|
||||
Color="White"
|
||||
VerticalOptions="Center" />
|
||||
|
||||
<Label Grid.Column="1"
|
||||
Text="{Binding Name}"
|
||||
VerticalOptions="Center"
|
||||
TextColor="{DynamicResource ButtonPrimaryText}">
|
||||
<Label.Triggers>
|
||||
<DataTrigger TargetType="Label"
|
||||
Binding="{Binding IsSelected}"
|
||||
Value="True">
|
||||
<Setter Property="TextColor"
|
||||
Value="{DynamicResource ButtonSecondaryText}" />
|
||||
</DataTrigger>
|
||||
</Label.Triggers>
|
||||
</Label>
|
||||
</Grid>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</BindableLayout.ItemTemplate>
|
||||
</VerticalStackLayout>
|
||||
|
||||
@@ -5,7 +5,6 @@ namespace cfs_tracker.Views;
|
||||
public partial class QuickEntryPage : ContentPage, IQueryAttributable
|
||||
{
|
||||
private readonly QuickEntryViewModel _vm;
|
||||
private bool _initialized;
|
||||
|
||||
public QuickEntryPage(QuickEntryViewModel vm)
|
||||
{
|
||||
@@ -16,11 +15,6 @@ public partial class QuickEntryPage : ContentPage, IQueryAttributable
|
||||
protected override async void OnAppearing()
|
||||
{
|
||||
base.OnAppearing();
|
||||
|
||||
if (_initialized)
|
||||
return;
|
||||
|
||||
_initialized = true;
|
||||
await _vm.InitializeAsync();
|
||||
}
|
||||
|
||||
@@ -28,9 +22,13 @@ public partial class QuickEntryPage : ContentPage, IQueryAttributable
|
||||
{
|
||||
query.TryGetValue("date", out var dateValue);
|
||||
query.TryGetValue("entryId", out var entryIdValue);
|
||||
query.TryGetValue("status", out var statusValue);
|
||||
query.TryGetValue("commit", out var commitValue);
|
||||
|
||||
_vm.ApplyQuery(
|
||||
dateValue?.ToString() ?? string.Empty,
|
||||
entryIdValue?.ToString());
|
||||
entryIdValue?.ToString(),
|
||||
statusValue?.ToString(),
|
||||
commitValue?.ToString());
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -50,7 +50,7 @@
|
||||
StrokeShape="RoundRectangle 14">
|
||||
<Border.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.OpenDayCommand}"
|
||||
Command="{Binding Source={RelativeSource AncestorType={x:Type viewModels:WeekViewModel}}, Path=OpenDayCommand, x:DataType='viewModels:WeekViewModel'}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Border.GestureRecognizers>
|
||||
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@
|
||||
StrokeShape="RoundRectangle 8">
|
||||
<Border.GestureRecognizers>
|
||||
<TapGestureRecognizer
|
||||
Command="{Binding Source={x:Reference RootPage}, Path=BindingContext.OpenDayCommand}"
|
||||
Command="{Binding Source={RelativeSource AncestorType={x:Type viewModels:YearViewModel}}, Path=OpenDayCommand, x:DataType='viewModels:YearViewModel'}"
|
||||
CommandParameter="{Binding .}" />
|
||||
</Border.GestureRecognizers>
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using System.Diagnostics;
|
||||
using cfs_tracker.ViewModels;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace cfs_tracker.Views;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user