mirror of
https://github.com/bitwarden/android.git
synced 2024-12-25 18:38:27 +03:00
Add Windows support for QR code scanning (#207)
* UWP: Add support for QR code scanning Signed-off-by: Alistair Francis <alistair@alistair23.me> * Pages: ScanPage: Set the close button on Windows A previous commit mistakenly removed the close button, even though the scan page is not modal. This means there is no way to navigate away if running on Windows 10. Revert this change to add a back button. We need to use a modal page here as we need it to pop up over the entire view. Signed-off-by: Alistair Francis <alistair@alistair23.me>
This commit is contained in:
parent
b4e7fd6fa8
commit
177b48ac90
3 changed files with 6 additions and 1 deletions
|
@ -68,7 +68,7 @@ namespace Bit.App.Pages
|
||||||
Children = { _zxing, _overlay }
|
Children = { _zxing, _overlay }
|
||||||
};
|
};
|
||||||
|
|
||||||
if(Device.RuntimePlatform == Device.iOS)
|
if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows)
|
||||||
{
|
{
|
||||||
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close));
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,6 +35,8 @@ namespace Bit.UWP
|
||||||
|
|
||||||
protected override void OnLaunched(LaunchActivatedEventArgs e)
|
protected override void OnLaunched(LaunchActivatedEventArgs e)
|
||||||
{
|
{
|
||||||
|
ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingScannerViewRenderer.Init();
|
||||||
|
|
||||||
var rootFrame = Window.Current.Content as Frame;
|
var rootFrame = Window.Current.Content as Frame;
|
||||||
if(rootFrame == null)
|
if(rootFrame == null)
|
||||||
{
|
{
|
||||||
|
|
|
@ -186,6 +186,9 @@
|
||||||
<PackageReference Include="XLabs.IoC.SimpleInjector">
|
<PackageReference Include="XLabs.IoC.SimpleInjector">
|
||||||
<Version>2.0.5782</Version>
|
<Version>2.0.5782</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
<PackageReference Include="ZXing.Net.Mobile.Forms">
|
||||||
|
<Version>2.3.2</Version>
|
||||||
|
</PackageReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="..\App\App.csproj">
|
<ProjectReference Include="..\App\App.csproj">
|
||||||
|
|
Loading…
Reference in a new issue