1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-27 12:26:31 +01:00

Autofill service alert when adding new login for the first time and autofill isnt turned on. Added fi language to project.

This commit is contained in:
Kyle Spearrin 2017-02-09 21:43:03 -05:00
parent ab629c2048
commit c29d902b8e
5 changed files with 34 additions and 2 deletions

View File

@ -173,6 +173,11 @@
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>AppResources.es.resx</DependentUpon> <DependentUpon>AppResources.es.resx</DependentUpon>
</Compile> </Compile>
<Compile Include="Resources\AppResources.fi.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>AppResources.fi.resx</DependentUpon>
</Compile>
<Compile Include="Resources\AppResources.fr.Designer.cs"> <Compile Include="Resources\AppResources.fr.Designer.cs">
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
@ -226,6 +231,10 @@
<Generator>PublicResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.es.Designer.cs</LastGenOutput> <LastGenOutput>AppResources.es.Designer.cs</LastGenOutput>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="Resources\AppResources.fi.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.fi.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Include="Resources\AppResources.fr.resx"> <EmbeddedResource Include="Resources\AppResources.fr.resx">
<Generator>ResXFileCodeGenerator</Generator> <Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.fr.Designer.cs</LastGenOutput> <LastGenOutput>AppResources.fr.Designer.cs</LastGenOutput>

View File

@ -23,6 +23,7 @@ namespace Bit.App.Pages
private readonly IConnectivity _connectivity; private readonly IConnectivity _connectivity;
private readonly IGoogleAnalyticsService _googleAnalyticsService; private readonly IGoogleAnalyticsService _googleAnalyticsService;
private readonly ISettings _settings; private readonly ISettings _settings;
private readonly IAppInfoService _appInfoService;
private readonly string _defaultUri; private readonly string _defaultUri;
private readonly string _defaultName; private readonly string _defaultName;
private readonly bool _fromAutofill; private readonly bool _fromAutofill;
@ -39,6 +40,7 @@ namespace Bit.App.Pages
_connectivity = Resolver.Resolve<IConnectivity>(); _connectivity = Resolver.Resolve<IConnectivity>();
_googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>(); _googleAnalyticsService = Resolver.Resolve<IGoogleAnalyticsService>();
_settings = Resolver.Resolve<ISettings>(); _settings = Resolver.Resolve<ISettings>();
_appInfoService = Resolver.Resolve<IAppInfoService>();
Init(); Init();
} }
@ -201,10 +203,19 @@ namespace Bit.App.Pages
AlertNoConnection(); AlertNoConnection();
} }
if(Device.OS == TargetPlatform.iOS && !_settings.GetValueOrDefault(AddedLoginAlertKey, false)) if(!_fromAutofill && !_settings.GetValueOrDefault(AddedLoginAlertKey, false))
{ {
_settings.AddOrUpdateValue(AddedLoginAlertKey, true); _settings.AddOrUpdateValue(AddedLoginAlertKey, true);
DisplayAlert(AppResources.BitwardenAppExtension, AppResources.BitwardenAppExtensionAlert, AppResources.Ok); if(Device.OS == TargetPlatform.iOS)
{
DisplayAlert(AppResources.BitwardenAppExtension, AppResources.BitwardenAppExtensionAlert,
AppResources.Ok);
}
else if(Device.OS == TargetPlatform.Android && !_appInfoService.AutofillServiceEnabled)
{
DisplayAlert(AppResources.BitwardenAutofillService, AppResources.BitwardenAutofillServiceAlert,
AppResources.Ok);
}
} }
} }

View File

@ -232,6 +232,15 @@ namespace Bit.App.Resources {
} }
} }
/// <summary>
/// Looks up a localized string similar to The easiest way to add new logins to your vault is from the bitwarden Auto-fill Service. Learn more about using the bitwarden Auto-fill Service by navigating to the &quot;Tools&quot; screen..
/// </summary>
public static string BitwardenAutofillServiceAlert {
get {
return ResourceManager.GetString("BitwardenAutofillServiceAlert", resourceCulture);
}
}
/// <summary> /// <summary>
/// Looks up a localized string similar to Use the bitwarden accessibility service to auto-fill your logins.. /// Looks up a localized string similar to Use the bitwarden accessibility service to auto-fill your logins..
/// </summary> /// </summary>

View File

View File

@ -792,4 +792,7 @@
<data name="Beta" xml:space="preserve"> <data name="Beta" xml:space="preserve">
<value>Beta</value> <value>Beta</value>
</data> </data>
<data name="BitwardenAutofillServiceAlert" xml:space="preserve">
<value>The easiest way to add new logins to your vault is from the bitwarden Auto-fill Service. Learn more about using the bitwarden Auto-fill Service by navigating to the "Tools" screen.</value>
</data>
</root> </root>