1
0
mirror of https://github.com/bitwarden/mobile synced 2025-12-05 23:53:33 +00:00

Merge branch 'feature/pm-1208-f3-options' into feature/pm-2293-admin-approval

This commit is contained in:
André Bispo
2023-07-10 12:37:31 +01:00
10 changed files with 19 additions and 29 deletions

View File

@@ -44,7 +44,6 @@ namespace Bit.Droid
private IAppIdService _appIdService;
private IEventService _eventService;
private IPushNotificationListenerService _pushNotificationListenerService;
private IVaultTimeoutService _vaultTimeoutService;
private ILogger _logger;
private PendingIntent _eventUploadPendingIntent;
private AppOptions _appOptions;
@@ -69,7 +68,6 @@ namespace Bit.Droid
_appIdService = ServiceContainer.Resolve<IAppIdService>("appIdService");
_eventService = ServiceContainer.Resolve<IEventService>("eventService");
_pushNotificationListenerService = ServiceContainer.Resolve<IPushNotificationListenerService>();
_vaultTimeoutService = ServiceContainer.Resolve<IVaultTimeoutService>();
_logger = ServiceContainer.Resolve<ILogger>("logger");
TabLayoutResource = Resource.Layout.Tabbar;
@@ -234,7 +232,6 @@ namespace Bit.Droid
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
_vaultTimeoutService.ResetTimeoutDelay = true;
if (resultCode == Result.Ok &&
(requestCode == Core.Constants.SelectFileRequestCode || requestCode == Core.Constants.SaveFileRequestCode))
{

View File

@@ -297,7 +297,7 @@ namespace Bit.App
{
await _vaultTimeoutService.CheckVaultTimeoutAsync();
// Reset delay on every start
_vaultTimeoutService.DelayTimeoutMs = null;
_vaultTimeoutService.DelayLockAndLogoutMs = null;
}
await _configService.GetAsync();

View File

@@ -156,7 +156,7 @@ namespace Bit.App.Pages
// Prevent Android from locking if vault timeout set to "immediate"
if (Device.RuntimePlatform == Device.Android)
{
_vaultTimeoutService.DelayTimeoutMs = 60000;
_vaultTimeoutService.DelayLockAndLogoutMs = 60000;
}
await _fileService.SelectFileAsync();
}

View File

@@ -2638,9 +2638,9 @@
<value>باز کردن قفل ممکن است به دلیل حافظه ناکافی انجام شود. تنظیمات حافظه KDF خود را کاهش دهید تا حل شود.</value>
</data>
<data name="InvalidAPIKey" xml:space="preserve">
<value>Invalid API key</value>
<value>کلید API نامعتبر</value>
</data>
<data name="InvalidAPIToken" xml:space="preserve">
<value>Invalid API token</value>
<value>کلید توکن API نامعتبر</value>
</data>
</root>

View File

@@ -1098,7 +1098,7 @@ A leitura será efetuada automaticamente.</value>
<value>Sr.</value>
</data>
<data name="Mrs" xml:space="preserve">
<value>Sra.</value>
<value>Sr.ª</value>
</data>
<data name="Ms" xml:space="preserve">
<value>Menina</value>
@@ -1579,7 +1579,7 @@ A leitura será efetuada automaticamente.</value>
<comment>'Nord' is the name of a specific color scheme. It should not be translated.</comment>
</data>
<data name="SolarizedDark" xml:space="preserve">
<value>Solarized Dark</value>
<value>Solarized (escuro)</value>
<comment>'Solarized Dark' is the name of a specific color scheme. It should not be translated.</comment>
</data>
<data name="AutofillBlockedUris" xml:space="preserve">
@@ -2233,10 +2233,10 @@ A leitura será efetuada automaticamente.</value>
<value>Ajude o Bitwarden a melhorar a estabilidade da aplicação ao enviar relatórios de falhas.</value>
</data>
<data name="OptionsExpanded" xml:space="preserve">
<value>Options are expanded, tap to collapse.</value>
<value>As opções foram expandidas, clique para fechar.</value>
</data>
<data name="OptionsCollapsed" xml:space="preserve">
<value>Options are collapsed, tap to expand.</value>
<value>As opções foram fechadas, clique para expandir.</value>
</data>
<data name="UppercaseAtoZ" xml:space="preserve">
<value>Maiúsculas (A-Z)</value>
@@ -2392,10 +2392,10 @@ A leitura será efetuada automaticamente.</value>
<value>Tipo de nome de utilizador</value>
</data>
<data name="PlusAddressedEmail" xml:space="preserve">
<value>Plus addressed email</value>
<value>E-mail com subendereço</value>
</data>
<data name="CatchAllEmail" xml:space="preserve">
<value>Catch-all email</value>
<value>E-mail de captura geral</value>
</data>
<data name="ForwardedEmailAlias" xml:space="preserve">
<value>Alias de e-mail reencaminhado</value>
@@ -2454,10 +2454,10 @@ A leitura será efetuada automaticamente.</value>
<value>Ocorreu um erro desconhecido ({0}).</value>
</data>
<data name="PlusAddressedEmailDescription" xml:space="preserve">
<value>Use your email provider's subaddress capabilities</value>
<value>Utilize as capacidades de subendereçamento do seu fornecedor de e-mail.</value>
</data>
<data name="CatchAllEmailDescription" xml:space="preserve">
<value>Use your domain's configured catch-all inbox.</value>
<value>Utilize a caixa de entrada de captura geral configurada para o seu domínio.</value>
</data>
<data name="ForwardedEmailDescription" xml:space="preserve">
<value>Gerar um alias de e-mail com um serviço de reencaminhamento externo.</value>

View File

@@ -375,7 +375,7 @@
<comment>Validation message for when a form field is left blank and is required to be entered.</comment>
</data>
<data name="ValueHasBeenCopied" xml:space="preserve">
<value>{0} je bilo kopirano.</value>
<value>{0} kopirana</value>
<comment>Confirmation message after successfully copying a value to the clipboard.</comment>
</data>
<data name="VerifyFingerprint" xml:space="preserve">

View File

@@ -6,8 +6,7 @@ namespace Bit.Core.Abstractions
{
public interface IVaultTimeoutService
{
long? DelayTimeoutMs { get; set; }
bool ResetTimeoutDelay { get; set; }
long? DelayLockAndLogoutMs { get; set; }
Task CheckVaultTimeoutAsync();
Task<bool> ShouldTimeoutAsync(string userId = null);

View File

@@ -50,8 +50,7 @@ namespace Bit.Core.Services
_loggedOutCallback = loggedOutCallback;
}
public long? DelayTimeoutMs { get; set; }
public bool ResetTimeoutDelay { get; set; }
public long? DelayLockAndLogoutMs { get; set; }
public async Task<bool> IsLockedAsync(string userId = null)
{
@@ -118,7 +117,7 @@ namespace Bit.Core.Services
{
return false;
}
if (vaultTimeoutMinutes == 0 && !DelayTimeoutMs.HasValue)
if (vaultTimeoutMinutes == 0 && !DelayLockAndLogoutMs.HasValue)
{
return true;
}
@@ -128,13 +127,8 @@ namespace Bit.Core.Services
return false;
}
var diffMs = _platformUtilsService.GetActiveTime() - lastActiveTime;
if (DelayTimeoutMs.HasValue && diffMs < DelayTimeoutMs)
if (DelayLockAndLogoutMs.HasValue && diffMs < DelayLockAndLogoutMs)
{
if (ResetTimeoutDelay)
{
DelayTimeoutMs = null;
ResetTimeoutDelay = false;
}
return false;
}
var vaultTimeoutMs = vaultTimeoutMinutes * 60000;

View File

@@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Name" xml:space="preserve">
<value>Bitwarden - gestor de palavras-passe</value>
<value>Bitwarden - Gestor de Palavras-passe</value>
<comment>Max 30 characters</comment>
</data>
<data name="Description" xml:space="preserve">

View File

@@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="Title" xml:space="preserve">
<value>Bitwarden - gestor de palavras-passe</value>
<value>Bitwarden - Gestor de Palavras-passe</value>
<comment>Max 30 characters</comment>
</data>
<data name="ShortDescription" xml:space="preserve">