Version 3.0.365

This commit is contained in:
Anja 2023-05-11 17:39:28 +02:00
parent 0b9196a78d
commit 0eb7362cb8
64 changed files with 1423 additions and 1045 deletions

View file

@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
@ -28,6 +28,10 @@ using Arendi.BleLibrary.Local;
// Required for support of binding package, see https://github.com/nuitsjp/Xamarin.Forms.GoogleMaps.Bindings.
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
// Add ExportFont attribute
[assembly: ExportFont("Font Awesome 5 Free-Solid-900.otf", Alias = "FA-S")]
namespace TINK
{
public partial class App : Application

View file

@ -181,6 +181,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Folder Include="$(MSBuildThisFileDirectory)Resources\Fonts\" />
<Folder Include="$(MSBuildThisFileDirectory)View\BikesAtStation\" />
<Folder Include="$(MSBuildThisFileDirectory)View\FeesAndBikes\" />
<Folder Include="$(MSBuildThisFileDirectory)View\Login\" />
@ -339,4 +340,9 @@
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="$(MSBuildThisFileDirectory)Resources\Fonts\Font Awesome 5 Free-Solid-900.otf">
<Generator>MSBuild:Compile</Generator>
</EmbeddedResource>
</ItemGroup>
</Project>

View file

@ -1,11 +1,13 @@
<?xml version="1.0" encoding="utf-8" ?>
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:d="http://xamarin.com/schemas/2014/forms/design"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
mc:Ignorable="d"
x:Class="TINK.View.Account.AccountPage">
x:Class="TINK.View.Account.AccountPage"
BackgroundColor="{DynamicResource background-color}">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
@ -13,24 +15,48 @@
Text="{x:Static resources:AppResources.MarkingAccount}"/>
</Grid>
</Shell.TitleView>
<ContentPage.Content>
<Frame>
<StackLayout>
<Frame>
<StackLayout>
<Label Text="{Binding LoggedInInfo}" />
<Label IsVisible="{Binding IsBookingStateInfoVisible}"
Text="{Binding BookingStateInfo}" />
<Button Text="{x:Static resources:AppResources.MessageAccountPageManagePersonalData}"
Command="{Binding OnManageAccount}"
IsEnabled="{Binding IsLogoutPossible}"/>
<Button Style="{StaticResource SecondaryButton}"
Text="{x:Static resources:AppResources.MessageAccountPageManageLogout}"
Command="{Binding OnLogoutRequest}"
IsEnabled="{Binding IsLogoutPossible}"/>
</StackLayout>
</Frame>
</StackLayout>
</Frame>
</ContentPage.Content>
</ContentPage>
<ContentPage.Content>
<ScrollView>
<StackLayout>
<Frame
Padding="10"
Margin="0,10,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White">
<StackLayout
Padding="10">
<Label
Text="{Binding LoggedInInfo}" />
<Label
IsVisible="{Binding IsBookingStateInfoVisible}"
Text="{Binding BookingStateInfo}" />
<Button
Text="{x:Static resources:AppResources.MessageAccountPageManagePersonalData}"
Command="{Binding OnManageAccount}"
IsEnabled="{Binding IsLogoutPossible}"/>
<Button
Style="{StaticResource SecondaryButton}"
Text="{x:Static resources:AppResources.MessageAccountPageManageLogout}"
Command="{Binding OnLogoutRequest}"
IsEnabled="{Binding IsLogoutPossible}"/>
</StackLayout>
</Frame>
</StackLayout>
</ScrollView>
</ContentPage.Content>
</ContentPage>

View file

@ -9,13 +9,14 @@
mc:Ignorable="d"
x:Class="TINK.View.Bike.ILockItBike">
<ContentView>
<ContentView.Resources>
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="Label_Converter"/>
</ContentView.Resources>
<Frame
Padding="10"
Margin="0,5,0,5"
Margin="0,10,0,5"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
BackgroundColor="White">

View file

@ -3,7 +3,9 @@
xmlns:conv="clr-namespace:TINK.View"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
x:Class="TINK.View.Contact.ContactPage">
x:Class="TINK.View.Contact.ContactPage"
BackgroundColor="{DynamicResource background-color}">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
@ -11,85 +13,110 @@
Text="{x:Static resources:AppResources.MarkingContactPageTitle}"/>
</Grid>
</Shell.TitleView>
<ContentPage.Resources>
<conv:StringNotNullOrEmptyToVisibleConverter x:Key="StringNotNullOrEmpty_Converter"/>
<conv:BoolInverterConverter x:Key="BoolInvert_Converter"/>
</ContentPage.Resources>
<ContentPage.Content>
<ScrollView>
<Frame>
<StackLayout x:Name="ContactPageView">
<Frame
IsVisible="{Binding
Path=IsOperatorInfoAvaliable,
Converter={StaticResource BoolInvert_Converter}}">
<!-- Button to select station and explanation text -->
<StackLayout>
<Label
TextType="Html"
Text="{x:Static resources:AppResources.MarkingContactNoStationInfoAvailableNoButton}"/>
<Button
Text="{x:Static resources:AppResources.ActionSelectStation}"
Command="{Binding OnSelectStationRequest}"/>
</StackLayout>
</Frame>
<Frame
IsVisible="{Binding IsOperatorInfoAvaliable}">
<!-- Operator info -->
<StackLayout>
<Label
IsVisible="{Binding IsOperatorInfoAvaliable}"
HorizontalOptions="Center"
FontAttributes="Bold"
Text="{Binding ProviderNameText}"/>
<!--- Mail to operator -->
<Label
IsVisible="{Binding MailAddressText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
FormattedText="{Binding MailAddressAndMotivationsText}"/>
<Button
x:Name="MailAddressButton"
IsVisible="{Binding MailAddressText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
Text="{Binding MailAddressText}"
IsEnabled="{Binding IsSendMailAvailable}"
Command="{Binding OnMailToOperatorRequest}"/>
<!--- Phone -->
<Label
IsVisible="{Binding PhoneNumberText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
FormattedText="{Binding PhoneContactText}"/>
<Button
Style="{StaticResource SecondaryButton}"
x:Name="PhoneNumberButton"
IsVisible="{Binding PhoneNumberText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
Text="{Binding PhoneNumberText}"
IsEnabled="{Binding IsDoPhoncallAvailable}"
Command="{Binding OnPhoneRequest}"/>
</StackLayout>
</Frame>
<Frame>
<StackLayout>
<Label FormattedText="{Binding LikeTinkApp}"/>
<!--- Mail to app- related support -->
<Button
<ContentPage.Content>
<ScrollView>
<StackLayout
x:Name="ContactPageView">
<Frame
Padding="10"
Margin="0,10,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White">
<StackLayout
Padding="10">
<!-- Button to select station and explanation text -->
<StackLayout
IsVisible="{Binding Path=IsOperatorInfoAvaliable, Converter={StaticResource BoolInvert_Converter}}">
<Label
TextType="Html"
Text="{x:Static resources:AppResources.MarkingContactNoStationInfoAvailableNoButton}"/>
<Button
Text="{x:Static resources:AppResources.ActionSelectStation}"
Command="{Binding OnSelectStationRequest}"/>
</StackLayout>
<!-- Contact operator -->
<StackLayout
IsVisible="{Binding IsOperatorInfoAvaliable}">
<!--- Name of operator -->
<Label
IsVisible="{Binding IsOperatorInfoAvaliable}"
HorizontalOptions="Center"
FontAttributes="Bold"
Text="{Binding ProviderNameText}"/>
<!--- Mail to operator -->
<Label
IsVisible="{Binding MailAddressText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
FormattedText="{Binding MailAddressAndMotivationsText}"/>
<Button
x:Name="MailAddressButton"
IsVisible="{Binding MailAddressText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
Text="{Binding MailAddressText}"
IsEnabled="{Binding IsSendMailAvailable}"
Command="{Binding OnMailToOperatorRequest}"/>
<!--- Phone to operator -->
<Label
IsVisible="{Binding PhoneNumberText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
FormattedText="{Binding PhoneContactText}"/>
<Button
Style="{StaticResource SecondaryButton}"
x:Name="PhoneNumberButton"
IsVisible="{Binding PhoneNumberText, Converter={StaticResource StringNotNullOrEmpty_Converter}}"
Text="{Binding PhoneNumberText}"
IsEnabled="{Binding IsDoPhoncallAvailable}"
Command="{Binding OnPhoneRequest}"/>
</StackLayout>
</StackLayout>
</Frame>
<Frame
Padding="10"
Margin="0,5,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White">
<!--- Contact app-developer -->
<StackLayout
Padding="10">
<Label
FormattedText="{Binding LikeTinkApp}"/>
<!--- Mail to app-developer -->
<Button
Style="{StaticResource SecondaryButton}"
Text="{x:Static resources:AppResources.ActionContactMailAppReleated}"
IsEnabled="{Binding IsSendMailAvailable}"
Command="{Binding OnMailAppRelatedRequest}"/>
<!--- Link to App Store
inactivated since most feedback in App Store is not app-related-->
<!--<Label
Margin="0,10,0,0"
TextType="Html"
HorizontalOptions="Center"
TextColor="{DynamicResource primary-back-title-color}"
Text="{x:Static resources:AppResources.ActionContactRate}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding OnRateRequest}"/>
</Label.GestureRecognizers>
</Label>-->
</StackLayout>
</Frame>
</StackLayout>
</Frame>
</ScrollView>
</ContentPage.Content>
</StackLayout>
</Frame>
</StackLayout>
</ScrollView>
</ContentPage.Content>
</ContentPage>

View file

@ -65,7 +65,7 @@
HorizontalOptions="Center"
WidthRequest="94"
HeightRequest="40"
BorderRadius="10"
CornerRadius="10"
Margin="3,0,0,0"
FontSize="Small"
FontAttributes="Bold"
@ -84,7 +84,7 @@
HorizontalOptions="Center"
WidthRequest="94"
HeightRequest="40"
BorderRadius="10"
CornerRadius="10"
Margin="0,0,3,0"
FontSize="Small"
FontAttributes="Bold"

View file

@ -7,77 +7,121 @@
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
x:Class="TINK.View.FeedbackPopup">
<xct:Popup.Resources>
<x:String x:Key="check_circle">&#xf058;</x:String>
</xct:Popup.Resources>
<StackLayout>
<!-- Head and title -->
<StackLayout
Padding="30"
BackgroundColor="{DynamicResource primary-back-title-color}">
<Label
HorizontalTextAlignment="Center"
FontSize="Large"
TextColor="White"
Text="{x:Static resources:AppResources.MarkingReturnBikeMainMessage}"/>
<Image>
<Image.Source>
<FontImageSource Size="60" Glyph="{StaticResource check_circle}" FontFamily="FA-S" Color="White"/>
</Image.Source>
</Image>
</StackLayout>
<xct:Popup.Resources>
<x:String x:Key="check_circle">&#xf058;</x:String>
</xct:Popup.Resources>
<!-- Co2saving -->
<Frame
x:Name="Co2SavingFrame">
<Label
x:Name="Co2SavingLabel"
Text=""/>
</Frame>
<ScrollView
Orientation="Vertical"
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand">
<!-- Checkbox and input elements -->
<ScrollView>
<StackLayout>
<!-- Battery level -->
<StackLayout
HorizontalOptions="FillAndExpand"
VerticalOptions="FillAndExpand"
Padding="0,0,0,300">
<!-- Head and title -->
<StackLayout
Padding="20"
BackgroundColor="{DynamicResource primary-back-title-color}">
<Label
HorizontalTextAlignment="Center"
FontSize="Large"
TextColor="White"
Text="{x:Static resources:AppResources.MarkingReturnBikeMainMessage}"/>
<Image>
<Image.Source>
<FontImageSource Size="60" Glyph="{StaticResource check_circle}" FontFamily="FA-S" Color="White"/>
</Image.Source>
</Image>
</StackLayout>
<!-- Content -->
<StackLayout
Margin="10"
Spacing="10">
<!-- Co2saving -->
<Frame
x:Name="Co2SavingFrame">
<Label
x:Name="Co2SavingLabel"
Text=""/>
</Frame>
<!-- Battery level -->
<sharedGui:BarLevelInputView
x:Name="BarLevelInputView"
HorizontalOptions="Center"/>
<!-- Checkbox Is Broken -->
<StackLayout Orientation="Horizontal">
<CheckBox x:Name="brockenCheckBox" IsChecked="True" HeightRequest="20"/>
<Label
FontSize="Medium"
Text= "{x:Static resources:AppResources.MarkingReturnBikeBikeStateIsOK}"/>
</StackLayout>
<Editor
x:Name="feedbackMessage"
AutoSize="TextChanges"
Placeholder="{x:Static resources:AppResources.MarkingReturnBikeFeedbackInputPlaceholder}"
Text="">
<Editor.Triggers>
<DataTrigger TargetType="Editor"
Binding="{Binding Source={x:Reference brockenCheckBox}, Path=IsChecked}"
Value="true">
<Setter Property="Placeholder"
Value="{x:Static resources:AppResources.MarkingReturnBikeFeedbackInputPlaceholder}" />
</DataTrigger>
<DataTrigger TargetType="Editor"
Binding="{Binding Source={x:Reference brockenCheckBox}, Path=IsChecked}"
Value="false">
<Setter Property="Placeholder"
Value="{x:Static resources:AppResources.MarkingReturnBikeErrorDescriptionInputPlaceholder}" />
</DataTrigger>
</Editor.Triggers>
</Editor>
</StackLayout>
</ScrollView>
x:Name="BarLevelInputView"
HorizontalOptions="Center"/>
<!-- Is bike okay? -->
<Grid
ColumnDefinitions="*,Auto,Auto,Auto,*"
RowDefinitions="Auto,Auto"
Margin="0,20,0,0">
<Label
Grid.Column="1"
Grid.Row="0"
FontSize="Medium"
FontAttributes="Bold"
Text= "{x:Static resources:AppResources.MarkingReturnBikeBikeIsStateOkQuestion}">
</Label>
<Switch
Grid.Column="2"
Grid.Row="0"
VerticalOptions="Center"
HorizontalOptions="End"
x:Name="bikeIsOkSwitch"
IsToggled="True"/>
<Label
Grid.Column="3"
Grid.Row="0"
VerticalOptions="Center"
HorizontalOptions="Start">
<Label.Triggers>
<DataTrigger TargetType="Label" Binding="{Binding Source={x:Reference bikeIsOkSwitch}, Path=IsToggled}" Value="False">
<Setter Property="Text" Value="{x:Static resources:AppResources.QuestionAnswerNo}"/>
</DataTrigger>
<DataTrigger TargetType="Label" Binding="{Binding Source={x:Reference bikeIsOkSwitch}, Path=IsToggled}" Value="True">
<Setter Property="Text" Value="{x:Static resources:AppResources.QuestionAnswerYes}"/>
</DataTrigger>
</Label.Triggers>
</Label>
<!-- Text input bike is not OK -->
<Editor
Grid.Column="0"
Grid.ColumnSpan="5"
Grid.Row="1"
x:Name="feedbackMessage"
AutoSize="TextChanges"
Placeholder="{x:Static resources:AppResources.MarkingReturnBikeErrorDescriptionInputPlaceholder}"
Text=""
IsVisible="False">
<Editor.Triggers>
<DataTrigger TargetType="Editor"
Binding="{Binding Source={x:Reference bikeIsOkSwitch}, Path=IsToggled}"
Value="False">
<Setter Property="IsVisible" Value="True"/>
<Setter Property="Text" Value=""/>
</DataTrigger>
</Editor.Triggers>
</Editor>
</Grid>
<!-- Buttons -->
<Button
WidthRequest="100"
Clicked="OnOkClicked"
Text="{x:Static resources:AppResources.MessageAnswerOk}"/>
</StackLayout>
</StackLayout>
</ScrollView>
<!-- Buttons -->
<Button
WidthRequest="100"
Clicked="OnOkClicked"
Text="OK"
Margin="0,0,0,3"/>
</StackLayout>
</xct:Popup>

View file

@ -43,7 +43,7 @@ namespace TINK.View
return new Result
{
CurrentChargeBars = int.TryParse(BarLevelInputView.Current, out int current) ? (int?)current : null,
IsBikeBroken = brockenCheckBox.IsChecked,
IsBikeBroken = bikeIsOkSwitch.IsToggled,
Message = feedbackMessage.Text
};
}
@ -53,7 +53,7 @@ namespace TINK.View
var result = new Result
{
CurrentChargeBars = int.TryParse(BarLevelInputView.Current, out int current) ? (int?)current : null,
IsBikeBroken = brockenCheckBox.IsChecked,
IsBikeBroken = bikeIsOkSwitch.IsToggled,
Message = feedbackMessage.Text
};

View file

@ -39,23 +39,42 @@
<sharedGui:NotConnectedToNetView/>
<!--Search bike-->
<StackLayout
BackgroundColor="White"
<Frame
Padding="10"
Margin="0,10,0,5"
IsVisible="{Binding IsSelectBikeVisible}"
HorizontalOptions="FillAndExpand"
BackgroundColor="White">
<StackLayout
Padding="20">
<Entry
Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
MaxLength="10"
CursorPosition="0"
Text="{Binding BikeIdUserInput}"/>
<Label Text="{x:Static resources:AppResources.MarkingFindBikeLabel}"
Margin="0,0,0,-5">
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding Source={x:Reference FindBikeEntry}, Path=Text, TargetNullValue=''}"
Value="">
<Setter Property="IsVisible" Value="False" />
</DataTrigger>
</Label.Triggers>
</Label>
<Entry
x:Name="FindBikeEntry"
Placeholder="{x:Static resources:AppResources.PlaceholderFindBike}"
MaxLength="10"
CursorPosition="0"
Text="{Binding BikeIdUserInput}"/>
<Button
Text="{x:Static resources:AppResources.MarkingFindBike}"
IsEnabled="{Binding IsSelectBikeEnabled}"
Command="{Binding OnSelectBikeRequest}"/>
<Button
Text="{x:Static resources:AppResources.MarkingSearchBike}"
IsEnabled="{Binding IsSelectBikeEnabled}"
Command="{Binding OnSelectBikeRequest}"/>
</StackLayout>
</StackLayout>
</Frame>
<!-- Bike -->
<StackLayout

View file

@ -3,7 +3,9 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
x:Class="TINK.View.Login.LoginPage">
x:Class="TINK.View.Login.LoginPage"
BackgroundColor="{DynamicResource background-color}">
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
@ -11,91 +13,119 @@
Text="{x:Static resources:AppResources.MarkingLogin}"/>
</Grid>
</Shell.TitleView>
<ScrollView>
<Frame>
<StackLayout x:Name="LoginPageView">
<Frame>
<StackLayout>
<Label Text="{x:Static resources:AppResources.MarkingLoginEmailAddressLabel}"
Margin="0,0,0,-10">
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding Source={x:Reference EMailEntry}, Path=Text, TargetNullValue=''}"
Value="">
<Setter Property="IsVisible" Value="False" />
</DataTrigger>
</Label.Triggers>
</Label>
<Entry
Placeholder="{x:Static resources:AppResources.MarkingLoginEmailAddressPlaceholder}"
Keyboard="Email"
AutomationId="mail_address_text"
x:Name="EMailEntry"
Text="{Binding MailAddress}"
IsEnabled="{Binding IsLoggedOut}"/>
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
Margin="0,0,0,-10">
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding Source={x:Reference PasswordEntry}, Path=Text, TargetNullValue=''}"
Value="">
<Setter Property="IsVisible" Value="False" />
</DataTrigger>
</Label.Triggers>
</Label>
<sharedGui:TogglePasswordEntry
Placeholder="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
Text="{Binding Password}"
HidePassword="True"
AutomationId="password_text"
x:Name="PasswordEntry"
IsEnabled="{Binding IsLoggedOut}"/>
<Label Text="{x:Static resources:AppResources.MarkingLoginPasswordLabel}"
HorizontalOptions="End"
Margin="0,-10,0,5"
FontSize="Small">
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding Source={x:Reference PasswordEntry}, Path=Text, TargetNullValue=''}"
Value="">
<Setter Property="IsVisible" Value="False" />
</DataTrigger>
</Label.Triggers>
</Label>
<Button
Text="{x:Static resources:AppResources.ActionLoginLogin}"
AutomationId="login_button"
Command="{Binding OnLoginRequest}"
IsEnabled="{Binding IsLoginRequestAllowed}">
</Button>
<Button
Style="{StaticResource SecondaryButton}"
Text="{x:Static resources:AppResources.ActionLoginRegister}"
AutomationId="register_button"
Command="{Binding OnRegisterRequest}"
IsVisible="{Binding IsWebViewElementsVisible}">
</Button>
<Label
IsVisible="{Binding IsRegisterTargetsInfoVisible}"
FormattedText="{Binding RegisterTargetsInfo}">
</Label>
<Label
Margin="0,10,0,0"
TextType="Html"
AutomationId="password_forgotten_button"
HorizontalOptions="Center"
TextColor="{DynamicResource primary-back-title-color}"
Text="{x:Static resources:AppResources.ActionLoginPasswordForgotten}">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding OnPasswordForgottonRequest}"/>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</Frame>
</StackLayout>
</Frame>
</ScrollView>
<StackLayout>
<Frame
Padding="10"
Margin="0,10,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White">
<StackLayout
x:Name="LoginPageView"
Padding="10">
<Label
Text="{x:Static resources:AppResources.MarkingLoginEmailAddressLabel}"
Margin="0,0,0,-5">
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding Source={x:Reference EMailEntry}, Path=Text, TargetNullValue=''}"
Value="">
<Setter
Property="IsVisible"
Value="False" />
</DataTrigger>
</Label.Triggers>
</Label>
<Entry
Placeholder="{x:Static resources:AppResources.MarkingLoginEmailAddressPlaceholder}"
Keyboard="Email"
AutomationId="mail_address_text"
x:Name="EMailEntry"
Text="{Binding MailAddress}"
IsEnabled="{Binding IsLoggedOut}"/>
<Label
Text="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
Margin="0,0,0,-5">
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding Source={x:Reference PasswordEntry}, Path=Text, TargetNullValue=''}"
Value="">
<Setter
Property="IsVisible"
Value="False" />
</DataTrigger>
</Label.Triggers>
</Label>
<sharedGui:TogglePasswordEntry
Placeholder="{x:Static resources:AppResources.MarkingLoginPasswordPlaceholder}"
Text="{Binding Password}"
HidePassword="True"
AutomationId="password_text"
x:Name="PasswordEntry"
IsEnabled="{Binding IsLoggedOut}"/>
<Label
Text="{x:Static resources:AppResources.MarkingLoginPasswordLabel}"
HorizontalOptions="End"
Margin="0,-10,0,5"
FontSize="Small">
<Label.Triggers>
<DataTrigger
TargetType="Label"
Binding="{Binding Source={x:Reference PasswordEntry}, Path=Text, TargetNullValue=''}"
Value="">
<Setter
Property="IsVisible"
Value="False" />
</DataTrigger>
</Label.Triggers>
</Label>
<Button
Text="{x:Static resources:AppResources.ActionLoginLogin}"
AutomationId="login_button"
Command="{Binding OnLoginRequest}"
IsEnabled="{Binding IsLoginRequestAllowed}">
</Button>
<Button
Style="{StaticResource SecondaryButton}"
Text="{x:Static resources:AppResources.ActionLoginRegister}"
AutomationId="register_button"
Command="{Binding OnRegisterRequest}"
IsVisible="{Binding IsWebViewElementsVisible}">
</Button>
<Label
IsVisible="{Binding IsRegisterTargetsInfoVisible}"
FormattedText="{Binding RegisterTargetsInfo}">
</Label>
<Label
Margin="0,10,0,0"
TextType="Html"
AutomationId="password_forgotten_button"
HorizontalOptions="Center"
TextColor="{DynamicResource primary-back-title-color}"
Text="{x:Static resources:AppResources.ActionLoginPasswordForgotten}">
<Label.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding OnPasswordForgottonRequest}"/>
</Label.GestureRecognizers>
</Label>
</StackLayout>
</Frame>
</StackLayout>
</ContentPage>

View file

@ -4,7 +4,8 @@
x:Class="TINK.View.Settings.SettingsPage"
xmlns:conv="clr-namespace:TINK.View.Settings;assembly=TINKLib"
xmlns:account="clr-namespace:TINK.Model.User.Account;assembly=TINKLib"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib">
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
BackgroundColor="{DynamicResource background-color}">
<ContentPage.Resources>
<conv:BackendPermissionsToVisibleConverter x:Key="Frame_Converter"/>
@ -19,6 +20,7 @@
<conv:PermissionToVisibleConverter x:Key="ShowDiagnostics_Converter" VisibleFlag="{x:Static account:Permissions.ShowDiagnostics}"/>
<conv:PermissionToVisibleConverter x:Key="SwitchSiteCaching_Converter" VisibleFlag="{x:Static account:Permissions.SwitchNoSiteCaching}"/>
</ContentPage.Resources>
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
@ -26,224 +28,269 @@
Text="{x:Static resources:AppResources.MarkingSettings}"/>
</Grid>
</Shell.TitleView>
<ContentPage.Content>
<ScrollView>
<Frame>
<StackLayout>
<!--
<Button Text="Feedback" Clicked="OnFeedbackClickedAsync"/>
-->
<Frame>
<StackLayout>
<Label Text="{x:Static resources:AppResources.MarkingCenterMapToCurrentPos}"/>
<Switch IsToggled="{Binding CenterMapToCurrentLocation}"/>
</StackLayout>
</Frame>
<!-- Filter on view TINK/ Konrad -->
<Frame IsVisible="{Binding IsGroupFilterVisible}">
<StackLayout>
<Label Text="{x:Static resources:AppResources.MarkingShowHideBikesOfType}"/>
<ListView
<ContentPage.Content>
<ScrollView>
<StackLayout>
<Frame
Padding="10"
Margin="0,10,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White">
<Grid ColumnDefinitions="*,Auto">
<Label Text="{x:Static resources:AppResources.MarkingCenterMapToCurrentPos}"/>
<Switch Grid.Column="1" IsToggled="{Binding CenterMapToCurrentLocation}"/>
</Grid>
</Frame>
<!-- Filter on view TINK/ Konrad -->
<Frame
Padding="10"
Margin="0,5,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White"
IsVisible="{Binding IsGroupFilterVisible}">
<StackLayout>
<Label Text="{x:Static resources:AppResources.MarkingShowHideBikesOfType}"/>
<ListView
HasUnevenRows="True"
HeightRequest="120"
x:Name="Filters">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell IsEnabled="{Binding IsEnabled}">
<StackLayout Orientation="Horizontal">
<Label Text="{Binding Text}"/>
<Switch IsToggled="{Binding IsActivated}"/>
</StackLayout>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</Frame>
<!-- Picker to selct startup page -->
<Frame IsVisible="False">
<StackLayout>
<Label Text="{x:Static resources:AppResources.MarkingStartupPage}"/>
<Picker
ItemsSource="{Binding StartupSettings.ServicesTextList}"
SelectedItem="{Binding StartupSettings.ActiveText}"/>
</StackLayout>
</Frame>
<!-- Themes -->
<Frame
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchTheme_Converter}}">
<StackLayout>
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell IsEnabled="{Binding IsEnabled}">
<Grid ColumnDefinitions="*,Auto">
<Label Text="{Binding Text}"/>
<Switch Grid.Column="1" IsToggled="{Binding IsActivated}"/>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</StackLayout>
</Frame>
<Label
<!-- Themes -->
<Frame
Padding="10"
Margin="0,5,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White"
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchTheme_Converter}}">
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchTheme_Converter}}"
Text="Theme"/>
<Picker
<Picker
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchTheme_Converter}}"
ItemsSource="{Binding Themes.ServicesTextList}"
SelectedItem="{Binding Themes.ActiveText}"/>
</StackLayout>
</Frame>
<Frame
IsVisible="{Binding DebugLevel, Converter={StaticResource Frame_Converter}}">
<!-- COPRI server selection -->
<StackLayout>
<Label
</StackLayout>
</Frame>
<!-- COPRI server selection -->
<Frame
Padding="10"
Margin="0,5,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White"
IsVisible="{Binding DebugLevel, Converter={StaticResource Frame_Converter}}">
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickCopriServer_Converter}}"
Text="{Binding CopriServerUriList.CopriServerUriDescription}"/>
<Picker
<Picker
IsVisible="{Binding DebugLevel, Converter={StaticResource PickCopriServer_Converter}}"
ItemsSource="{Binding CopriServerUriList.ServerTextList}"
SelectedItem="{Binding CopriServerUriList.NextActiveServerText}"/>
<Label
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ManagePolling_Converter}}"
Text="{Binding Polling.PollingText}"/>
<Switch
<Switch
IsVisible="{Binding DebugLevel, Converter={StaticResource ManagePolling_Converter}}"
IsToggled="{Binding Polling.IsActivated}"/>
<Label
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ManagePolling_Converter}}"
Text="{Binding Polling.PeriodeTotalSecondsText}"/>
<Stepper
<Stepper
IsVisible="{Binding DebugLevel, Converter={StaticResource ManagePolling_Converter}}"
Minimum="5"
Increment="5"
Maximum="600"
IsEnabled="{Binding Polling.IsActivated}"
Value="{Binding Polling.PeriodeTotalSeconds}"/>
<Label
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ManageCopriCacheExpiration_Converter}}"
Text="Time after which COPRI-cache expires [s]"/>
<Slider
<Slider
IsVisible="{Binding DebugLevel, Converter={StaticResource ManageCopriCacheExpiration_Converter}}"
x:Name="expiresAfter"
Minimum="0"
Maximum="15"
Value="{Binding ExpiresAfterTotalSeconds}"/>
<Entry
<Entry
IsVisible="{Binding DebugLevel, Converter={StaticResource ManageCopriCacheExpiration_Converter}}"
IsReadOnly="True"
Text="{Binding ExpiresAfterTotalSecondsText}"/>
</StackLayout>
</Frame>
<Frame
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}">
<!-- Lock control -->
<StackLayout>
<Label
</StackLayout>
</Frame>
<!-- Lock control -->
<Frame
Padding="10"
Margin="0,5,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White"
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}">
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}"
Text="{x:Static resources:AppResources.MarkingLockControl}" />
<Picker
<Picker
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}"
ItemsSource="{Binding LocksServices.Services.ServicesTextList}"
SelectedItem="{Binding LocksServices.Services.ActiveText}"/>
<Label
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}"
Text="Bluetooth Connect Timeout [sec]"/>
<Label
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}"
Text="{Binding LocksServices.ConnectTimeoutSecText}"/>
<Stepper
<Stepper
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLockServiceImplementation_Converter}}"
Minimum="0.1"
Increment="0.25"
Maximum="60"
Value="{Binding LocksServices.ConnectTimeoutSec}"/>
</StackLayout>
</Frame>
<Frame
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLocationServiceImplementation_Converter}}">
<!-- Geolocation -->
<StackLayout>
</StackLayout>
</Frame>
<Label
<!-- Geolocation -->
<Frame
Padding="10"
Margin="0,5,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White"
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLocationServiceImplementation_Converter}}">
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLocationServiceImplementation_Converter}}"
Text="{x:Static resources:AppResources.MarkingGeolocationControl}" />
<Picker
<Picker
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLocationServiceImplementation_Converter}}"
ItemsSource="{Binding GeolocationServices.ServicesTextList}"
SelectedItem="{Binding GeolocationServices.ActiveText}"/>
</StackLayout>
</Frame>
<Frame
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchSiteCaching_Converter}}">
<!-- Web site caching -->
<StackLayout>
<Label
</StackLayout>
</Frame>
<!-- Web site caching -->
<Frame
Padding="10"
Margin="0,5,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White"
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchSiteCaching_Converter}}">
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchSiteCaching_Converter}}"
Text="{x:Static resources:AppResources.MarkingWebsiteCaching}"/>
<Switch
<Switch
IsVisible="{Binding DebugLevel, Converter={StaticResource SwitchSiteCaching_Converter}}"
IsToggled="{Binding IsSiteCachingOnDisplayValue}"/>
</StackLayout>
</Frame>
<Frame
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}">
<!-- Logging -->
<StackLayout>
<Label
</StackLayout>
</Frame>
<!-- Logging -->
<Frame
Padding="10"
Margin="0,5,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White"
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}">
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}"
Text="{x:Static resources:AppResources.MarkingLoggingLevel}" />
<Picker
<Picker
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}"
ItemsSource="{Binding LoggingLevels}"
SelectedItem="{Binding SelectedLoggingLevel}"/>
<Label
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}"
Text="Logdatei in externen Pfad schreiben"/>
<Switch
<Switch
IsVisible="{Binding DebugLevel, Converter={StaticResource PickLoggingLevel_Converter}}"
IsToggled="{Binding LogToExternalFolderDisplayValue}"
IsEnabled="{Binding IsLogToExternalFolderVisible}"/>
</StackLayout>
</Frame>
<Frame
IsVisible="{Binding DebugLevel, Converter={StaticResource ReportLevel_Converter}}">
<!-- Logging -->
<StackLayout>
<Label
</StackLayout>
</Frame>
<!-- Logging -->
<Frame
Padding="10"
Margin="0,5,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White"
IsVisible="{Binding DebugLevel, Converter={StaticResource ReportLevel_Converter}}">
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ReportLevel_Converter}}"
Text="{x:Static resources:AppResources.MarkingVerboseErrorMessage}" />
<Switch
<Switch
IsVisible="{Binding DebugLevel, Converter={StaticResource ReportLevel_Converter}}"
IsToggled="{Binding IsReportLevelVerbose}"/>
</StackLayout>
</Frame>
<Frame
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}">
<!-- Display of parameters -->
<StackLayout>
<Label
</StackLayout>
</Frame>
<!-- Display of parameters -->
<Frame
Padding="10"
Margin="0,5,0,5"
HorizontalOptions="FillAndExpand"
BackgroundColor="White"
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}">
<StackLayout>
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
Text="Device Identifier" />
<Entry
<Entry
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
IsEnabled="false"
Text="{Binding DeviceIdentifier}"/>
<Label
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
Text="Copri Sitzungkeks"/>
<Entry
<Entry
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
IsEnabled="false"
Text="{Binding SessionCookie}"/>
<Label
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
Text="Interner Pfad (Einstell./ ggf. Logging)"/>
<Editor
<Editor
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
IsEnabled="false"
Text="{Binding InternalPath}"/>
<Label
<Label
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
Text="Externer Pfad (Mock/ ggf. Logging)"/>
<Editor
<Editor
IsVisible="{Binding DebugLevel, Converter={StaticResource ShowDiagnostics_Converter}}"
IsEnabled="false"
Text="{Binding ExternalPath}"/>
</StackLayout>
</Frame>
</StackLayout>
</Frame>
</ScrollView>
</ContentPage.Content>
</StackLayout>
</Frame>
</StackLayout>
</ScrollView>
</ContentPage.Content>
</ContentPage>