mirror of
https://github.com/bitwarden/mobile
synced 2025-12-05 23:53:33 +00:00
Compare commits
10 Commits
v2024.6.0
...
vault/pm-2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
485aca083b | ||
|
|
2b78859d06 | ||
|
|
290266c262 | ||
|
|
c40eb9d3db | ||
|
|
df9fcd1aca | ||
|
|
890eff79a2 | ||
|
|
265c95b494 | ||
|
|
25e394eb5e | ||
|
|
354aec09d9 | ||
|
|
4332e7a498 |
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@@ -72,7 +72,6 @@ jobs:
|
||||
workflow: build.yml
|
||||
workflow_conclusion: success
|
||||
branch: ${{ steps.branch.outputs.branch-name }}
|
||||
skip_unpack: true
|
||||
|
||||
- name: Dry Run - Download all artifacts
|
||||
if: ${{ inputs.release_type == 'Dry Run' }}
|
||||
@@ -81,15 +80,9 @@ jobs:
|
||||
workflow: build.yml
|
||||
workflow_conclusion: success
|
||||
branch: main
|
||||
skip_unpack: true
|
||||
|
||||
- name: Unzip release assets
|
||||
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: Prep Bitwarden iOS release asset
|
||||
run: zip -r Bitwarden\ iOS.zip Bitwarden\ iOS
|
||||
|
||||
- name: Create release
|
||||
if: ${{ inputs.release_type != 'Dry Run' }}
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace Bit.Core
|
||||
public const string PasswordlessLoginRequestKey = "passwordlessLoginRequest";
|
||||
public const string PreLoginEmailKey = "preLoginEmailKey";
|
||||
public const string ConfigsKey = "configsKey";
|
||||
public const string DisplayEuEnvironmentFlag = "display-eu-environment";
|
||||
public const string UnassignedItemsBannerFlag = "unassigned-items-banner";
|
||||
public const string RegionEnvironment = "regionEnvironment";
|
||||
public const string DuoCallback = "bitwarden://duo-callback";
|
||||
|
||||
@@ -25,6 +25,7 @@ namespace Bit.App.Pages
|
||||
private bool _rememberEmail;
|
||||
private string _email;
|
||||
private string _selectedEnvironmentName;
|
||||
private bool _displayEuEnvironment;
|
||||
|
||||
public HomeViewModel()
|
||||
{
|
||||
@@ -115,6 +116,7 @@ namespace Bit.App.Pages
|
||||
{
|
||||
Email = await _stateService.GetRememberedEmailAsync();
|
||||
RememberEmail = !string.IsNullOrEmpty(Email);
|
||||
_displayEuEnvironment = await _configService.GetFeatureFlagBoolAsync(Constants.DisplayEuEnvironmentFlag, forceRefresh: true);
|
||||
}
|
||||
|
||||
public async Task ContinueToLoginStepAsync()
|
||||
@@ -156,7 +158,11 @@ namespace Bit.App.Pages
|
||||
|
||||
public async Task ShowEnvironmentPickerAsync()
|
||||
{
|
||||
var options = new string[] { BwRegion.US.Domain(), BwRegion.EU.Domain(), AppResources.SelfHosted };
|
||||
_displayEuEnvironment = await _configService.GetFeatureFlagBoolAsync(Constants.DisplayEuEnvironmentFlag);
|
||||
var options = _displayEuEnvironment
|
||||
? new string[] { BwRegion.US.Domain(), BwRegion.EU.Domain(), AppResources.SelfHosted }
|
||||
: new string[] { BwRegion.US.Domain(), AppResources.SelfHosted };
|
||||
|
||||
await MainThread.InvokeOnMainThreadAsync(async () =>
|
||||
{
|
||||
var result = await _deviceActionService.Value.DisplayActionSheetAsync(AppResources.LoggingInOn, AppResources.Cancel, null, options);
|
||||
|
||||
@@ -422,7 +422,7 @@
|
||||
<value>خدمة التعبئة التلقائية</value>
|
||||
</data>
|
||||
<data name="SetBitwardenAsPasskeyManagerDescription" xml:space="preserve">
|
||||
<value>Set Bitwarden as your passkey provider in device settings.</value>
|
||||
<value>تعيين Bitwarden كموفر مفتاح المرور الخاص بك في إعدادات الجهاز.</value>
|
||||
</data>
|
||||
<data name="AvoidAmbiguousCharacters" xml:space="preserve">
|
||||
<value>تجنب الأحرف الغامضة</value>
|
||||
|
||||
@@ -961,7 +961,7 @@ A leitura será efetuada automaticamente.</value>
|
||||
<value>Ambiente personalizado</value>
|
||||
</data>
|
||||
<data name="CustomEnvironmentFooter" xml:space="preserve">
|
||||
<value>Para utilizadores avançados. Pode especificar o URL de base de cada serviço independentemente.</value>
|
||||
<value>Para utilizadores avançados. Pode especificar o URL de base de cada serviço de forma independente.</value>
|
||||
</data>
|
||||
<data name="EnvironmentSaved" xml:space="preserve">
|
||||
<value>Os URLs de ambiente foram guardados.</value>
|
||||
|
||||
@@ -571,28 +571,39 @@ namespace Bit.Core.Services
|
||||
await UpsertAsync(data);
|
||||
}
|
||||
|
||||
public async Task ShareWithServerAsync(CipherView cipher, string organizationId, HashSet<string> collectionIds)
|
||||
public async Task ShareWithServerAsync(CipherView cipherView, string organizationId, HashSet<string> collectionIds)
|
||||
{
|
||||
var attachmentTasks = new List<Task>();
|
||||
if (cipher.Attachments != null)
|
||||
Cipher cipher = null;
|
||||
//If the cipher doesn't have a key, we update it
|
||||
if(cipherView.Key == null && await ShouldUseCipherKeyEncryptionAsync())
|
||||
{
|
||||
foreach (var attachment in cipher.Attachments)
|
||||
await UpdateAndUpsertAsync(cipherView, cipher => _apiService.PutCipherAsync(cipherView.Id, new CipherRequest(cipher)));
|
||||
cipher = await GetAsync(cipherView.Id);
|
||||
cipherView = await cipher.DecryptAsync();
|
||||
}
|
||||
if (cipherView.Attachments != null)
|
||||
{
|
||||
foreach (var attachment in cipherView.Attachments)
|
||||
{
|
||||
if (attachment.Key == null)
|
||||
{
|
||||
attachmentTasks.Add(ShareAttachmentWithServerAsync(attachment, cipher.Id, organizationId));
|
||||
attachmentTasks.Add(ShareAttachmentWithServerAsync(attachment, cipherView.Id, organizationId));
|
||||
}
|
||||
}
|
||||
}
|
||||
await Task.WhenAll(attachmentTasks);
|
||||
cipher.OrganizationId = organizationId;
|
||||
cipher.CollectionIds = collectionIds;
|
||||
var encCipher = await EncryptAsync(cipher);
|
||||
var request = new CipherShareRequest(encCipher);
|
||||
var response = await _apiService.PutShareCipherAsync(cipher.Id, request);
|
||||
var userId = await _stateService.GetActiveUserIdAsync();
|
||||
var data = new CipherData(response, userId, collectionIds);
|
||||
await UpsertAsync(data);
|
||||
cipherView.OrganizationId = organizationId;
|
||||
cipherView.CollectionIds = collectionIds;
|
||||
await UpdateAndUpsertAsync(cipherView, cipher => _apiService.PutShareCipherAsync(cipherView.Id, new CipherShareRequest(cipher)), collectionIds);
|
||||
|
||||
async Task UpdateAndUpsertAsync(CipherView cipherView, Func<Cipher,Task<CipherResponse>> callPutCipherApi, HashSet<string> collectionIds = null)
|
||||
{
|
||||
var cipher = await EncryptAsync(cipherView);
|
||||
var response = await callPutCipherApi(cipher);
|
||||
var data = new CipherData(response, await _stateService.GetActiveUserIdAsync(), collectionIds);
|
||||
await UpsertAsync(data);
|
||||
}
|
||||
}
|
||||
|
||||
public async Task<Cipher> SaveAttachmentRawWithServerAsync(Cipher cipher, CipherView cipherView, string filename, byte[] data)
|
||||
|
||||
Reference in New Issue
Block a user