Finished Settings page
This commit is contained in:
97
WorkTime.Mobile/Pages/SettingsPage.xaml
Normal file
97
WorkTime.Mobile/Pages/SettingsPage.xaml
Normal file
@@ -0,0 +1,97 @@
|
||||
<?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:components="clr-namespace:WorkTime.Mobile.Pages.Components"
|
||||
xmlns:pages="clr-namespace:WorkTime.Mobile.Pages"
|
||||
xmlns:icons="http://www.aathifmahir.com/dotnet/2022/maui/icons"
|
||||
x:Class="WorkTime.Mobile.Pages.SettingsPage"
|
||||
x:DataType="pages:SettingsPageModel">
|
||||
|
||||
<ContentPage.Content>
|
||||
<Grid Margin="20,10" RowDefinitions="*,Auto">
|
||||
<VerticalStackLayout Grid.Row="0" x:Name="SettingsStack">
|
||||
<HorizontalStackLayout Margin="0, 0, 0, 5" Spacing="15">
|
||||
<icons:MauiIcon Icon="{icons:Material Work}"
|
||||
IconSize="30"
|
||||
IconColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
|
||||
<Label Text="Zeiten"
|
||||
FontSize="20"
|
||||
HorizontalTextAlignment="Center"/>
|
||||
</HorizontalStackLayout>
|
||||
|
||||
<components:SettingComponent
|
||||
Title="Arbeitszeit"
|
||||
Unit="Stunden"
|
||||
Placeholder="{Binding Settings.WorkTime.TotalHours}"
|
||||
Value="{Binding Settings.WorkTime, Mode=OneWayToSource}"/>
|
||||
|
||||
|
||||
|
||||
<HorizontalStackLayout Margin="0, 10, 0, 5" Spacing="15">
|
||||
<icons:MauiIcon Icon="{icons:Material LocalPizza}"
|
||||
IconSize="30"
|
||||
IconColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
|
||||
<Label Text="Pause"
|
||||
FontSize="20"
|
||||
HorizontalTextAlignment="Center"/>
|
||||
</HorizontalStackLayout>
|
||||
|
||||
<components:SettingComponent
|
||||
Title="Nach 0 Stunden"
|
||||
Unit="Minuten"
|
||||
Placeholder="{Binding Settings.BreakAfter0.TotalMinutes}"
|
||||
Value="{Binding Settings.BreakAfter0, Mode=OneWayToSource}"/>
|
||||
|
||||
<components:SettingComponent
|
||||
Title="Nach 6 Stunden"
|
||||
Unit="Minuten"
|
||||
Placeholder="{Binding Settings.BreakAfter6.TotalMinutes}"
|
||||
Value="{Binding Settings.BreakAfter6, Mode=OneWayToSource}"/>
|
||||
|
||||
<components:SettingComponent
|
||||
Title="Nach 9 Stunden"
|
||||
Unit="Minuten"
|
||||
Placeholder="{Binding Settings.BreakAfter9.TotalMinutes}"
|
||||
Value="{Binding Settings.BreakAfter9, Mode=OneWayToSource}"/>
|
||||
|
||||
<components:SettingComponent
|
||||
Title="Nicht tracken nach"
|
||||
Unit="Uhr"
|
||||
Placeholder="{Binding Settings.DontTrackBreakAfter.TotalHours}"
|
||||
Value="{Binding Settings.DontTrackBreakAfter, Mode=OneWayToSource}"/>
|
||||
|
||||
|
||||
|
||||
<HorizontalStackLayout Margin="0, 10, 0, 5" Spacing="15">
|
||||
<icons:MauiIcon Icon="{icons:Material CreditCard}"
|
||||
IconSize="30"
|
||||
IconColor="{AppThemeBinding Light={StaticResource Black}, Dark={StaticResource White}}" />
|
||||
|
||||
<Label Text="Überstunden"
|
||||
FontSize="20"
|
||||
HorizontalTextAlignment="Center"/>
|
||||
</HorizontalStackLayout>
|
||||
|
||||
<components:SettingComponent
|
||||
Title="Optimal"
|
||||
Unit="Minuten"
|
||||
Placeholder="{Binding Settings.IdealOvertime.TotalMinutes}"
|
||||
Value="{Binding Settings.IdealOvertime, Mode=OneWayToSource}"/>
|
||||
|
||||
<components:SettingComponent
|
||||
Title="Maximal"
|
||||
Unit="Minuten"
|
||||
Placeholder="{Binding Settings.MaxOvertime.TotalMinutes}"
|
||||
Value="{Binding Settings.MaxOvertime, Mode=OneWayToSource}"/>
|
||||
</VerticalStackLayout>
|
||||
|
||||
<Button Grid.Row="1"
|
||||
Text="Speichern"
|
||||
HorizontalOptions="Center"
|
||||
Command="{Binding SaveSettingsCommand}"/>
|
||||
</Grid>
|
||||
</ContentPage.Content>
|
||||
</ContentPage>
|
||||
Reference in New Issue
Block a user