From d6c139cb8a6bbabe79b805bcfd600ed048c727c8 Mon Sep 17 00:00:00 2001 From: Daniel James Smith <2670567+djsmith85@users.noreply.github.com> Date: Tue, 16 Jan 2024 16:02:06 +0100 Subject: [PATCH] Import-link routes to import page after login (#2939) Co-authored-by: Daniel James Smith --- src/App/Pages/Settings/VaultSettingsPageViewModel.cs | 6 +++--- src/Core/ExternalLinksConstants.cs | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/App/Pages/Settings/VaultSettingsPageViewModel.cs b/src/App/Pages/Settings/VaultSettingsPageViewModel.cs index 3afdba929..e34311174 100644 --- a/src/App/Pages/Settings/VaultSettingsPageViewModel.cs +++ b/src/App/Pages/Settings/VaultSettingsPageViewModel.cs @@ -40,11 +40,11 @@ namespace Bit.App.Pages private async Task GoToImportItemsAsync() { - var webVaultUrl = _environmentService.GetWebVaultUrl() + "/#/tools/import"; - var body = string.Format(AppResources.YouCanImportDataToYourVaultOnX, webVaultUrl); + var toolsImportUrl = string.Format(ExternalLinksConstants.WEB_VAULT_TOOLS_IMPORT_FORMAT, _environmentService.GetWebVaultUrl()); + var body = string.Format(AppResources.YouCanImportDataToYourVaultOnX, toolsImportUrl); if (await _platformUtilsService.ShowDialogAsync(body, AppResources.ContinueToWebApp, AppResources.Continue, AppResources.Cancel)) { - _platformUtilsService.LaunchUri(webVaultUrl); + _platformUtilsService.LaunchUri(toolsImportUrl); } } } diff --git a/src/Core/ExternalLinksConstants.cs b/src/Core/ExternalLinksConstants.cs index fbb70030a..6db6292a2 100644 --- a/src/Core/ExternalLinksConstants.cs +++ b/src/Core/ExternalLinksConstants.cs @@ -13,6 +13,11 @@ /// public const string WEB_VAULT_SETTINGS_FORMAT = "{0}/#/settings"; + /// + /// Link to go to individual vault import page. Requires to pass vault URL as parameter. + /// + public const string WEB_VAULT_TOOLS_IMPORT_FORMAT = "{0}/#/tools/import"; + /// /// General website, not in the full format of a URL given that this is used as parameter of string resources to be shown to the user. ///