d85f2e0fb3
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
319 lines
18 KiB
XML
319 lines
18 KiB
XML
<?xml version="1.0" encoding="utf-8" ?>
|
|
<ContentPage x:Class="cfs_tracker.Views.OptionsPage"
|
|
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:OptionsViewModel"
|
|
Title="Optionen"
|
|
BackgroundColor="{DynamicResource AppBackground}">
|
|
|
|
<ScrollView>
|
|
<VerticalStackLayout Padding="16" Spacing="16">
|
|
<Label Text="Optionen"
|
|
FontSize="28"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{Binding StatusText}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<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}" />
|
|
|
|
<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>
|
|
|
|
<Border Grid.Column="1"
|
|
Padding="8"
|
|
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"
|
|
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}" />
|
|
|
|
<Button Text="Export entleeren"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Command="{Binding ClearExportsCommand}" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
</VerticalStackLayout>
|
|
</ScrollView>
|
|
</ContentPage>
|