Compare commits

...

9 Commits

Author SHA1 Message Date
Matt Portune
10a718b0c7 bump version to 2.11.2 (#1473) 2021-07-23 11:33:53 -04:00
Thomas Rittson
9ec4050e4d Move remaining primary buttons in login flow (#1470)
* Fix show/hide logic on Continue button

* Fix bug in 2FA method selection modal

* Move Log In button in SSO flow

* Fix linting
2021-07-22 07:56:39 +10:00
Matt Portune
93e2c0df7c keep app version at 2.11.1 for now (#1471) 2021-07-21 14:03:38 -04:00
Matt Portune
8d07397a59 Revert "lib updates and app version bump (#1468)" (#1469)
This reverts commit 15d44b873b.
2021-07-20 16:21:41 -04:00
Matt Portune
15d44b873b lib updates and app version bump (#1468)
* lib updates and app version bump

* added explicit androidx core dependency
2021-07-20 12:57:01 -04:00
Sang
6a979d0ff5 2FA screen: move continue to a button (#1427)
* Move continue to a button

* Resolve pr comments

* Move use another two step method button

* Resolve code suggestions

* Resolve for iPhone

* Apply suggestions from code review

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>

Co-authored-by: Thomas Rittson <31796059+eliykat@users.noreply.github.com>
2021-07-20 14:50:45 +10:00
Matt Portune
a4db088eda bugfix for incorrect type and nullable for some org vars (#1465) 2021-07-16 13:57:15 -04:00
Matt Portune
96454b7cbf add toggle for removing links to pages containing subscription info (#1463) 2021-07-16 12:02:00 -04:00
Matt Portune
9c1df2179c bump version to 2.11.1 (#1462) 2021-07-14 14:46:18 -04:00
20 changed files with 113 additions and 64 deletions

View File

@@ -28,7 +28,6 @@
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>3</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
<AndroidSupportedAbis />
<JavaMaximumHeapSize>1G</JavaMaximumHeapSize>
</PropertyGroup>
@@ -77,20 +76,22 @@
<PackageReference Include="Portable.BouncyCastle">
<Version>1.8.10</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Core" Version="1.5.0" />
<PackageReference Include="Xamarin.AndroidX.AppCompat.AppCompatResources" Version="1.3.0" />
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.3.0" />
<PackageReference Include="Xamarin.AndroidX.AutoFill" Version="1.1.0.6" />
<PackageReference Include="Xamarin.AndroidX.CardView" Version="1.0.0.8" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.7" />
<PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.2.4" />
<PackageReference Include="Xamarin.AndroidX.Migration" Version="1.0.8" />
<PackageReference Include="Xamarin.Essentials">
<Version>1.6.1</Version>
<Version>1.7.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Firebase.Messaging">
<Version>121.0.1</Version>
<Version>122.0.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.3.0.1" />
<PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.2.0.7" />
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.7" />
<PackageReference Include="Xamarin.AndroidX.CardView" Version="1.0.0.8" />
<PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.2.2.1" />
<PackageReference Include="Xamarin.AndroidX.Migration" Version="1.0.8" />
<PackageReference Include="Xamarin.Google.Dagger" Version="2.27.0" />
<PackageReference Include="Xamarin.Google.Dagger" Version="2.37.0" />
<PackageReference Include="Xamarin.GooglePlayServices.SafetyNet">
<Version>117.0.0</Version>
</PackageReference>

View File

@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="1"
android:versionName="2.11.0"
android:versionName="2.11.2"
android:installLocation="internalOnly"
package="com.x8bit.bitwarden">

View File

@@ -13,11 +13,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.2.0" />
<PackageReference Include="Microsoft.AppCenter.Crashes" Version="4.3.0" />
<PackageReference Include="Plugin.Fingerprint" Version="2.1.4" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
<PackageReference Include="Xamarin.FFImageLoading.Forms" Version="2.4.11.982" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2083" />
<PackageReference Include="ZXing.Net.Mobile" Version="2.4.1" />
<PackageReference Include="ZXing.Net.Mobile.Forms" Version="2.4.1" />
</ItemGroup>

View File

@@ -14,7 +14,6 @@
<ContentPage.ToolbarItems>
<ToolbarItem Text="{u:I18n Close}" Clicked="Close_Clicked" Order="Primary" Priority="-1" />
<ToolbarItem Text="{u:I18n LogIn}" Clicked="LogIn_Clicked" />
</ContentPage.ToolbarItems>
<ScrollView>
@@ -36,6 +35,10 @@
ReturnCommand="{Binding LogInCommand}" />
</StackLayout>
</StackLayout>
<StackLayout Padding="10, 0">
<Button Text="{u:I18n LogIn}"
Clicked="LogIn_Clicked"></Button>
</StackLayout>
</StackLayout>
</ScrollView>

View File

@@ -16,14 +16,21 @@
<ContentPage.ToolbarItems>
<ToolbarItem Text="{u:I18n Cancel}" Clicked="Close_Clicked" Order="Primary" Priority="-1"
x:Name="_cancelItem" />
<ToolbarItem Text="{u:I18n Continue}" Clicked="Continue_Clicked" Order="Primary"
x:Name="_continueItem" />
</ContentPage.ToolbarItems>
<ContentPage.Resources>
<ResourceDictionary>
<u:InverseBoolConverter x:Key="inverseBool" />
<u:IsNullConverter x:Key="isNull" />
<ToolbarItem Icon="more_vert.png" Clicked="More_Clicked" Order="Primary"
x:Name="_moreItem" x:Key="moreItem"
AutomationProperties.IsInAccessibleTree="True"
AutomationProperties.Name="{u:I18n Options}" />
<ToolbarItem Text="{u:I18n UseAnotherTwoStepMethod}"
Clicked="Methods_Clicked"
Order="Secondary"
x:Name="_useAnotherTwoStepMethod"
x:Key="useAnotherTwoStepMethod" />
</ResourceDictionary>
</ContentPage.Resources>
@@ -45,7 +52,8 @@
Keyboard="Numeric"
StyleClass="box-value"
ReturnType="Go"
ReturnCommand="{Binding SubmitCommand}" />
ReturnCommand="{Binding SubmitCommand}"
TextChanged="Token_TextChanged"/>
</StackLayout>
<StackLayout StyleClass="box-row, box-row-switch">
<Label
@@ -123,6 +131,12 @@
Margin="10, 20, 10, 10"
HorizontalTextAlignment="Center" />
</StackLayout>
<Button Text="{u:I18n Continue}"
IsEnabled="{Binding EnableContinue}"
IsVisible="{Binding ShowContinue}"
Clicked="Continue_Clicked"
Margin="10, 0"
x:Name="_continue"></Button>
<Button Text="{u:I18n SendVerificationCodeAgain}"
IsVisible="{Binding EmailMethod}"
Clicked="ResendEmail_Clicked"
@@ -131,9 +145,6 @@
IsVisible="{Binding ShowTryAgain}"
Clicked="TryAgain_Clicked"
Margin="10, 0"></Button>
<Button Text="{u:I18n UseAnotherTwoStepMethod}"
Clicked="Methods_Clicked"
Margin="10, 0"></Button>
</StackLayout>
</ScrollView>

View File

@@ -1,5 +1,6 @@
using Bit.App.Controls;
using Bit.App.Models;
using Bit.App.Resources;
using Bit.Core.Abstractions;
using Bit.Core.Utilities;
using System;
@@ -45,26 +46,17 @@ namespace Bit.App.Pages
{
ToolbarItems.Remove(_cancelItem);
}
if (Device.RuntimePlatform == Device.iOS)
{
ToolbarItems.Add(_moreItem);
} else
{
ToolbarItems.Add(_useAnotherTwoStepMethod);
}
}
public HybridWebView DuoWebView { get; set; }
public void AddContinueButton()
{
if (!ToolbarItems.Contains(_continueItem))
{
ToolbarItems.Add(_continueItem);
}
}
public void RemoveContinueButton()
{
if (ToolbarItems.Contains(_continueItem))
{
ToolbarItems.Remove(_continueItem);
}
}
protected async override void OnAppearing()
{
base.OnAppearing();
@@ -145,6 +137,21 @@ namespace Bit.App.Pages
}
}
private async void More_Clicked(object sender, EventArgs e)
{
if (!DoOnce())
{
return;
}
var selection = await DisplayActionSheet(AppResources.Options, AppResources.Cancel, null, AppResources.UseAnotherTwoStepMethod);
if (selection == AppResources.UseAnotherTwoStepMethod)
{
await _vm.AnotherMethodAsync();
}
}
private async void ResendEmail_Clicked(object sender, EventArgs e)
{
if (DoOnce())
@@ -195,5 +202,10 @@ namespace Bit.App.Pages
Application.Current.MainPage = new TabsPage(_appOptions, previousPage);
}
}
private void Token_TextChanged(object sender, TextChangedEventArgs e)
{
_vm.EnableContinue = !string.IsNullOrWhiteSpace(e.NewTextValue);
}
}
}

View File

@@ -32,6 +32,8 @@ namespace Bit.App.Pages
private string _totpInstruction;
private string _webVaultUrl = "https://vault.bitwarden.com";
private bool _authingWithSso = false;
private bool _enableContinue = false;
private bool _showContinue = true;
public TwoFactorPageViewModel()
{
@@ -73,6 +75,18 @@ namespace Bit.App.Pages
public bool ShowTryAgain => YubikeyMethod && Device.RuntimePlatform == Device.iOS;
public bool ShowContinue
{
get => _showContinue;
set => SetProperty(ref _showContinue, value);
}
public bool EnableContinue
{
get => _enableContinue;
set => SetProperty(ref _enableContinue, value);
}
public string YubikeyInstruction => Device.RuntimePlatform == Device.iOS ? AppResources.YubiKeyInstructionIos :
AppResources.YubiKeyInstruction;
@@ -169,14 +183,7 @@ namespace Bit.App.Pages
{
_messagingService.Send("listenYubiKeyOTP", false);
}
if (SelectedProviderType == null || DuoMethod)
{
page.RemoveContinueButton();
}
else
{
page.AddContinueButton();
}
ShowContinue = !(SelectedProviderType == null || DuoMethod);
}
public async Task SubmitAsync()
@@ -245,7 +252,7 @@ namespace Bit.App.Pages
{
_platformUtilsService.LaunchUri("https://help.bitwarden.com/article/lost-two-step-device/");
}
else if (method != AppResources.Cancel)
else if (method != AppResources.Cancel && method != null)
{
var selected = supportedProviders.FirstOrDefault(p => p.Name == method)?.Type;
if (selected == SelectedProviderType)

View File

@@ -379,17 +379,23 @@ namespace Bit.App.Pages
}
var accountItems = new List<SettingsPageListItem>
{
new SettingsPageListItem { Name = AppResources.ChangeMasterPassword },
new SettingsPageListItem { Name = AppResources.FingerprintPhrase },
new SettingsPageListItem { Name = AppResources.LogOut }
};
if (IncludeLinksWithSubscriptionInfo())
{
accountItems.Insert(0, new SettingsPageListItem { Name = AppResources.ChangeMasterPassword });
}
var toolsItems = new List<SettingsPageListItem>
{
new SettingsPageListItem { Name = AppResources.ImportItems },
new SettingsPageListItem { Name = AppResources.ExportVault },
new SettingsPageListItem { Name = AppResources.ShareVault },
new SettingsPageListItem { Name = AppResources.WebVault }
new SettingsPageListItem { Name = AppResources.ExportVault }
};
if (IncludeLinksWithSubscriptionInfo())
{
toolsItems.Add(new SettingsPageListItem { Name = AppResources.ShareVault });
toolsItems.Add(new SettingsPageListItem { Name = AppResources.WebVault });
}
var otherItems = new List<SettingsPageListItem>
{
new SettingsPageListItem { Name = AppResources.Options },
@@ -408,6 +414,15 @@ namespace Bit.App.Pages
});
}
private bool IncludeLinksWithSubscriptionInfo()
{
if (Device.RuntimePlatform == Device.iOS)
{
return false;
}
return true;
}
private string GetVaultTimeoutActionFromKey(string key)
{
return _vaultTimeoutActions.FirstOrDefault(o => o.Key == key).Value;

View File

@@ -43,8 +43,8 @@ namespace Bit.Core.Models.Data
public bool UsePolicies { get; set; }
public bool SelfHost { get; set; }
public bool UsersGetPremium { get; set; }
public int Seats { get; set; }
public int MaxCollections { get; set; }
public int? Seats { get; set; }
public short? MaxCollections { get; set; }
public short? MaxStorageGb { get; set; }
public Permissions Permissions { get; set; } = new Permissions();
}

View File

@@ -43,8 +43,8 @@ namespace Bit.Core.Models.Domain
public bool UsePolicies { get; set; }
public bool SelfHost { get; set; }
public bool UsersGetPremium { get; set; }
public int Seats { get; set; }
public int MaxCollections { get; set; }
public int? Seats { get; set; }
public short? MaxCollections { get; set; }
public short? MaxStorageGb { get; set; }
public Permissions Permissions { get; set; } = new Permissions();

View File

@@ -16,8 +16,8 @@ namespace Bit.Core.Models.Response
public bool UsePolicies { get; set; }
public bool UsersGetPremium { get; set; }
public bool SelfHost { get; set; }
public int Seats { get; set; }
public int MaxCollections { get; set; }
public int? Seats { get; set; }
public short? MaxCollections { get; set; }
public short? MaxStorageGb { get; set; }
public string Key { get; set; }
public OrganizationUserStatusType Status { get; set; }

View File

@@ -11,7 +11,7 @@
<key>CFBundleIdentifier</key>
<string>com.8bit.bitwarden.autofill</string>
<key>CFBundleShortVersionString</key>
<string>2.11.0</string>
<string>2.11.2</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundleLocalizations</key>

View File

@@ -253,7 +253,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AppCenter.Crashes">
<Version>4.2.0</Version>
<Version>4.3.0</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>

View File

@@ -11,7 +11,7 @@
<key>CFBundleIdentifier</key>
<string>com.8bit.bitwarden.find-login-action-extension</string>
<key>CFBundleShortVersionString</key>
<string>2.11.0</string>
<string>2.11.2</string>
<key>CFBundleLocalizations</key>
<array>
<string>en</string>

View File

@@ -231,7 +231,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AppCenter.Crashes">
<Version>4.2.0</Version>
<Version>4.3.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.AppExtension.CSharp.targets" />

View File

@@ -11,7 +11,7 @@
<key>CFBundleIdentifier</key>
<string>com.8bit.bitwarden</string>
<key>CFBundleShortVersionString</key>
<string>2.11.0</string>
<string>2.11.2</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>CFBundleIconName</key>

View File

@@ -163,7 +163,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Essentials">
<Version>1.6.1</Version>
<Version>1.7.0</Version>
</PackageReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />

View File

@@ -8,7 +8,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Google.Apis.AndroidPublisher.v3" Version="1.51.0.2310" />
<PackageReference Include="Google.Apis.AndroidPublisher.v3" Version="1.52.0.2350" />
</ItemGroup>
</Project>

View File

@@ -15,7 +15,7 @@
</PackageReference>
<PackageReference Include="AutoFixture.Xunit2" Version="4.17.0" />
<PackageReference Include="AutoFixture.AutoNSubstitute" Version="4.17.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
</ItemGroup>
</Project>

View File

@@ -7,7 +7,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.4" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3">