sharee.bike-App/Meinkonrad/TINK/View/Login/LoginPage.xaml

151 lines
4.5 KiB
Text
Raw Normal View History

2022-11-17 10:05:05 +01:00
<?xml version="1.0" encoding="utf-8" ?>
2021-11-07 19:42:59 +01:00
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:resources="clr-namespace:TINK.MultilingualResources;assembly=TINKLib"
2023-07-19 10:10:36 +02:00
xmlns:conv="clr-namespace:TINK.View"
2022-11-17 10:05:05 +01:00
xmlns:sharedGui="clr-namespace:ShareeSharedGuiLib.View"
2023-05-11 17:39:28 +02:00
x:Class="TINK.View.Login.LoginPage"
BackgroundColor="{DynamicResource background-color}">
2022-08-30 15:42:25 +02:00
<Shell.TitleView>
<Grid ColumnDefinitions="Auto, 1*">
<Image Style="{StaticResource Image-Navbar}"/>
<Label Style="{StaticResource Label-Navbar}"
Text="{x:Static resources:AppResources.MarkingLogin}"/>
</Grid>
</Shell.TitleView>
2023-05-11 17:39:28 +02:00
2023-07-19 10:10:36 +02:00
<ContentPage.Resources>
<conv:BoolInverterConverter x:Key="BoolInverterConverter"/>
</ContentPage.Resources>
2023-05-11 17:39:28 +02:00
2023-07-19 10:10:36 +02:00
<ContentPage.Content>
<!--Grid for content and Running process in same row-->
<Grid>
2023-05-11 17:39:28 +02:00
<StackLayout
2023-07-19 10:10:36 +02:00
Grid.Row="0">
<Frame
2023-09-22 11:38:42 +02:00
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}">
<Button.Triggers>
<DataTrigger TargetType="Button" Binding="{Binding IsLoginRequestAllowed}" Value="False">
<Setter Property="BorderColor" Value="DimGray" />
<Setter Property="BackgroundColor" Value="DimGray" />
<Setter Property="TextColor" Value="LightGray" />
</DataTrigger>
</Button.Triggers>
</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>
<Button
AutomationId="password_forgotten_button"
Style="{StaticResource NoOutlineButtonWhite}"
Text="{x:Static resources:AppResources.ActionLoginPasswordForgotten}"
Command="{Binding OnPasswordForgottonRequest}"/>
</StackLayout>
</Frame>
</StackLayout>
<!--While process is running-->
<sharedGui:RunningProcessView
2023-07-19 10:10:36 +02:00
IsVisible="{Binding IsIdle, Converter={StaticResource BoolInverterConverter}}"
Grid.Row="0"/>
</Grid>
</ContentPage.Content>
2022-11-17 10:05:05 +01:00
</ContentPage>