1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-11 13:53:29 +00:00

PM-3350 Added Scrollview on HomePage so that the "Create account" button can be accessed in smaller devices like iPhone SE.

This commit is contained in:
Dinis Vieira
2023-10-29 21:34:33 +00:00
parent 484b5a5160
commit e90409d842

View File

@@ -31,98 +31,100 @@
<ContentPage.Resources> <ContentPage.Resources>
<ResourceDictionary> <ResourceDictionary>
<u:InverseBoolConverter x:Key="inverseBool" /> <u:InverseBoolConverter x:Key="inverseBool" />
<StackLayout x:Name="_mainLayout" x:Key="mainLayout" Spacing="30" Padding="20, 50, 20, 0"> <ScrollView x:Name="_mainLayout" x:Key="mainLayout">
<Image <StackLayout Spacing="30" Padding="20, 50, 20, 0">
x:Name="_logo" <Image
Source="logo.png" x:Name="_logo"
HeightRequest="60" Source="logo.png"
VerticalOptions="Center" /> HeightRequest="60"
<Label Text="{u:I18n LoginOrCreateNewAccount}" VerticalOptions="Center" />
StyleClass="text-lg" <Label Text="{u:I18n LoginOrCreateNewAccount}"
HorizontalTextAlignment="Center"/> StyleClass="text-lg"
<StackLayout HorizontalTextAlignment="Center"/>
StyleClass="box-row"> <StackLayout
<Label StyleClass="box-row">
Text="{u:I18n EmailAddress}"
StyleClass="box-label" />
<Entry
x:Name="_email"
Text="{Binding Email}"
Keyboard="Email"
StyleClass="box-value"
ReturnType="Go"
ReturnCommand="{Binding ContinueCommand}"
AutomationId="EmailAddressEntry"
>
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{DynamicResource MutedColor}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Entry>
<StackLayout
Orientation="Horizontal"
Margin="0, 6, 0 ,0">
<StackLayout.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding ShowEnvironmentPickerCommand}" />
</StackLayout.GestureRecognizers>
<Label <Label
Text="{Binding RegionText}" Text="{u:I18n EmailAddress}"
FontSize="13" StyleClass="box-label" />
TextColor="{DynamicResource MutedColor}" <Entry
VerticalOptions="Center" x:Name="_email"
VerticalTextAlignment="Center"/> Text="{Binding Email}"
<controls:IconLabel Keyboard="Email"
Text="{Binding SelectedEnvironmentName}" StyleClass="box-value"
FontSize="13" ReturnType="Go"
TextColor="{DynamicResource PrimaryColor}" ReturnCommand="{Binding ContinueCommand}"
VerticalOptions="Center" AutomationId="EmailAddressEntry"
VerticalTextAlignment="Center" >
AutomationId="RegionSelectorDropdown"/> <VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="CommonStates">
<VisualState x:Name="Disabled">
<VisualState.Setters>
<Setter Property="TextColor" Value="{DynamicResource MutedColor}" />
</VisualState.Setters>
</VisualState>
</VisualStateGroup>
</VisualStateManager.VisualStateGroups>
</Entry>
<StackLayout
Orientation="Horizontal"
Margin="0, 6, 0 ,0">
<StackLayout.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding ShowEnvironmentPickerCommand}" />
</StackLayout.GestureRecognizers>
<Label
Text="{Binding RegionText}"
FontSize="13"
TextColor="{DynamicResource MutedColor}"
VerticalOptions="Center"
VerticalTextAlignment="Center"/>
<controls:IconLabel
Text="{Binding SelectedEnvironmentName}"
FontSize="13"
TextColor="{DynamicResource PrimaryColor}"
VerticalOptions="Center"
VerticalTextAlignment="Center"
AutomationId="RegionSelectorDropdown"/>
</StackLayout>
<StackLayout
Orientation="Horizontal"
Margin="0, 20, 0 ,0">
<StackLayout.GestureRecognizers>
<TapGestureRecognizer
Command="{Binding RememberEmailCommand}" />
</StackLayout.GestureRecognizers>
<Label
Text="{u:I18n RememberMe}"
StyleClass="text-sm"
HorizontalOptions="FillAndExpand"
VerticalOptions="Center"
VerticalTextAlignment="Center"
/>
<Switch
Scale="0.8"
IsToggled="{Binding RememberEmail}"
VerticalOptions="Center"
AutomationId="RememberMeSwitch"
/>
</StackLayout>
</StackLayout> </StackLayout>
<StackLayout <Button Text="{u:I18n Continue}"
Orientation="Horizontal" StyleClass="btn-primary"
Margin="0, 20, 0 ,0"> IsEnabled="{Binding CanContinue}"
<StackLayout.GestureRecognizers> Command="{Binding ContinueCommand}"
<TapGestureRecognizer AutomationId="ContinueButton"
Command="{Binding RememberEmailCommand}" />
</StackLayout.GestureRecognizers>
<Label
Text="{u:I18n RememberMe}"
StyleClass="text-sm"
HorizontalOptions="FillAndExpand"
VerticalOptions="Center"
VerticalTextAlignment="Center"
/> />
<Switch
Scale="0.8" <Label FormattedText="{Binding CreateAccountText}"
IsToggled="{Binding RememberEmail}" Margin="0, 10"
VerticalOptions="Center" StyleClass="box-footer-label"
AutomationId="RememberMeSwitch" AutomationId="CreateAccountLabel">
/> <Label.GestureRecognizers>
</StackLayout> <TapGestureRecognizer Command="{Binding CreateAccountCommand}" />
</Label.GestureRecognizers>
</Label>
</StackLayout> </StackLayout>
<Button Text="{u:I18n Continue}" </ScrollView>
StyleClass="btn-primary"
IsEnabled="{Binding CanContinue}"
Command="{Binding ContinueCommand}"
AutomationId="ContinueButton"
/>
<Label FormattedText="{Binding CreateAccountText}"
Margin="0, 10"
StyleClass="box-footer-label"
AutomationId="CreateAccountLabel">
<Label.GestureRecognizers>
<TapGestureRecognizer Command="{Binding CreateAccountCommand}" />
</Label.GestureRecognizers>
</Label>
</StackLayout>
</ResourceDictionary> </ResourceDictionary>
</ContentPage.Resources> </ContentPage.Resources>