mirror of
https://github.com/bitwarden/mobile
synced 2026-01-21 03:43:17 +00:00
Merge branch 'master' into feature/maui-migration
Fixed conflicts # Conflicts: # src/App/Resources/AppResources.cs.Designer.cs # src/App/Resources/AppResources.da.Designer.cs # src/App/Resources/AppResources.de.Designer.cs # src/App/Resources/AppResources.es.Designer.cs # src/App/Resources/AppResources.fi.Designer.cs # src/App/Resources/AppResources.fr.Designer.cs # src/App/Resources/AppResources.hi.Designer.cs # src/App/Resources/AppResources.hr.Designer.cs # src/App/Resources/AppResources.hu.Designer.cs # src/App/Resources/AppResources.id.Designer.cs # src/App/Resources/AppResources.it.Designer.cs # src/App/Resources/AppResources.ja.Designer.cs # src/App/Resources/AppResources.nl.Designer.cs # src/App/Resources/AppResources.pl.Designer.cs # src/App/Resources/AppResources.pt-BR.Designer.cs # src/App/Resources/AppResources.pt-PT.Designer.cs # src/App/Resources/AppResources.ro.Designer.cs # src/App/Resources/AppResources.ru.Designer.cs # src/App/Resources/AppResources.sk.Designer.cs # src/App/Resources/AppResources.sv.Designer.cs # src/App/Resources/AppResources.th.Designer.cs # src/App/Resources/AppResources.tr.Designer.cs # src/App/Resources/AppResources.uk.Designer.cs # src/App/Resources/AppResources.vi.Designer.cs # src/App/Resources/AppResources.zh-Hans.Designer.cs # src/App/Resources/AppResources.zh-Hant.Designer.cs # src/Core/Controls/Settings/BaseSettingControlView.cs # src/Core/Pages/Accounts/EnvironmentPageViewModel.cs # src/Core/Pages/Accounts/HomePage.xaml.cs # src/Core/Pages/Accounts/HomePageViewModel.cs # src/Core/Pages/Accounts/SetPasswordPageViewModel.cs # src/Core/Pages/Settings/SecuritySettingsPageViewModel.cs # src/Core/Pages/TabsPage.cs # src/Core/Services/StateMigrationService.cs # src/Core/Utilities/BoolToColorConverter.cs
This commit is contained in:
49
src/Core/Utilities/RegionExtensions.cs
Normal file
49
src/Core/Utilities/RegionExtensions.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
using Bit.Core.Models.Data;
|
||||
using BwRegion = Bit.Core.Enums.Region;
|
||||
|
||||
namespace Bit.Core.Utilities
|
||||
{
|
||||
public static class RegionExtensions
|
||||
{
|
||||
public static EnvironmentUrlData GetUrls(this BwRegion region)
|
||||
{
|
||||
switch (region)
|
||||
{
|
||||
case BwRegion.US:
|
||||
return EnvironmentUrlData.DefaultUS;
|
||||
case BwRegion.EU:
|
||||
return EnvironmentUrlData.DefaultEU;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static string BaseUrl(this BwRegion region)
|
||||
{
|
||||
switch (region)
|
||||
{
|
||||
case BwRegion.US:
|
||||
return EnvironmentUrlData.DefaultUS.Base;
|
||||
case BwRegion.EU:
|
||||
return EnvironmentUrlData.DefaultEU.Base;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public static string Domain(this BwRegion region)
|
||||
{
|
||||
switch (region)
|
||||
{
|
||||
case BwRegion.US:
|
||||
return EnvironmentUrlData.DefaultUS.Domain;
|
||||
case BwRegion.EU:
|
||||
return EnvironmentUrlData.DefaultEU.Domain;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user