mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 07:43:37 +00:00
PS-70 changed labels on manual scanner screen
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
xmlns:core="clr-namespace:Bit.Core;assembly=BitwardenCore"
|
xmlns:core="clr-namespace:Bit.Core;assembly=BitwardenCore"
|
||||||
xmlns:zxing="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms"
|
xmlns:zxing="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms"
|
||||||
x:Name="_page"
|
x:Name="_page"
|
||||||
Title="{u:I18n ScanQrTitle}">
|
Title="{Binding ScanQrPageTitle}">
|
||||||
|
|
||||||
<ContentPage.BindingContext>
|
<ContentPage.BindingContext>
|
||||||
<pages:ScanPageViewModel />
|
<pages:ScanPageViewModel />
|
||||||
@@ -44,6 +44,35 @@
|
|||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
Grid.RowSpan="3"
|
Grid.RowSpan="3"
|
||||||
OnScanResult="OnScanResult"/>
|
OnScanResult="OnScanResult"/>
|
||||||
|
<StackLayout
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="FillAndExpand"
|
||||||
|
IsVisible="{Binding ShowScanner}"
|
||||||
|
Grid.Column="0"
|
||||||
|
Grid.Row="0"
|
||||||
|
Grid.RowSpan="2"
|
||||||
|
Margin="30,0">
|
||||||
|
|
||||||
|
<forms:SKCanvasView
|
||||||
|
x:Name="SkCanvasView"
|
||||||
|
Margin="0,50,0,0"
|
||||||
|
WidthRequest="250"
|
||||||
|
HeightRequest="250"
|
||||||
|
IsVisible="{Binding ShowScanner}"
|
||||||
|
VerticalOptions="Center"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
PaintSurface="OnCanvasViewPaintSurface"/>
|
||||||
|
|
||||||
|
<controls:IconButton
|
||||||
|
x:Name="_checkIcon"
|
||||||
|
IsVisible="{Binding ShowScanner}"
|
||||||
|
StyleClass="box-row-button, box-row-button-platform"
|
||||||
|
Text="{Binding Source={x:Static core:BitwardenIcons.CheckCircle}}"
|
||||||
|
HorizontalOptions="Center"
|
||||||
|
VerticalOptions="Start"
|
||||||
|
FontSize="30"
|
||||||
|
TextColor="Transparent"/>
|
||||||
|
</StackLayout>
|
||||||
<BoxView
|
<BoxView
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.Row="0"
|
Grid.Row="0"
|
||||||
@@ -62,7 +91,7 @@
|
|||||||
Text="{u:I18n EnterCodeManually}"
|
Text="{u:I18n EnterCodeManually}"
|
||||||
FontSize="30" />
|
FontSize="30" />
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n AuthenticatorKey}"
|
Text="{u:I18n AuthenticatorKeyScanner}"
|
||||||
StyleClass="box-label" />
|
StyleClass="box-label" />
|
||||||
<controls:MonoEntry
|
<controls:MonoEntry
|
||||||
x:Name="_authenticationKeyEntry"
|
x:Name="_authenticationKeyEntry"
|
||||||
@@ -75,32 +104,6 @@
|
|||||||
StyleClass="box-button-row"
|
StyleClass="box-button-row"
|
||||||
Clicked="AddAuthenticationKey_OnClicked"/>
|
Clicked="AddAuthenticationKey_OnClicked"/>
|
||||||
</StackLayout>
|
</StackLayout>
|
||||||
<StackLayout
|
|
||||||
VerticalOptions="Center"
|
|
||||||
HorizontalOptions="FillAndExpand"
|
|
||||||
IsVisible="{Binding ShowScanner}"
|
|
||||||
Grid.Column="0"
|
|
||||||
Grid.Row="0"
|
|
||||||
Grid.RowSpan="2"
|
|
||||||
Margin="30,0">
|
|
||||||
|
|
||||||
<forms:SKCanvasView x:Name="SkCanvasView"
|
|
||||||
Margin="0,50,0,0"
|
|
||||||
WidthRequest="250"
|
|
||||||
HeightRequest="250"
|
|
||||||
VerticalOptions="Center"
|
|
||||||
HorizontalOptions="Center"
|
|
||||||
PaintSurface="OnCanvasViewPaintSurface"/>
|
|
||||||
|
|
||||||
<controls:IconButton
|
|
||||||
x:Name="_checkIcon"
|
|
||||||
StyleClass="box-row-button, box-row-button-platform"
|
|
||||||
Text="{Binding Source={x:Static core:BitwardenIcons.CheckCircle}}"
|
|
||||||
HorizontalOptions="Center"
|
|
||||||
VerticalOptions="Start"
|
|
||||||
FontSize="30"
|
|
||||||
TextColor="Transparent"/>
|
|
||||||
</StackLayout>
|
|
||||||
<BoxView
|
<BoxView
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.Row="2"
|
Grid.Row="2"
|
||||||
@@ -114,14 +117,14 @@
|
|||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
Grid.Row="2">
|
Grid.Row="2">
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n CameraInstructionTop}"
|
Text="{Binding CameraInstructionTop}"
|
||||||
AutomationId="zxingDefaultOverlay_TopTextLabel"
|
AutomationId="zxingDefaultOverlay_TopTextLabel"
|
||||||
Margin="0,15,0,0"
|
Margin="30,15,30,0"
|
||||||
HorizontalOptions="Center"
|
HorizontalOptions="Center"
|
||||||
StyleClass="text-sm"
|
StyleClass="text-sm"
|
||||||
TextColor="White" />
|
TextColor="White" />
|
||||||
<Label
|
<Label
|
||||||
Text="{u:I18n CameraInstructionBottom}"
|
Text="{Binding CameraInstructionBottom}"
|
||||||
AutomationId="zxingDefaultOverlay_BottomTextLabel"
|
AutomationId="zxingDefaultOverlay_BottomTextLabel"
|
||||||
HorizontalOptions="Center"
|
HorizontalOptions="Center"
|
||||||
StyleClass="text-sm"
|
StyleClass="text-sm"
|
||||||
|
|||||||
@@ -17,7 +17,9 @@ namespace Bit.App.Pages
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Command ToggleScanModeCommand { get; set; }
|
public Command ToggleScanModeCommand { get; set; }
|
||||||
|
public string ScanQrPageTitle => ShowScanner ? AppResources.ScanQrTitle : AppResources.AuthenticatorKeyScanner;
|
||||||
|
public string CameraInstructionTop => ShowScanner ? AppResources.CameraInstructionTop : AppResources.OnceTheKeyIsSuccessfullyEntered;
|
||||||
|
public string CameraInstructionBottom => ShowScanner ? AppResources.CameraInstructionBottom : AppResources.SelectAddTotpToStoreTheKeySafely;
|
||||||
public string TotpAuthenticationKey
|
public string TotpAuthenticationKey
|
||||||
{
|
{
|
||||||
get => _totpAuthenticationKey;
|
get => _totpAuthenticationKey;
|
||||||
@@ -33,7 +35,10 @@ namespace Bit.App.Pages
|
|||||||
set => SetProperty(ref _showScanner, value,
|
set => SetProperty(ref _showScanner, value,
|
||||||
additionalPropertyNames: new string[]
|
additionalPropertyNames: new string[]
|
||||||
{
|
{
|
||||||
nameof(ToggleScanModeLabel)
|
nameof(ToggleScanModeLabel),
|
||||||
|
nameof(ScanQrPageTitle),
|
||||||
|
nameof(CameraInstructionTop),
|
||||||
|
nameof(CameraInstructionBottom)
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user