diff --git a/.github/renovate.json b/.github/renovate.json index 6c498a64b..52e80afcf 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,22 +1,37 @@ { - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base", - "schedule:monthly", - ":maintainLockFilesMonthly", - ":preserveSemverRanges", - ":rebaseStalePrs", - ":disableDependencyDashboard" - ], - "enabledManagers": [ - "nuget" - ], - "packageRules": [ - { - "matchManagers": ["nuget"], - "groupName": "Nuget updates", - "groupSlug": "nuget", - "separateMajorMinor": false - } - ] - } \ No newline at end of file + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:base", + ":combinePatchMinorReleases", + ":dependencyDashboard", + ":maintainLockFilesWeekly", + ":pinAllExceptPeerDependencies", + ":prConcurrentLimit10", + ":rebaseStalePrs", + "schedule:weekends", + ":separateMajorReleases" + ], + "enabledManagers": ["cargo", "github-actions", "npm", "nuget"], + "packageRules": [ + { + "groupName": "cargo minor", + "matchManagers": ["cargo"], + "matchUpdateTypes": ["minor", "patch"] + }, + { + "groupName": "gh minor", + "matchManagers": ["github-actions"], + "matchUpdateTypes": ["minor", "patch"] + }, + { + "groupName": "npm minor", + "matchManagers": ["npm"], + "matchUpdateTypes": ["minor", "patch"] + }, + { + "groupName": "nuget minor", + "matchManagers": ["nuget"], + "matchUpdateTypes": ["minor", "patch"] + }, + ] +} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 452fe72b8..57812aa82 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -793,7 +793,7 @@ jobs: done - name: Upload Sources - uses: crowdin/github-action@ecd7eb0ef6f3cfa16293c79e9cbc4bc5b5fd9c49 # v1.4.9 + uses: crowdin/github-action@965d501f160af7b1f88aed4c29154b0caf1e94b9 # v1.9.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }} diff --git a/.github/workflows/crowdin-pull.yml b/.github/workflows/crowdin-pull.yml index 36aaaa9ab..a2a297a19 100644 --- a/.github/workflows/crowdin-pull.yml +++ b/.github/workflows/crowdin-pull.yml @@ -30,7 +30,7 @@ jobs: secrets: "crowdin-api-token, github-gpg-private-key, github-gpg-private-key-passphrase" - name: Download translations - uses: crowdin/github-action@ecd7eb0ef6f3cfa16293c79e9cbc4bc5b5fd9c49 # v1.4.9 + uses: crowdin/github-action@965d501f160af7b1f88aed4c29154b0caf1e94b9 # v1.9.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }} diff --git a/.github/workflows/enforce-labels.yml b/.github/workflows/enforce-labels.yml index 417e34e9b..4e3127761 100644 --- a/.github/workflows/enforce-labels.yml +++ b/.github/workflows/enforce-labels.yml @@ -10,7 +10,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Enforce Label - uses: yogevbd/enforce-label-action@a3c219da6b8fa73f6ba62b68ff09c469b3a1c024 # v2.2.2 + uses: yogevbd/enforce-label-action@a3c219da6b8fa73f6ba62b68ff09c469b3a1c024 # 2.2.2 with: BANNED_LABELS: "hold,needs-qa" BANNED_LABELS_DESCRIPTION: "PRs with the hold or needs-qa labels cannot be merged" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f1e57bbe9..50f4128e9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -68,7 +68,7 @@ jobs: - name: Download all artifacts if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: dawidd6/action-download-artifact@575b1e4167df67acf7e692af784566618b23c71e # v2.17.10 + uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 with: workflow: build.yml workflow_conclusion: success @@ -76,7 +76,7 @@ jobs: - name: Dry Run - Download all artifacts if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: dawidd6/action-download-artifact@575b1e4167df67acf7e692af784566618b23c71e # v2.17.10 + uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 with: workflow: build.yml workflow_conclusion: success @@ -130,7 +130,7 @@ jobs: - name: Download F-Droid .apk artifact if: ${{ github.event.inputs.release_type != 'Dry Run' }} - uses: dawidd6/action-download-artifact@575b1e4167df67acf7e692af784566618b23c71e # v2.17.10 + uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 with: workflow: build.yml workflow_conclusion: success @@ -139,7 +139,7 @@ jobs: - name: Dry Run - Download F-Droid .apk artifact if: ${{ github.event.inputs.release_type == 'Dry Run' }} - uses: dawidd6/action-download-artifact@575b1e4167df67acf7e692af784566618b23c71e # v2.17.10 + uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615 # v2.27.0 with: workflow: build.yml workflow_conclusion: success diff --git a/src/Android/Autofill/FieldCollection.cs b/src/Android/Autofill/FieldCollection.cs index a01aaad70..63d2e512b 100644 --- a/src/Android/Autofill/FieldCollection.cs +++ b/src/Android/Autofill/FieldCollection.cs @@ -12,7 +12,7 @@ namespace Bit.Droid.Autofill private List _passwordFields = null; private List _usernameFields = null; private HashSet _ignoreSearchTerms = new HashSet { "search", "find", "recipient", "edit" }; - private HashSet _usernameTerms = new HashSet { "email", "phone", "username"}; + private HashSet _usernameTerms = new HashSet { "email", "phone", "username" }; private HashSet _passwordTerms = new HashSet { "password", "pswd" }; public List AutofillIds { get; private set; } = new List(); @@ -54,15 +54,14 @@ namespace Bit.Droid.Autofill if (HintToFieldsMap.ContainsKey(View.AutofillHintPassword)) { _passwordFields.AddRange(HintToFieldsMap[View.AutofillHintPassword]); + return _passwordFields; } } - else + + _passwordFields = Fields.Where(f => FieldIsPassword(f)).ToList(); + if (!_passwordFields.Any()) { - _passwordFields = Fields.Where(f => FieldIsPassword(f)).ToList(); - if (!_passwordFields.Any()) - { - _passwordFields = Fields.Where(f => FieldHasPasswordTerms(f)).ToList(); - } + _passwordFields = Fields.Where(f => FieldHasPasswordTerms(f)).ToList(); } return _passwordFields; } @@ -87,24 +86,26 @@ namespace Bit.Droid.Autofill { _usernameFields.AddRange(HintToFieldsMap[View.AutofillHintUsername]); } + if (_usernameFields.Any()) + { + return _usernameFields; + } } - else - { - foreach (var passwordField in PasswordFields) - { - var usernameField = Fields.TakeWhile(f => f.AutofillId != passwordField.AutofillId) - .LastOrDefault(); - if (usernameField != null) - { - _usernameFields.Add(usernameField); - } - } - if (!_usernameFields.Any()) + foreach (var passwordField in PasswordFields) + { + var usernameField = Fields.TakeWhile(f => f.AutofillId != passwordField.AutofillId) + .LastOrDefault(); + if (usernameField != null) { - _usernameFields = Fields.Where(f => FieldIsUsername(f)).ToList(); + _usernameFields.Add(usernameField); } } + + if (!_usernameFields.Any()) + { + _usernameFields = Fields.Where(f => FieldIsUsername(f)).ToList(); + } return _usernameFields; } } diff --git a/src/Android/MainActivity.cs b/src/Android/MainActivity.cs index f4fc640d0..566ff378f 100644 --- a/src/Android/MainActivity.cs +++ b/src/Android/MainActivity.cs @@ -44,6 +44,7 @@ namespace Bit.Droid private IAppIdService _appIdService; private IEventService _eventService; private IPushNotificationListenerService _pushNotificationListenerService; + private IVaultTimeoutService _vaultTimeoutService; private ILogger _logger; private PendingIntent _eventUploadPendingIntent; private AppOptions _appOptions; @@ -68,6 +69,7 @@ namespace Bit.Droid _appIdService = ServiceContainer.Resolve("appIdService"); _eventService = ServiceContainer.Resolve("eventService"); _pushNotificationListenerService = ServiceContainer.Resolve(); + _vaultTimeoutService = ServiceContainer.Resolve(); _logger = ServiceContainer.Resolve("logger"); TabLayoutResource = Resource.Layout.Tabbar; @@ -232,6 +234,7 @@ 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)) { diff --git a/src/Android/Properties/AndroidManifest.xml b/src/Android/Properties/AndroidManifest.xml index 5e0839872..77372ff73 100644 --- a/src/Android/Properties/AndroidManifest.xml +++ b/src/Android/Properties/AndroidManifest.xml @@ -1,5 +1,5 @@  - + diff --git a/src/App/App.xaml.cs b/src/App/App.xaml.cs index 059159eb7..a3deede96 100644 --- a/src/App/App.xaml.cs +++ b/src/App/App.xaml.cs @@ -38,6 +38,7 @@ namespace Bit.App private readonly IFileService _fileService; private readonly IAccountsManager _accountsManager; private readonly IPushNotificationService _pushNotificationService; + private readonly IConfigService _configService; private static bool _isResumed; // these variables are static because the app is launching new activities on notification click, creating new instances of App. private static bool _pendingCheckPasswordlessLoginRequests; @@ -61,6 +62,7 @@ namespace Bit.App _fileService = ServiceContainer.Resolve(); _accountsManager = ServiceContainer.Resolve("accountsManager"); _pushNotificationService = ServiceContainer.Resolve(); + _configService = ServiceContainer.Resolve(); _accountsManager.Init(() => Options, this); @@ -169,6 +171,10 @@ namespace Bit.App new NavigationPage(new UpdateTempPasswordPage())); }); } + else if (message.Command == "syncCompleted") + { + await _configService.GetAsync(true); + } else if (message.Command == Constants.PasswordlessLoginRequestKey || message.Command == "unlocked" || message.Command == AccountsManagerMessageCommands.ACCOUNT_SWITCH_COMPLETED) @@ -291,8 +297,10 @@ namespace Bit.App { await _vaultTimeoutService.CheckVaultTimeoutAsync(); // Reset delay on every start - _vaultTimeoutService.DelayLockAndLogoutMs = null; + _vaultTimeoutService.DelayTimeoutMs = null; } + + await _configService.GetAsync(); _messagingService.Send("startEventTimer"); } diff --git a/src/App/Controls/AccountSwitchingOverlay/AccountSwitchingOverlayView.xaml b/src/App/Controls/AccountSwitchingOverlay/AccountSwitchingOverlayView.xaml index f0c52d0d4..4dba94dd1 100644 --- a/src/App/Controls/AccountSwitchingOverlay/AccountSwitchingOverlayView.xaml +++ b/src/App/Controls/AccountSwitchingOverlay/AccountSwitchingOverlayView.xaml @@ -30,13 +30,15 @@ BackgroundColor="{DynamicResource BackgroundColor}" VerticalOptions="Start" RowHeight="{Binding AccountListRowHeight, Source={x:Reference _mainOverlay}}" - effects:ScrollViewContentInsetAdjustmentBehaviorEffect.ContentInsetAdjustmentBehavior="Never"> + effects:ScrollViewContentInsetAdjustmentBehaviorEffect.ContentInsetAdjustmentBehavior="Never" + AutomationId="AccountListView"> diff --git a/src/App/Controls/AccountViewCell/AccountViewCell.xaml b/src/App/Controls/AccountViewCell/AccountViewCell.xaml index 3d45cf929..9a9f53831 100644 --- a/src/App/Controls/AccountViewCell/AccountViewCell.xaml +++ b/src/App/Controls/AccountViewCell/AccountViewCell.xaml @@ -1,4 +1,4 @@ - + + LineBreakMode="TailTruncation" + AutomationId="AccountEmailLabel" /> \ No newline at end of file diff --git a/src/App/Controls/CipherViewCell/CipherViewCell.xaml b/src/App/Controls/CipherViewCell/CipherViewCell.xaml index 5024ad537..e2ecba08e 100644 --- a/src/App/Controls/CipherViewCell/CipherViewCell.xaml +++ b/src/App/Controls/CipherViewCell/CipherViewCell.xaml @@ -9,7 +9,8 @@ StyleClass="list-row, list-row-platform" RowSpacing="0" ColumnSpacing="0" - x:DataType="controls:CipherViewCellViewModel"> + x:DataType="controls:CipherViewCellViewModel" + AutomationId="CipherCell"> @@ -36,7 +37,8 @@ IsVisible="{Binding ShowIconImage, Converter={StaticResource inverseBool}}" Text="{Binding Cipher, Converter={StaticResource iconGlyphConverter}}" ShouldUpdateFontSizeDynamicallyForAccesibility="True" - AutomationProperties.IsInAccessibleTree="False" /> + AutomationProperties.IsInAccessibleTree="False" + AutomationId="CipherTypeIcon" /> + AutomationProperties.IsInAccessibleTree="False" + AutomationId="CipherWebsiteIcon" /> @@ -71,7 +74,8 @@ Grid.Column="0" Grid.Row="0" StyleClass="list-title, list-title-platform" - Text="{Binding Cipher.Name}" /> + Text="{Binding Cipher.Name}" + AutomationId="CipherNameLabel" /> + AutomationProperties.Name="{u:I18n Options}" + AutomationId="CipherOptionsButton" /> \ No newline at end of file diff --git a/src/App/Controls/SendViewCell/SendViewCell.xaml b/src/App/Controls/SendViewCell/SendViewCell.xaml index 8a9d0e2a6..30d7b8ca3 100644 --- a/src/App/Controls/SendViewCell/SendViewCell.xaml +++ b/src/App/Controls/SendViewCell/SendViewCell.xaml @@ -1,4 +1,4 @@ - + + Text="{Binding Send.Name}" + AutomationId="SendNameLabel" /> diff --git a/src/App/Lists/ItemLayouts/CustomFields/BooleanCustomFieldItemLayout.xaml b/src/App/Lists/ItemLayouts/CustomFields/BooleanCustomFieldItemLayout.xaml index c50cf53eb..6c7d22ed7 100644 --- a/src/App/Lists/ItemLayouts/CustomFields/BooleanCustomFieldItemLayout.xaml +++ b/src/App/Lists/ItemLayouts/CustomFields/BooleanCustomFieldItemLayout.xaml @@ -33,7 +33,8 @@ StyleClass="box-label" Grid.Row="0" Grid.Column="0" - IsVisible="{Binding IsEditing, Mode=OneWay, Converter={StaticResource inverseBool}}" /> + IsVisible="{Binding IsEditing, Mode=OneWay, Converter={StaticResource inverseBool}}" + AutomationId="BooleanCustomFieldNameLabel" />