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:
+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>
|
||||
|
||||
Reference in New Issue
Block a user