From 177b48ac9030324ffa1efd736ee4be3bc2c09071 Mon Sep 17 00:00:00 2001 From: Alistair Francis Date: Wed, 13 Dec 2017 05:57:49 -0800 Subject: [PATCH] Add Windows support for QR code scanning (#207) * UWP: Add support for QR code scanning Signed-off-by: Alistair Francis * 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 --- src/App/Pages/ScanPage.cs | 2 +- src/UWP/App.xaml.cs | 2 ++ src/UWP/UWP.csproj | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/App/Pages/ScanPage.cs b/src/App/Pages/ScanPage.cs index d54d022be..a3cd92fda 100644 --- a/src/App/Pages/ScanPage.cs +++ b/src/App/Pages/ScanPage.cs @@ -68,7 +68,7 @@ namespace Bit.App.Pages Children = { _zxing, _overlay } }; - if(Device.RuntimePlatform == Device.iOS) + if(Device.RuntimePlatform == Device.iOS || Device.RuntimePlatform == Device.Windows) { ToolbarItems.Add(new DismissModalToolBarItem(this, AppResources.Close)); } diff --git a/src/UWP/App.xaml.cs b/src/UWP/App.xaml.cs index 6364de0cb..c97704722 100644 --- a/src/UWP/App.xaml.cs +++ b/src/UWP/App.xaml.cs @@ -35,6 +35,8 @@ namespace Bit.UWP protected override void OnLaunched(LaunchActivatedEventArgs e) { + ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingScannerViewRenderer.Init(); + var rootFrame = Window.Current.Content as Frame; if(rootFrame == null) { diff --git a/src/UWP/UWP.csproj b/src/UWP/UWP.csproj index 52b6ff2b6..6f5e99d11 100644 --- a/src/UWP/UWP.csproj +++ b/src/UWP/UWP.csproj @@ -186,6 +186,9 @@ 2.0.5782 + + 2.3.2 +