mirror of
https://github.com/bitwarden/mobile
synced 2025-12-15 15:53:44 +00:00
Compare commits
8 Commits
vault/pm-9
...
v2024.6.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5ba577fecc | ||
|
|
6d875920d0 | ||
|
|
81205154c4 | ||
|
|
14d2660b61 | ||
|
|
bad5673724 | ||
|
|
67b76a777e | ||
|
|
02f5936fce | ||
|
|
fc208b08d7 |
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@@ -733,7 +733,7 @@ jobs:
|
|||||||
secrets: "crowdin-api-token"
|
secrets: "crowdin-api-token"
|
||||||
|
|
||||||
- name: Upload Sources
|
- name: Upload Sources
|
||||||
uses: crowdin/github-action@30849777a3cba6ee9a09e24e195272b8287a0a5b # v1.20.4
|
uses: crowdin/github-action@61ac8b980551f674046220c3e104bddae2916ac5 # v2.0.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
|
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
|
||||||
|
|||||||
2
.github/workflows/crowdin-pull.yml
vendored
2
.github/workflows/crowdin-pull.yml
vendored
@@ -30,7 +30,7 @@ jobs:
|
|||||||
secrets: "crowdin-api-token, github-gpg-private-key, github-gpg-private-key-passphrase"
|
secrets: "crowdin-api-token, github-gpg-private-key, github-gpg-private-key-passphrase"
|
||||||
|
|
||||||
- name: Download translations
|
- name: Download translations
|
||||||
uses: crowdin/github-action@30849777a3cba6ee9a09e24e195272b8287a0a5b # v1.20.4
|
uses: crowdin/github-action@61ac8b980551f674046220c3e104bddae2916ac5 # v2.0.0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
|
CROWDIN_API_TOKEN: ${{ steps.retrieve-secrets.outputs.crowdin-api-token }}
|
||||||
|
|||||||
19
.github/workflows/release.yml
vendored
19
.github/workflows/release.yml
vendored
@@ -67,22 +67,29 @@ jobs:
|
|||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
if: ${{ inputs.release_type != 'Dry Run' }}
|
if: ${{ inputs.release_type != 'Dry Run' }}
|
||||||
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4
|
uses: bitwarden/gh-actions/download-artifacts@main
|
||||||
with:
|
with:
|
||||||
workflow: build.yml
|
workflow: build.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: ${{ steps.branch.outputs.branch-name }}
|
branch: ${{ steps.branch.outputs.branch-name }}
|
||||||
|
skip_unpack: true
|
||||||
|
|
||||||
- name: Dry Run - Download all artifacts
|
- name: Dry Run - Download all artifacts
|
||||||
if: ${{ inputs.release_type == 'Dry Run' }}
|
if: ${{ inputs.release_type == 'Dry Run' }}
|
||||||
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4
|
uses: bitwarden/gh-actions/download-artifacts@main
|
||||||
with:
|
with:
|
||||||
workflow: build.yml
|
workflow: build.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
branch: main
|
branch: main
|
||||||
|
skip_unpack: true
|
||||||
|
|
||||||
- name: Prep Bitwarden iOS release asset
|
- name: Unzip release assets
|
||||||
run: zip -r Bitwarden\ iOS.zip Bitwarden\ iOS
|
run: |
|
||||||
|
unzip bw-android-apk-sha256.txt.zip -d bw-android-apk-sha256.txt
|
||||||
|
unzip bw-fdroid-apk-sha256.txt.zip -d bw-fdroid-apk-sha256.txt
|
||||||
|
unzip com.x8bit.bitwarden-fdroid.apk.zip -d com.x8bit.bitwarden-fdroid.apk
|
||||||
|
unzip com.x8bit.bitwarden.aab.zip -d com.x8bit.bitwarden.aab
|
||||||
|
unzip com.x8bit.bitwarden.apk.zip -d com.x8bit.bitwarden.apk
|
||||||
|
|
||||||
- name: Create release
|
- name: Create release
|
||||||
if: ${{ inputs.release_type != 'Dry Run' }}
|
if: ${{ inputs.release_type != 'Dry Run' }}
|
||||||
@@ -129,7 +136,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Download F-Droid .apk artifact
|
- name: Download F-Droid .apk artifact
|
||||||
if: ${{ inputs.release_type != 'Dry Run' }}
|
if: ${{ inputs.release_type != 'Dry Run' }}
|
||||||
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4
|
uses: bitwarden/gh-actions/download-artifacts@main
|
||||||
with:
|
with:
|
||||||
workflow: build.yml
|
workflow: build.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
@@ -138,7 +145,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Dry Run - Download F-Droid .apk artifact
|
- name: Dry Run - Download F-Droid .apk artifact
|
||||||
if: ${{ inputs.release_type == 'Dry Run' }}
|
if: ${{ inputs.release_type == 'Dry Run' }}
|
||||||
uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4
|
uses: bitwarden/gh-actions/download-artifacts@main
|
||||||
with:
|
with:
|
||||||
workflow: build.yml
|
workflow: build.yml
|
||||||
workflow_conclusion: success
|
workflow_conclusion: success
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:versionCode="1" android:versionName="2024.5.2" android:installLocation="internalOnly" package="com.x8bit.bitwarden">
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:versionCode="1" android:versionName="2024.6.0" android:installLocation="internalOnly" package="com.x8bit.bitwarden">
|
||||||
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
|
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="34" />
|
||||||
<uses-permission android:name="android.permission.INTERNET" />
|
<uses-permission android:name="android.permission.INTERNET" />
|
||||||
<uses-permission android:name="android.permission.NFC" />
|
<uses-permission android:name="android.permission.NFC" />
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.8bit.bitwarden</string>
|
<string>com.8bit.bitwarden</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2024.5.2</string>
|
<string>2024.6.0</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>CFBundleIconName</key>
|
<key>CFBundleIconName</key>
|
||||||
|
|||||||
@@ -45,7 +45,6 @@ namespace Bit.Core
|
|||||||
public const string PasswordlessLoginRequestKey = "passwordlessLoginRequest";
|
public const string PasswordlessLoginRequestKey = "passwordlessLoginRequest";
|
||||||
public const string PreLoginEmailKey = "preLoginEmailKey";
|
public const string PreLoginEmailKey = "preLoginEmailKey";
|
||||||
public const string ConfigsKey = "configsKey";
|
public const string ConfigsKey = "configsKey";
|
||||||
public const string DisplayEuEnvironmentFlag = "display-eu-environment";
|
|
||||||
public const string UnassignedItemsBannerFlag = "unassigned-items-banner";
|
public const string UnassignedItemsBannerFlag = "unassigned-items-banner";
|
||||||
public const string RegionEnvironment = "regionEnvironment";
|
public const string RegionEnvironment = "regionEnvironment";
|
||||||
public const string DuoCallback = "bitwarden://duo-callback";
|
public const string DuoCallback = "bitwarden://duo-callback";
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ namespace Bit.App.Pages
|
|||||||
private bool _rememberEmail;
|
private bool _rememberEmail;
|
||||||
private string _email;
|
private string _email;
|
||||||
private string _selectedEnvironmentName;
|
private string _selectedEnvironmentName;
|
||||||
private bool _displayEuEnvironment;
|
|
||||||
|
|
||||||
public HomeViewModel()
|
public HomeViewModel()
|
||||||
{
|
{
|
||||||
@@ -116,7 +115,6 @@ namespace Bit.App.Pages
|
|||||||
{
|
{
|
||||||
Email = await _stateService.GetRememberedEmailAsync();
|
Email = await _stateService.GetRememberedEmailAsync();
|
||||||
RememberEmail = !string.IsNullOrEmpty(Email);
|
RememberEmail = !string.IsNullOrEmpty(Email);
|
||||||
_displayEuEnvironment = await _configService.GetFeatureFlagBoolAsync(Constants.DisplayEuEnvironmentFlag, forceRefresh: true);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task ContinueToLoginStepAsync()
|
public async Task ContinueToLoginStepAsync()
|
||||||
@@ -158,11 +156,7 @@ namespace Bit.App.Pages
|
|||||||
|
|
||||||
public async Task ShowEnvironmentPickerAsync()
|
public async Task ShowEnvironmentPickerAsync()
|
||||||
{
|
{
|
||||||
_displayEuEnvironment = await _configService.GetFeatureFlagBoolAsync(Constants.DisplayEuEnvironmentFlag);
|
var options = new string[] { BwRegion.US.Domain(), BwRegion.EU.Domain(), AppResources.SelfHosted };
|
||||||
var options = _displayEuEnvironment
|
|
||||||
? new string[] { BwRegion.US.Domain(), BwRegion.EU.Domain(), AppResources.SelfHosted }
|
|
||||||
: new string[] { BwRegion.US.Domain(), AppResources.SelfHosted };
|
|
||||||
|
|
||||||
await MainThread.InvokeOnMainThreadAsync(async () =>
|
await MainThread.InvokeOnMainThreadAsync(async () =>
|
||||||
{
|
{
|
||||||
var result = await _deviceActionService.Value.DisplayActionSheetAsync(AppResources.LoggingInOn, AppResources.Cancel, null, options);
|
var result = await _deviceActionService.Value.DisplayActionSheetAsync(AppResources.LoggingInOn, AppResources.Cancel, null, options);
|
||||||
|
|||||||
@@ -1662,7 +1662,7 @@ Nolasīšana notiks automātiski.</value>
|
|||||||
<value>Jāapstiprina identitāte, lai turpinātu.</value>
|
<value>Jāapstiprina identitāte, lai turpinātu.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ExportVaultWarning" xml:space="preserve">
|
<data name="ExportVaultWarning" xml:space="preserve">
|
||||||
<value>Šī izguve satur glabātavas datus nešifrētā veidā. Izdoto datni nevajadzētu glabāt vai sūtīt nedrošos veidos (piemēram, e-pastā). Izdzēst to uzreiz pēc izmantošanas.</value>
|
<value>Šī izguve satur glabātavas datus nešifrētā veidā. Izgūto datni nevajadzētu glabāt vai sūtīt nedrošos veidos (piemēram, e-pastā). Tā ir jāizdzēš uzreiz pēc izmantošanas.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EncExportKeyWarning" xml:space="preserve">
|
<data name="EncExportKeyWarning" xml:space="preserve">
|
||||||
<value>Šī izguve šifrē datus ar konta šifrēšanas atslēgu. Ja tā jebkad tiks mainīta, izvadi vajadzētu veikt vēlreiz, jo vairs nebūs iespējams atšifrēt šo datni.</value>
|
<value>Šī izguve šifrē datus ar konta šifrēšanas atslēgu. Ja tā jebkad tiks mainīta, izvadi vajadzētu veikt vēlreiz, jo vairs nebūs iespējams atšifrēt šo datni.</value>
|
||||||
|
|||||||
@@ -2897,19 +2897,19 @@ Vill du byta till detta konto?</value>
|
|||||||
<value>Choose a login to save this passkey to</value>
|
<value>Choose a login to save this passkey to</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SavePasskeyAsNewLogin" xml:space="preserve">
|
<data name="SavePasskeyAsNewLogin" xml:space="preserve">
|
||||||
<value>Save passkey as new login</value>
|
<value>Spara passkey som ny inloggning</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SavePasskey" xml:space="preserve">
|
<data name="SavePasskey" xml:space="preserve">
|
||||||
<value>Save passkey</value>
|
<value>Spara passkey</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PasskeysForX" xml:space="preserve">
|
<data name="PasskeysForX" xml:space="preserve">
|
||||||
<value>Passkeys for {0}</value>
|
<value>Passkeys för {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="PasswordsForX" xml:space="preserve">
|
<data name="PasswordsForX" xml:space="preserve">
|
||||||
<value>Passwords for {0}</value>
|
<value>Lösenord för {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OverwritePasskey" xml:space="preserve">
|
<data name="OverwritePasskey" xml:space="preserve">
|
||||||
<value>Overwrite passkey?</value>
|
<value>Skriv över passkey?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ThisItemAlreadyContainsAPasskeyAreYouSureYouWantToOverwriteTheCurrentPasskey" xml:space="preserve">
|
<data name="ThisItemAlreadyContainsAPasskeyAreYouSureYouWantToOverwriteTheCurrentPasskey" xml:space="preserve">
|
||||||
<value>This item already contains a passkey. Are you sure you want to overwrite the current passkey?</value>
|
<value>This item already contains a passkey. Are you sure you want to overwrite the current passkey?</value>
|
||||||
@@ -2924,16 +2924,16 @@ Vill du byta till detta konto?</value>
|
|||||||
<value>Starta Duo</value>
|
<value>Starta Duo</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="VerificationRequiredByX" xml:space="preserve">
|
<data name="VerificationRequiredByX" xml:space="preserve">
|
||||||
<value>Verification required by {0}</value>
|
<value>Verifiering krävs av {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="VerificationRequiredForThisActionSetUpAnUnlockMethodInBitwardenToContinue" xml:space="preserve">
|
<data name="VerificationRequiredForThisActionSetUpAnUnlockMethodInBitwardenToContinue" xml:space="preserve">
|
||||||
<value>Verification required for this action. Set up an unlock method in Bitwarden to continue.</value>
|
<value>Verification required for this action. Set up an unlock method in Bitwarden to continue.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ErrorCreatingPasskey" xml:space="preserve">
|
<data name="ErrorCreatingPasskey" xml:space="preserve">
|
||||||
<value>Error creating passkey</value>
|
<value>Fel vid skapande av passkey</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ErrorReadingPasskey" xml:space="preserve">
|
<data name="ErrorReadingPasskey" xml:space="preserve">
|
||||||
<value>Error reading passkey</value>
|
<value>Fel vid läsning av passkey</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ThereWasAProblemCreatingAPasskeyForXTryAgainLater" xml:space="preserve">
|
<data name="ThereWasAProblemCreatingAPasskeyForXTryAgainLater" xml:space="preserve">
|
||||||
<value>There was a problem creating a passkey for {0}. Try again later.</value>
|
<value>There was a problem creating a passkey for {0}. Try again later.</value>
|
||||||
@@ -2944,7 +2944,7 @@ Vill du byta till detta konto?</value>
|
|||||||
<comment>The parameter is the RpId</comment>
|
<comment>The parameter is the RpId</comment>
|
||||||
</data>
|
</data>
|
||||||
<data name="VerifyingIdentityEllipsis" xml:space="preserve">
|
<data name="VerifyingIdentityEllipsis" xml:space="preserve">
|
||||||
<value>Verifying identity...</value>
|
<value>Verifierar identitet...</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Passwords" xml:space="preserve">
|
<data name="Passwords" xml:space="preserve">
|
||||||
<value>Lösenord</value>
|
<value>Lösenord</value>
|
||||||
@@ -2965,22 +2965,22 @@ Vill du byta till detta konto?</value>
|
|||||||
<value>1. Gå till din enhets Inställningar > Lösenord > Lösenordsalternativ</value>
|
<value>1. Gå till din enhets Inställningar > Lösenord > Lösenordsalternativ</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SecondDotTurnOnAutoFill" xml:space="preserve">
|
<data name="SecondDotTurnOnAutoFill" xml:space="preserve">
|
||||||
<value>2. Turn on AutoFill</value>
|
<value>2. Slå på AutoFyll</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="ThirdDotSelectBitwardenToUseForPasswordsAndPasskeys" xml:space="preserve">
|
<data name="ThirdDotSelectBitwardenToUseForPasswordsAndPasskeys" xml:space="preserve">
|
||||||
<value>3. Select "Bitwarden" to use for passwords and passkeys</value>
|
<value>3. Välj att använda "Bitwarden" för lösenord och passkeys</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="YourPasskeyWillBeSavedToYourBitwardenVault" xml:space="preserve">
|
<data name="YourPasskeyWillBeSavedToYourBitwardenVault" xml:space="preserve">
|
||||||
<value>Your passkey will be saved to your Bitwarden vault</value>
|
<value>Your passkey will be saved to your Bitwarden vault</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="YourPasskeyWillBeSavedToYourBitwardenVaultForX" xml:space="preserve">
|
<data name="YourPasskeyWillBeSavedToYourBitwardenVaultForX" xml:space="preserve">
|
||||||
<value>Your passkey will be saved to your Bitwarden vault for {0}</value>
|
<value>Din passkey kommer att sparas i ditt Bitwarden-valv för {0}</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OrganizationUnassignedItemsMessageUSEUDescriptionLong" xml:space="preserve">
|
<data name="OrganizationUnassignedItemsMessageUSEUDescriptionLong" xml:space="preserve">
|
||||||
<value>Unassigned organization items are no longer visible in the All Vaults view and only accessible via the Admin Console. Assign these items to a collection from the Admin Console to make them visible.</value>
|
<value>Unassigned organization items are no longer visible in the All Vaults view and only accessible via the Admin Console. Assign these items to a collection from the Admin Console to make them visible.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="OrganizationUnassignedItemsMessageSelfHost041624DescriptionLong" xml:space="preserve">
|
<data name="OrganizationUnassignedItemsMessageSelfHost041624DescriptionLong" xml:space="preserve">
|
||||||
<value>On May 16, 2024, unassigned organization items will no longer be visible in the All Vaults view and only accessible via the Admin Console. Assign these items to a collection from the Admin Console to make them visible.</value>
|
<value>Den 16 maj 2024 kommer otilldelade organisationsobjekt inte längre att synas i alla valvs-vyn och endast nås via administratörskonsollen. Tilldela dessa objekt till en samling från administratörskonsollen för att göra dem synliga.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RemindMeLater" xml:space="preserve">
|
<data name="RemindMeLater" xml:space="preserve">
|
||||||
<value>Påminn mig senare</value>
|
<value>Påminn mig senare</value>
|
||||||
|
|||||||
@@ -2500,7 +2500,7 @@
|
|||||||
<value>在 {1} 上以 {0} 身份登录</value>
|
<value>在 {1} 上以 {0} 身份登录</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="NotYou" xml:space="preserve">
|
<data name="NotYou" xml:space="preserve">
|
||||||
<value>不是你?</value>
|
<value>不是您吗?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LogInWithMasterPassword" xml:space="preserve">
|
<data name="LogInWithMasterPassword" xml:space="preserve">
|
||||||
<value>使用主密码登录</value>
|
<value>使用主密码登录</value>
|
||||||
|
|||||||
@@ -152,17 +152,17 @@ namespace Bit.iOS.Autofill
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//public override async void ProvideCredentialWithoutUserInteraction(ASPasswordCredentialIdentity credentialIdentity)
|
public override async void ProvideCredentialWithoutUserInteraction(ASPasswordCredentialIdentity credentialIdentity)
|
||||||
//{
|
{
|
||||||
// try
|
try
|
||||||
// {
|
{
|
||||||
// await ProvideCredentialWithoutUserInteractionAsync(credentialIdentity);
|
await ProvideCredentialWithoutUserInteractionAsync(credentialIdentity);
|
||||||
// }
|
}
|
||||||
// catch (Exception ex)
|
catch (Exception ex)
|
||||||
// {
|
{
|
||||||
// OnProvidingCredentialException(ex);
|
OnProvidingCredentialException(ex);
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
[Export("prepareInterfaceToProvideCredentialForRequest:")]
|
[Export("prepareInterfaceToProvideCredentialForRequest:")]
|
||||||
public override async void PrepareInterfaceToProvideCredential(IASCredentialRequest credentialRequest)
|
public override async void PrepareInterfaceToProvideCredential(IASCredentialRequest credentialRequest)
|
||||||
@@ -197,17 +197,17 @@ namespace Bit.iOS.Autofill
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//public override async void PrepareInterfaceToProvideCredential(ASPasswordCredentialIdentity credentialIdentity)
|
public override async void PrepareInterfaceToProvideCredential(ASPasswordCredentialIdentity credentialIdentity)
|
||||||
//{
|
{
|
||||||
// try
|
try
|
||||||
// {
|
{
|
||||||
// await PrepareInterfaceToProvideCredentialAsync(c => c.PasswordCredentialIdentity = credentialIdentity);
|
await PrepareInterfaceToProvideCredentialAsync(c => c.PasswordCredentialIdentity = credentialIdentity);
|
||||||
// }
|
}
|
||||||
// catch (Exception ex)
|
catch (Exception ex)
|
||||||
// {
|
{
|
||||||
// OnProvidingCredentialException(ex);
|
OnProvidingCredentialException(ex);
|
||||||
// }
|
}
|
||||||
//}
|
}
|
||||||
|
|
||||||
public override async void PrepareInterfaceForExtensionConfiguration()
|
public override async void PrepareInterfaceForExtensionConfiguration()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.8bit.bitwarden.autofill</string>
|
<string>com.8bit.bitwarden.autofill</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2024.5.2</string>
|
<string>2024.6.0</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>CFBundleLocalizations</key>
|
<key>CFBundleLocalizations</key>
|
||||||
|
|||||||
@@ -15,9 +15,6 @@ using Foundation;
|
|||||||
using Microsoft.Maui.Controls.Compatibility;
|
using Microsoft.Maui.Controls.Compatibility;
|
||||||
using UIKit;
|
using UIKit;
|
||||||
using Microsoft.Maui.Platform;
|
using Microsoft.Maui.Platform;
|
||||||
using CollectionView = Bit.Core.Models.View.CollectionView;
|
|
||||||
using Bit.Core.Models.Domain;
|
|
||||||
using Bit.Core.Enums;
|
|
||||||
|
|
||||||
namespace Bit.iOS.Core.Controllers
|
namespace Bit.iOS.Core.Controllers
|
||||||
{
|
{
|
||||||
@@ -26,19 +23,7 @@ namespace Bit.iOS.Core.Controllers
|
|||||||
private ICipherService _cipherService;
|
private ICipherService _cipherService;
|
||||||
private IFolderService _folderService;
|
private IFolderService _folderService;
|
||||||
private IStorageService _storageService;
|
private IStorageService _storageService;
|
||||||
private IOrganizationService _organizationService;
|
|
||||||
private ICollectionService _collectionService;
|
|
||||||
private IPolicyService _policyService;
|
|
||||||
private IEnumerable<FolderView> _folders;
|
private IEnumerable<FolderView> _folders;
|
||||||
private IEnumerable<CollectionView> _collections;
|
|
||||||
private IEnumerable<CollectionView> _writeableCollections;
|
|
||||||
private IEnumerable<Organization> _organizations;
|
|
||||||
|
|
||||||
private bool _personalOwnershipPolicyApplies;
|
|
||||||
//Here we have the different sizes dependent of the _personalOwnershipPolicyApplies
|
|
||||||
private readonly int[] _personalVault = { 3, 1, 2, 1 };
|
|
||||||
private readonly int[] _groupVault = { 1, 3, 1, 2, 1, 2 };
|
|
||||||
private ExtendedUITableViewCell[][] _tableViewCell;
|
|
||||||
|
|
||||||
protected LoginAddViewController(IntPtr handle)
|
protected LoginAddViewController(IntPtr handle)
|
||||||
: base(handle)
|
: base(handle)
|
||||||
@@ -53,10 +38,6 @@ namespace Bit.iOS.Core.Controllers
|
|||||||
public FormEntryTableViewCell NotesCell { get; set; } = new FormEntryTableViewCell(
|
public FormEntryTableViewCell NotesCell { get; set; } = new FormEntryTableViewCell(
|
||||||
useTextView: true, height: 180);
|
useTextView: true, height: 180);
|
||||||
public PickerTableViewCell FolderCell { get; set; } = new PickerTableViewCell(AppResources.Folder);
|
public PickerTableViewCell FolderCell { get; set; } = new PickerTableViewCell(AppResources.Folder);
|
||||||
public PickerTableViewCell OrganizationCell { get; set; } = new PickerTableViewCell(AppResources.Organization);
|
|
||||||
public PickerTableViewCell CollectionCell { get; set; } = new PickerTableViewCell(AppResources.Collections);
|
|
||||||
|
|
||||||
public FormEntryTableViewCell PersonalOwnershipPolicyCell { get; set; } = new FormEntryTableViewCell(empty: true);
|
|
||||||
|
|
||||||
public abstract UINavigationItem BaseNavItem { get; }
|
public abstract UINavigationItem BaseNavItem { get; }
|
||||||
public abstract UIBarButtonItem BaseCancelButton { get; }
|
public abstract UIBarButtonItem BaseCancelButton { get; }
|
||||||
@@ -70,9 +51,6 @@ namespace Bit.iOS.Core.Controllers
|
|||||||
_cipherService = ServiceContainer.Resolve<ICipherService>("cipherService");
|
_cipherService = ServiceContainer.Resolve<ICipherService>("cipherService");
|
||||||
_folderService = ServiceContainer.Resolve<IFolderService>("folderService");
|
_folderService = ServiceContainer.Resolve<IFolderService>("folderService");
|
||||||
_storageService = ServiceContainer.Resolve<IStorageService>("storageService");
|
_storageService = ServiceContainer.Resolve<IStorageService>("storageService");
|
||||||
_organizationService = ServiceContainer.Resolve<IOrganizationService>("organizationService");
|
|
||||||
_collectionService = ServiceContainer.Resolve<ICollectionService>("collectionService");
|
|
||||||
_policyService = ServiceContainer.Resolve<IPolicyService>("policyService");
|
|
||||||
|
|
||||||
BaseNavItem.Title = AppResources.AddItem;
|
BaseNavItem.Title = AppResources.AddItem;
|
||||||
BaseCancelButton.Title = AppResources.Cancel;
|
BaseCancelButton.Title = AppResources.Cancel;
|
||||||
@@ -135,42 +113,6 @@ namespace Bit.iOS.Core.Controllers
|
|||||||
folderNames.Insert(0, AppResources.FolderNone);
|
folderNames.Insert(0, AppResources.FolderNone);
|
||||||
FolderCell.Items = folderNames;
|
FolderCell.Items = folderNames;
|
||||||
|
|
||||||
_personalOwnershipPolicyApplies = _policyService.PolicyAppliesToUser(PolicyType.PersonalOwnership).GetAwaiter().GetResult();
|
|
||||||
var index = 0;
|
|
||||||
if (_personalOwnershipPolicyApplies)
|
|
||||||
{
|
|
||||||
|
|
||||||
_organizations = _organizationService.GetAllAsync().GetAwaiter().GetResult().OrderBy(o => o.Name).ToList();
|
|
||||||
|
|
||||||
OrganizationCell.Items = _organizations.Select(o => o.Name).ToList();
|
|
||||||
OrganizationCell.ValueChanged += Type_ValueChanged;
|
|
||||||
|
|
||||||
_collections = _collectionService.GetAllDecryptedAsync().GetAwaiter().GetResult();
|
|
||||||
_writeableCollections = _collections.Where(c => !c.ReadOnly).OrderBy(c => c.Name).ToList();
|
|
||||||
var collectionsNames = _writeableCollections.Where(c => c.OrganizationId == _organizations.ElementAt(OrganizationCell.SelectedIndex).Id).Select(s => s.Name).ToList();
|
|
||||||
if (collectionsNames.Count == 0)
|
|
||||||
{
|
|
||||||
collectionsNames.Insert(0, AppResources.NoCollectionsToList);
|
|
||||||
}
|
|
||||||
|
|
||||||
CollectionCell.Items = collectionsNames;
|
|
||||||
|
|
||||||
_tableViewCell = new ExtendedUITableViewCell[_groupVault.Length][];
|
|
||||||
_tableViewCell[0] = new ExtendedUITableViewCell[] { PersonalOwnershipPolicyCell };
|
|
||||||
_tableViewCell[5] = new ExtendedUITableViewCell[] { OrganizationCell, CollectionCell };
|
|
||||||
|
|
||||||
index = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_tableViewCell = new ExtendedUITableViewCell[_personalVault.Length][];
|
|
||||||
}
|
|
||||||
|
|
||||||
_tableViewCell[index] = new ExtendedUITableViewCell[] { NameCell, UsernameCell, PasswordCell };
|
|
||||||
_tableViewCell[++index] = new ExtendedUITableViewCell[] { UriCell };
|
|
||||||
_tableViewCell[++index] = new ExtendedUITableViewCell[] { FolderCell, FavoriteCell };
|
|
||||||
_tableViewCell[++index] = new ExtendedUITableViewCell[] { NotesCell };
|
|
||||||
|
|
||||||
TableView.RowHeight = UITableView.AutomaticDimension;
|
TableView.RowHeight = UITableView.AutomaticDimension;
|
||||||
TableView.EstimatedRowHeight = 70;
|
TableView.EstimatedRowHeight = 70;
|
||||||
TableView.Source = new TableSource(this);
|
TableView.Source = new TableSource(this);
|
||||||
@@ -179,19 +121,6 @@ namespace Bit.iOS.Core.Controllers
|
|||||||
base.ViewDidLoad();
|
base.ViewDidLoad();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Type_ValueChanged(object sender, EventArgs e)
|
|
||||||
{
|
|
||||||
var organizationList = _organizations.OrderBy(o => o.Name).ToList();
|
|
||||||
var collectionsNames = _writeableCollections.Where(c => c.OrganizationId == _organizations.ElementAt(OrganizationCell.SelectedIndex).Id).Select(s => s.Name).ToList();
|
|
||||||
if (collectionsNames.Count == 0)
|
|
||||||
{
|
|
||||||
collectionsNames.Insert(0, AppResources.NoCollectionsToList);
|
|
||||||
}
|
|
||||||
|
|
||||||
CollectionCell.Items = collectionsNames;
|
|
||||||
_tableViewCell[5][1].ReloadInputViews();
|
|
||||||
}
|
|
||||||
|
|
||||||
public override void ViewDidAppear(bool animated)
|
public override void ViewDidAppear(bool animated)
|
||||||
{
|
{
|
||||||
base.ViewDidAppear(animated);
|
base.ViewDidAppear(animated);
|
||||||
@@ -238,10 +167,7 @@ namespace Bit.iOS.Core.Controllers
|
|||||||
null : UsernameCell.TextField.Text,
|
null : UsernameCell.TextField.Text,
|
||||||
Password = string.IsNullOrWhiteSpace(PasswordCell.TextField.Text) ?
|
Password = string.IsNullOrWhiteSpace(PasswordCell.TextField.Text) ?
|
||||||
null : PasswordCell.TextField.Text,
|
null : PasswordCell.TextField.Text,
|
||||||
},
|
}
|
||||||
CollectionIds = CollectionCell.SelectedItem.ToString() == AppResources.NoCollectionsToList ?
|
|
||||||
null : new HashSet<string> { _collections.ElementAtOrDefault(CollectionCell.SelectedIndex)?.Id },
|
|
||||||
OrganizationId = OrganizationCell.SelectedItem != null ? _organizations.ElementAtOrDefault(CollectionCell.SelectedIndex)?.Id : null,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!string.IsNullOrWhiteSpace(UriCell?.TextField?.Text))
|
if (!string.IsNullOrWhiteSpace(UriCell?.TextField?.Text))
|
||||||
@@ -346,7 +272,42 @@ namespace Bit.iOS.Core.Controllers
|
|||||||
|
|
||||||
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
|
public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
|
||||||
{
|
{
|
||||||
return _controller._tableViewCell[indexPath.Section][indexPath.Row];
|
if (indexPath.Section == 0)
|
||||||
|
{
|
||||||
|
if (indexPath.Row == 0)
|
||||||
|
{
|
||||||
|
return _controller.NameCell;
|
||||||
|
}
|
||||||
|
else if (indexPath.Row == 1)
|
||||||
|
{
|
||||||
|
return _controller.UsernameCell;
|
||||||
|
}
|
||||||
|
else if (indexPath.Row == 2)
|
||||||
|
{
|
||||||
|
return _controller.PasswordCell;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (indexPath.Section == 1)
|
||||||
|
{
|
||||||
|
return _controller.UriCell;
|
||||||
|
}
|
||||||
|
else if (indexPath.Section == 2)
|
||||||
|
{
|
||||||
|
if (indexPath.Row == 0)
|
||||||
|
{
|
||||||
|
return _controller.FolderCell;
|
||||||
|
}
|
||||||
|
else if (indexPath.Row == 1)
|
||||||
|
{
|
||||||
|
return _controller.FavoriteCell;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (indexPath.Section == 3)
|
||||||
|
{
|
||||||
|
return _controller.NotesCell;
|
||||||
|
}
|
||||||
|
|
||||||
|
return new ExtendedUITableViewCell();
|
||||||
}
|
}
|
||||||
|
|
||||||
public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
|
public override nfloat GetHeightForRow(UITableView tableView, NSIndexPath indexPath)
|
||||||
@@ -356,71 +317,43 @@ namespace Bit.iOS.Core.Controllers
|
|||||||
|
|
||||||
public override nint NumberOfSections(UITableView tableView)
|
public override nint NumberOfSections(UITableView tableView)
|
||||||
{
|
{
|
||||||
if (_controller._personalOwnershipPolicyApplies)
|
return 4;
|
||||||
{
|
|
||||||
return _controller._groupVault.Length;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return _controller._personalVault.Length;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override nint RowsInSection(UITableView tableview, nint section)
|
public override nint RowsInSection(UITableView tableview, nint section)
|
||||||
{
|
{
|
||||||
if (_controller._personalOwnershipPolicyApplies)
|
if (section == 0)
|
||||||
{
|
{
|
||||||
return _controller._groupVault[section];
|
return 3;
|
||||||
|
}
|
||||||
|
else if (section == 1)
|
||||||
|
{
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
else if (section == 2)
|
||||||
|
{
|
||||||
|
return 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return _controller._personalVault[section];
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override nfloat GetHeightForHeader(UITableView tableView, nint section)
|
public override nfloat GetHeightForHeader(UITableView tableView, nint section)
|
||||||
{
|
{
|
||||||
if (_controller._personalOwnershipPolicyApplies)
|
return section == 0 || section == 3 ? UITableView.AutomaticDimension : 0.00001f;
|
||||||
{
|
|
||||||
return section == 0 || section == 1 || section == 4 || section == 5 ? UITableView.AutomaticDimension : 0.00001f;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return section == 0 || section == 3 ? UITableView.AutomaticDimension : 0.00001f;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override string TitleForHeader(UITableView tableView, nint section)
|
public override string TitleForHeader(UITableView tableView, nint section)
|
||||||
{
|
{
|
||||||
if (_controller._personalOwnershipPolicyApplies)
|
if (section == 0)
|
||||||
{
|
{
|
||||||
if (section == 0)
|
return AppResources.ItemInformation;
|
||||||
{
|
|
||||||
return AppResources.PersonalOwnershipPolicyInEffect;
|
|
||||||
}
|
|
||||||
if (section == 1)
|
|
||||||
{
|
|
||||||
return AppResources.ItemInformation;
|
|
||||||
}
|
|
||||||
else if (section == 4)
|
|
||||||
{
|
|
||||||
return AppResources.Notes;
|
|
||||||
}
|
|
||||||
else if (section == 5)
|
|
||||||
{
|
|
||||||
return AppResources.WhoOwnsThisItem;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else if (section == 3)
|
||||||
{
|
{
|
||||||
if (section == 0)
|
return AppResources.Notes;
|
||||||
{
|
|
||||||
return AppResources.ItemInformation;
|
|
||||||
}
|
|
||||||
else if (section == 3)
|
|
||||||
{
|
|
||||||
return AppResources.Notes;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ namespace Bit.iOS.Core.Views
|
|||||||
nfloat? height = null,
|
nfloat? height = null,
|
||||||
ButtonsConfig buttonsConfig = ButtonsConfig.None,
|
ButtonsConfig buttonsConfig = ButtonsConfig.None,
|
||||||
bool useLabelAsPlaceholder = false,
|
bool useLabelAsPlaceholder = false,
|
||||||
float leadingConstant = 15f,
|
float leadingConstant = 15f)
|
||||||
bool empty = false)
|
|
||||||
: base(UITableViewCellStyle.Default, nameof(FormEntryTableViewCell))
|
: base(UITableViewCellStyle.Default, nameof(FormEntryTableViewCell))
|
||||||
{
|
{
|
||||||
var descriptor = UIFontDescriptor.PreferredBody;
|
var descriptor = UIFontDescriptor.PreferredBody;
|
||||||
@@ -87,7 +86,7 @@ namespace Bit.iOS.Core.Views
|
|||||||
ValueChanged?.Invoke(sender, e);
|
ValueChanged?.Invoke(sender, e);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
else if( !empty )
|
else
|
||||||
{
|
{
|
||||||
TextField = new UITextField
|
TextField = new UITextField
|
||||||
{
|
{
|
||||||
@@ -129,18 +128,18 @@ namespace Bit.iOS.Core.Views
|
|||||||
NSLayoutConstraint.Create(TextField, NSLayoutAttribute.Top, NSLayoutRelation.Equal, ContentView, NSLayoutAttribute.Top, 1f, 10f));
|
NSLayoutConstraint.Create(TextField, NSLayoutAttribute.Top, NSLayoutRelation.Equal, ContentView, NSLayoutAttribute.Top, 1f, 10f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (height.HasValue)
|
||||||
|
{
|
||||||
|
ContentView.AddConstraint(
|
||||||
|
NSLayoutConstraint.Create(TextField, NSLayoutAttribute.Height, NSLayoutRelation.Equal, null, NSLayoutAttribute.NoAttribute, 1f, height.Value));
|
||||||
|
}
|
||||||
|
|
||||||
TextField.AddTarget((object sender, EventArgs e) =>
|
TextField.AddTarget((object sender, EventArgs e) =>
|
||||||
{
|
{
|
||||||
ValueChanged?.Invoke(sender, e);
|
ValueChanged?.Invoke(sender, e);
|
||||||
}, UIControlEvent.EditingChanged);
|
}, UIControlEvent.EditingChanged);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty && height.HasValue)
|
|
||||||
{
|
|
||||||
ContentView.AddConstraint(
|
|
||||||
NSLayoutConstraint.Create(TextField, NSLayoutAttribute.Height, NSLayoutRelation.Equal, null, NSLayoutAttribute.NoAttribute, 1f, height.Value));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (labelName != null && !useLabelAsPlaceholder)
|
if (labelName != null && !useLabelAsPlaceholder)
|
||||||
{
|
{
|
||||||
ContentView.AddConstraints(new NSLayoutConstraint[] {
|
ContentView.AddConstraints(new NSLayoutConstraint[] {
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>com.8bit.bitwarden.find-login-action-extension</string>
|
<string>com.8bit.bitwarden.find-login-action-extension</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2024.5.2</string>
|
<string>2024.6.0</string>
|
||||||
<key>CFBundleLocalizations</key>
|
<key>CFBundleLocalizations</key>
|
||||||
<array>
|
<array>
|
||||||
<string>en</string>
|
<string>en</string>
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>XPC!</string>
|
<string>XPC!</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>2024.5.2</string>
|
<string>2024.6.0</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
<key>MinimumOSVersion</key>
|
<key>MinimumOSVersion</key>
|
||||||
|
|||||||
Reference in New Issue
Block a user