929 lines
59 KiB
XML
929 lines
59 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:loc="clr-namespace:cfs_tracker.Helpers"
|
|
xmlns:views="clr-namespace:cfs_tracker.Views"
|
|
xmlns:viewModels="clr-namespace:cfs_tracker.ViewModels"
|
|
x:DataType="viewModels:OptionsViewModel"
|
|
Title="{loc:Translate Tab_Options}"
|
|
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" />
|
|
<Setter Property="LineBreakMode" Value="WordWrap" />
|
|
<Setter Property="HorizontalOptions" Value="Start" />
|
|
<Setter Property="Margin" Value="0,0,10,10" />
|
|
</Style>
|
|
</ContentPage.Resources>
|
|
|
|
<Grid>
|
|
<ScrollView>
|
|
<VerticalStackLayout Padding="16" Spacing="16">
|
|
<Label Text="{loc:Translate Tab_Options}"
|
|
FontSize="28"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{Binding StatusText}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Border Padding="12"
|
|
Stroke="{DynamicResource Border}"
|
|
BackgroundColor="{DynamicResource SurfaceBackground}">
|
|
<FlexLayout Direction="Row"
|
|
Wrap="Wrap"
|
|
AlignItems="Start"
|
|
JustifyContent="Start">
|
|
<Button Text="{loc:Translate Options_Tab_Appearance}"
|
|
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>
|
|
|
|
<Button Text="{loc:Translate Options_Tab_Notifications}"
|
|
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>
|
|
|
|
<Button Text="{loc:Translate Options_Tab_Data}"
|
|
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>
|
|
|
|
<Button Text="{loc:Translate Common_Export}"
|
|
Style="{StaticResource OptionsTabButtonStyle}"
|
|
Command="{Binding ShowExportTabCommand}">
|
|
<Button.Triggers>
|
|
<DataTrigger TargetType="Button"
|
|
Binding="{Binding IsExportTabSelected}"
|
|
Value="True">
|
|
<Setter Property="BackgroundColor"
|
|
Value="{DynamicResource ButtonSecondaryBackground}" />
|
|
<Setter Property="TextColor"
|
|
Value="{DynamicResource ButtonSecondaryText}" />
|
|
</DataTrigger>
|
|
</Button.Triggers>
|
|
</Button>
|
|
|
|
<Button Text="{loc:Translate Options_Tab_Legal}"
|
|
Style="{StaticResource OptionsTabButtonStyle}"
|
|
Command="{Binding ShowLegalTabCommand}">
|
|
<Button.Triggers>
|
|
<DataTrigger TargetType="Button"
|
|
Binding="{Binding IsLegalTabSelected}"
|
|
Value="True">
|
|
<Setter Property="BackgroundColor"
|
|
Value="{DynamicResource ButtonSecondaryBackground}" />
|
|
<Setter Property="TextColor"
|
|
Value="{DynamicResource ButtonSecondaryText}" />
|
|
</DataTrigger>
|
|
</Button.Triggers>
|
|
</Button>
|
|
</FlexLayout>
|
|
</Border>
|
|
|
|
<VerticalStackLayout IsVisible="{Binding IsAppearanceTabSelected}"
|
|
Spacing="16">
|
|
<Border Padding="12"
|
|
Stroke="{DynamicResource Border}"
|
|
BackgroundColor="{DynamicResource SurfaceBackground}">
|
|
<VerticalStackLayout Spacing="12">
|
|
<Label Text="{loc:Translate Options_Appearance_Title}"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Appearance_Description}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<VerticalStackLayout Spacing="4"
|
|
Padding="0,6">
|
|
<Label Text="{loc:Translate Options_Appearance_LanguageLabel}"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
<Picker Title="{loc:Translate Options_Appearance_LanguagePicker}"
|
|
ItemsSource="{Binding LanguageOptions}"
|
|
ItemDisplayBinding="{Binding DisplayName, x:DataType=viewModels:LanguageOptionItemViewModel}"
|
|
SelectedItem="{Binding SelectedLanguageOption}" />
|
|
<Label Text="{Binding SelectedLanguageDescription}"
|
|
FontSize="12"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
</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>
|
|
|
|
<VerticalStackLayout x:Name="AppearanceColorsHost"
|
|
Spacing="10" />
|
|
|
|
<Grid ColumnDefinitions="*,*"
|
|
ColumnSpacing="12">
|
|
<Button Text="{loc:Translate Common_Save}"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Command="{Binding SaveAppearanceCommand}" />
|
|
<Button Grid.Column="1"
|
|
Text="{loc:Translate Common_Reset}"
|
|
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="{loc:Translate Options_Notifications_Title}"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Notifications_Description}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Grid ColumnDefinitions="Auto,*"
|
|
ColumnSpacing="12">
|
|
<Button Text="{Binding NotificationVibrationButtonText}"
|
|
Style="{StaticResource DayToggleButtonStyle}"
|
|
Command="{Binding ToggleNotificationVibrationCommand}"
|
|
VerticalOptions="Center">
|
|
<Button.Triggers>
|
|
<DataTrigger TargetType="Button"
|
|
Binding="{Binding NotificationVibrationEnabled}"
|
|
Value="True">
|
|
<Setter Property="BackgroundColor"
|
|
Value="{DynamicResource ButtonSecondaryBackground}" />
|
|
<Setter Property="TextColor"
|
|
Value="{DynamicResource ButtonSecondaryText}" />
|
|
</DataTrigger>
|
|
</Button.Triggers>
|
|
</Button>
|
|
|
|
<VerticalStackLayout Grid.Column="1"
|
|
Spacing="2">
|
|
<Label Text="{loc:Translate Options_Notifications_VibrationLabel}"
|
|
VerticalOptions="Center"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
<Label Text="{loc:Translate Options_Notifications_VibrationHint}"
|
|
FontSize="12"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
</VerticalStackLayout>
|
|
</Grid>
|
|
|
|
<Button Text="{loc:Translate Options_Notifications_AddTime}"
|
|
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"
|
|
ColumnSpacing="8">
|
|
<TimePicker Time="{Binding SelectedTime}" />
|
|
|
|
<Button Grid.Column="1"
|
|
Text="{Binding IsEnabledButtonText}"
|
|
Style="{StaticResource DayToggleButtonStyle}"
|
|
Command="{Binding ToggleIsEnabledCommand}"
|
|
VerticalOptions="Center">
|
|
<Button.Triggers>
|
|
<DataTrigger TargetType="Button"
|
|
Binding="{Binding IsEnabled}"
|
|
Value="True">
|
|
<Setter Property="BackgroundColor"
|
|
Value="{DynamicResource ButtonSecondaryBackground}" />
|
|
<Setter Property="TextColor"
|
|
Value="{DynamicResource ButtonSecondaryText}" />
|
|
</DataTrigger>
|
|
</Button.Triggers>
|
|
</Button>
|
|
</Grid>
|
|
|
|
<Grid ColumnDefinitions="*,*,*,*,*,*,*"
|
|
ColumnSpacing="6">
|
|
<Button Text="{loc:Translate Common_Weekday_Mon}"
|
|
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="{loc:Translate Common_Weekday_Tue}"
|
|
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="{loc:Translate Common_Weekday_Wed}"
|
|
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="{loc:Translate Common_Weekday_Thu}"
|
|
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="{loc:Translate Common_Weekday_Fri}"
|
|
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="{loc:Translate Common_Weekday_Sat}"
|
|
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="{loc:Translate Common_Weekday_Sun}"
|
|
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="{loc:Translate Common_Delete}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Command="{Binding Source={x:Reference RootPage}, Path=ViewModel.DeleteScheduleCommand, x:DataType=views:OptionsPage}"
|
|
CommandParameter="{Binding .}" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
</DataTemplate>
|
|
</BindableLayout.ItemTemplate>
|
|
</VerticalStackLayout>
|
|
|
|
<Button Text="{loc:Translate Options_Notifications_Save}"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Command="{Binding SaveSchedulesCommand}" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
</VerticalStackLayout>
|
|
|
|
<VerticalStackLayout IsVisible="{Binding IsExportTabSelected}"
|
|
Spacing="16">
|
|
<Border Padding="12"
|
|
Stroke="{DynamicResource Border}"
|
|
BackgroundColor="{DynamicResource SurfaceBackground}">
|
|
<VerticalStackLayout Spacing="12">
|
|
<Label Text="{loc:Translate Options_Export_Title}"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Export_Description}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Grid ColumnDefinitions="*,*"
|
|
ColumnSpacing="12">
|
|
<VerticalStackLayout Spacing="4">
|
|
<Label Text="{loc:Translate Common_From}"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
<DatePicker Date="{Binding ExportStartDate}"
|
|
MaximumDate="{Binding ExportEndDate}" />
|
|
</VerticalStackLayout>
|
|
|
|
<VerticalStackLayout Grid.Column="1"
|
|
Spacing="4">
|
|
<Label Text="{loc:Translate Common_To}"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
<DatePicker Date="{Binding ExportEndDate}"
|
|
MinimumDate="{Binding ExportStartDate}" />
|
|
</VerticalStackLayout>
|
|
</Grid>
|
|
|
|
<Label Text="{Binding ExportRangeSummary}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Label Text="{loc:Translate Options_Export_FilterTitle}"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<VerticalStackLayout Spacing="4">
|
|
<Label Text="{loc:Translate QuickEntry_ActivityLabel}"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
<Picker ItemsSource="{Binding ExportActivities}"
|
|
ItemDisplayBinding="{Binding Name, x:DataType=viewModels:ActivityPickerItemViewModel}"
|
|
SelectedItem="{Binding SelectedExportActivity}" />
|
|
</VerticalStackLayout>
|
|
|
|
<VerticalStackLayout Spacing="6">
|
|
<Label Text="{loc:Translate QuickEntry_SymptomsLabel}"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
<Label Text="{loc:Translate Options_Export_SymptomsHint}"
|
|
FontSize="12"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Button Text="{Binding ExportSymptomFilterToggleText}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Command="{Binding ToggleExportSymptomFilterCommand}" />
|
|
|
|
<VerticalStackLayout IsVisible="{Binding IsExportSymptomFilterExpanded}"
|
|
BindableLayout.ItemsSource="{Binding ExportSymptoms}"
|
|
Spacing="8">
|
|
<BindableLayout.ItemTemplate>
|
|
<DataTemplate x:DataType="viewModels:SelectableSymptomItemViewModel">
|
|
<Border Padding="10"
|
|
Stroke="{DynamicResource Border}"
|
|
BackgroundColor="{DynamicResource SurfaceBackgroundAlt}">
|
|
<Grid ColumnDefinitions="Auto,*"
|
|
ColumnSpacing="10">
|
|
<CheckBox IsChecked="{Binding IsSelected}" />
|
|
<Label Grid.Column="1"
|
|
Text="{Binding Name}"
|
|
VerticalOptions="Center"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
</Grid>
|
|
</Border>
|
|
</DataTemplate>
|
|
</BindableLayout.ItemTemplate>
|
|
</VerticalStackLayout>
|
|
</VerticalStackLayout>
|
|
|
|
<Label Text="{Binding ExportFilterSummary}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Button Text="{loc:Translate Options_Export_ResetFilters}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Command="{Binding ResetExportFiltersCommand}" />
|
|
|
|
<Label Text="{loc:Translate Options_Export_ModeTitle}"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<FlexLayout Direction="Row"
|
|
Wrap="Wrap"
|
|
AlignItems="Start"
|
|
JustifyContent="Start">
|
|
<Button Text="{loc:Translate Options_Export_Mode_DayView}"
|
|
Style="{StaticResource DayToggleButtonStyle}"
|
|
Margin="0,0,10,10"
|
|
Command="{Binding SelectDayViewExportLayoutCommand}">
|
|
<Button.Triggers>
|
|
<DataTrigger TargetType="Button"
|
|
Binding="{Binding IsDayViewExportLayoutSelected}"
|
|
Value="True">
|
|
<Setter Property="BackgroundColor"
|
|
Value="{DynamicResource ButtonSecondaryBackground}" />
|
|
<Setter Property="TextColor"
|
|
Value="{DynamicResource ButtonSecondaryText}" />
|
|
</DataTrigger>
|
|
</Button.Triggers>
|
|
</Button>
|
|
|
|
<Button Text="{loc:Translate Options_Export_Mode_WeekBlock}"
|
|
Style="{StaticResource DayToggleButtonStyle}"
|
|
Margin="0,0,10,10"
|
|
Command="{Binding SelectWeekBlockExportLayoutCommand}">
|
|
<Button.Triggers>
|
|
<DataTrigger TargetType="Button"
|
|
Binding="{Binding IsWeekBlockExportLayoutSelected}"
|
|
Value="True">
|
|
<Setter Property="BackgroundColor"
|
|
Value="{DynamicResource ButtonSecondaryBackground}" />
|
|
<Setter Property="TextColor"
|
|
Value="{DynamicResource ButtonSecondaryText}" />
|
|
</DataTrigger>
|
|
</Button.Triggers>
|
|
</Button>
|
|
|
|
<Button Text="{loc:Translate Options_Export_Mode_DaySummary}"
|
|
Style="{StaticResource DayToggleButtonStyle}"
|
|
Margin="0,0,10,10"
|
|
Command="{Binding SelectDaySummaryExportLayoutCommand}">
|
|
<Button.Triggers>
|
|
<DataTrigger TargetType="Button"
|
|
Binding="{Binding IsDaySummaryExportLayoutSelected}"
|
|
Value="True">
|
|
<Setter Property="BackgroundColor"
|
|
Value="{DynamicResource ButtonSecondaryBackground}" />
|
|
<Setter Property="TextColor"
|
|
Value="{DynamicResource ButtonSecondaryText}" />
|
|
</DataTrigger>
|
|
</Button.Triggers>
|
|
</Button>
|
|
</FlexLayout>
|
|
|
|
<Label Text="{Binding SelectedExportLayoutDescription}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Button Text="{loc:Translate Options_Export_Create}"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Command="{Binding ExportSelectedRangeCommand}" />
|
|
|
|
<Button Text="{loc:Translate Options_Export_Clear}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Command="{Binding ClearExportsCommand}" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
</VerticalStackLayout>
|
|
|
|
<VerticalStackLayout IsVisible="{Binding IsDataManagementTabSelected}"
|
|
Spacing="16">
|
|
<Border Padding="12"
|
|
Stroke="{DynamicResource Border}"
|
|
BackgroundColor="{DynamicResource SurfaceBackground}">
|
|
<VerticalStackLayout Spacing="12">
|
|
<Label Text="{loc:Translate Options_Data_ActivitiesTitle}"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Grid ColumnDefinitions="*,Auto"
|
|
ColumnSpacing="10">
|
|
<Entry Text="{Binding NewActivityName}"
|
|
Placeholder="{loc:Translate Options_Data_NewActivityPlaceholder}" />
|
|
<Button Grid.Column="1"
|
|
Text="{loc:Translate Common_Add}"
|
|
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="{loc:Translate Common_Save}"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Command="{Binding Source={x:Reference RootPage}, Path=ViewModel.SaveActivityCommand, x:DataType=views:OptionsPage}"
|
|
CommandParameter="{Binding .}" />
|
|
<Button Grid.Column="1"
|
|
Text="{loc:Translate Options_Data_ToggleActive}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Command="{Binding Source={x:Reference RootPage}, Path=ViewModel.ToggleActivityActiveCommand, x:DataType=views:OptionsPage}"
|
|
CommandParameter="{Binding .}" />
|
|
<Button Grid.Column="2"
|
|
Text="{loc:Translate Common_Delete}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Command="{Binding Source={x:Reference RootPage}, Path=ViewModel.DeleteActivityCommand, x:DataType=views:OptionsPage}"
|
|
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="{loc:Translate Options_Data_SymptomsTitle}"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Grid ColumnDefinitions="*,Auto"
|
|
ColumnSpacing="10">
|
|
<Entry Text="{Binding NewSymptomName}"
|
|
Placeholder="{loc:Translate Options_Data_NewSymptomPlaceholder}" />
|
|
<Button Grid.Column="1"
|
|
Text="{loc:Translate Common_Add}"
|
|
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="{loc:Translate Common_Save}"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Command="{Binding Source={x:Reference RootPage}, Path=ViewModel.SaveSymptomCommand, x:DataType=views:OptionsPage}"
|
|
CommandParameter="{Binding .}" />
|
|
<Button Grid.Column="1"
|
|
Text="{loc:Translate Options_Data_ToggleActive}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Command="{Binding Source={x:Reference RootPage}, Path=ViewModel.ToggleSymptomActiveCommand, x:DataType=views:OptionsPage}"
|
|
CommandParameter="{Binding .}" />
|
|
<Button Grid.Column="2"
|
|
Text="{loc:Translate Common_Delete}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Command="{Binding Source={x:Reference RootPage}, Path=ViewModel.DeleteSymptomCommand, x:DataType=views:OptionsPage}"
|
|
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="{loc:Translate Options_Database_Title}"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{Binding CurrentDatabasePathText}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Grid ColumnDefinitions="Auto,*"
|
|
ColumnSpacing="8">
|
|
<CheckBox IsChecked="{Binding UseExternalDatabase}" />
|
|
<Label Grid.Column="1"
|
|
Text="{loc:Translate Options_Database_UseExternal}"
|
|
VerticalOptions="Center"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
</Grid>
|
|
|
|
<Entry Text="{Binding ExternalDatabasePath}"
|
|
Placeholder="{loc:Translate Options_Database_ExternalPathPlaceholder}" />
|
|
|
|
<Label Text="{loc:Translate Options_Database_Hint}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Button Text="{loc:Translate Options_Database_Save}"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Command="{Binding SaveDatabaseLocationCommand}" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
|
|
<Border Padding="12"
|
|
Stroke="{DynamicResource Border}"
|
|
BackgroundColor="{DynamicResource SurfaceBackground}">
|
|
<VerticalStackLayout Spacing="12">
|
|
<Label Text="{loc:Translate Options_Data_DeleteAllTitle}"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
<Label Text="{loc:Translate Options_Data_DeleteAllDescription}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
<Entry Text="{Binding DeleteConfirmationText}"
|
|
Placeholder="{loc:Translate Options_Data_DeleteConfirmationKeyword}" />
|
|
<Button Text="{loc:Translate Options_Data_DeleteAllButton}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Command="{Binding DeleteAllDataCommand}" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
|
|
</VerticalStackLayout>
|
|
|
|
<VerticalStackLayout IsVisible="{Binding IsLegalTabSelected}"
|
|
Spacing="16">
|
|
<Border Padding="12"
|
|
Stroke="{DynamicResource Border}"
|
|
BackgroundColor="{DynamicResource SurfaceBackground}">
|
|
<VerticalStackLayout Spacing="12">
|
|
<Label Text="{loc:Translate Options_Legal_PrivacyTitle}"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Legal_PrivacyDate}"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Label Text="{loc:Translate Options_Legal_PrivacyBody1}"
|
|
LineBreakMode="WordWrap"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Legal_PrivacyBody2}"
|
|
LineBreakMode="WordWrap"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Legal_PrivacyBody3}"
|
|
LineBreakMode="WordWrap"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Legal_PrivacyBody4}"
|
|
LineBreakMode="WordWrap"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
|
|
<Border Padding="12"
|
|
Stroke="{DynamicResource Border}"
|
|
BackgroundColor="{DynamicResource SurfaceBackground}">
|
|
<VerticalStackLayout Spacing="12">
|
|
<Label Text="{loc:Translate Options_Legal_DisclaimerTitle}"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Legal_DisclaimerBody1}"
|
|
LineBreakMode="WordWrap"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Legal_DisclaimerBody2}"
|
|
LineBreakMode="WordWrap"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
|
|
<Border Padding="12"
|
|
Stroke="{DynamicResource Border}"
|
|
BackgroundColor="{DynamicResource SurfaceBackground}">
|
|
<VerticalStackLayout Spacing="12">
|
|
<Label Text="{loc:Translate Options_Legal_PersonalTitle}"
|
|
FontSize="20"
|
|
FontAttributes="Bold"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Legal_PersonalBody1}"
|
|
LineBreakMode="WordWrap"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
|
|
<Label Text="{loc:Translate Options_Legal_PersonalBody2}"
|
|
LineBreakMode="WordWrap"
|
|
TextColor="{DynamicResource TextPrimary}" />
|
|
</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="{loc:Translate Options_ColorDialog_EditTitle}"
|
|
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="{loc:Translate Options_ColorDialog_Red}"
|
|
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="{loc:Translate Options_ColorDialog_Green}"
|
|
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="{loc:Translate Options_ColorDialog_Blue}"
|
|
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="{loc:Translate Options_ColorDialog_Brightness}"
|
|
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="{loc:Translate Options_ColorDialog_Hint}"
|
|
FontSize="12"
|
|
TextColor="{DynamicResource TextMuted}" />
|
|
|
|
<Grid ColumnDefinitions="*,*,*"
|
|
ColumnSpacing="10">
|
|
<Button Text="{loc:Translate Common_Reset}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Clicked="OnResetColorDialogClicked" />
|
|
<Button Grid.Column="1"
|
|
Text="{loc:Translate Common_Cancel}"
|
|
Style="{StaticResource SecondaryButtonStyle}"
|
|
Clicked="OnCancelColorDialogClicked" />
|
|
<Button Grid.Column="2"
|
|
Text="{loc:Translate Common_Apply}"
|
|
Style="{StaticResource PrimaryButtonStyle}"
|
|
Clicked="OnApplyColorDialogClicked" />
|
|
</Grid>
|
|
</VerticalStackLayout>
|
|
</Border>
|
|
</Grid>
|
|
</Grid>
|
|
</ContentPage>
|