diff --git a/Activities/FTP/UiPath.FTP.Activities/NetCore/MenuActionBuilder.cs b/Activities/FTP/UiPath.FTP.Activities/NetCore/MenuActionBuilder.cs index 312530dd..137c3c9b 100644 --- a/Activities/FTP/UiPath.FTP.Activities/NetCore/MenuActionBuilder.cs +++ b/Activities/FTP/UiPath.FTP.Activities/NetCore/MenuActionBuilder.cs @@ -75,13 +75,14 @@ public MenuActionsBuilder AddMenuProperty(DesignProperty property, T value, s /// /// For each of the stored properties, adds menu actions that represent all the other stored properties. /// - public void BuildAndInsertMenuActions() + public void BuildAndInsertMenuActions(bool isMain) { foreach (var targetPropertyInfo in _properties) { var menuAction = new MenuAction { DisplayName = targetPropertyInfo.DisplayName, + IsMain = isMain, Handler = _ => { _valueProperty.Value = targetPropertyInfo.Value; @@ -91,8 +92,6 @@ public void BuildAndInsertMenuActions() }; foreach (var propertyInfo in _properties.Where(pi => pi != targetPropertyInfo)) { - - propertyInfo.Property.AddMenuAction(menuAction); } } diff --git a/Activities/FTP/UiPath.FTP.Activities/NetCore/ViewModels/WithFtpSessionViewModel.cs b/Activities/FTP/UiPath.FTP.Activities/NetCore/ViewModels/WithFtpSessionViewModel.cs index f402bfbd..1a5f6525 100644 --- a/Activities/FTP/UiPath.FTP.Activities/NetCore/ViewModels/WithFtpSessionViewModel.cs +++ b/Activities/FTP/UiPath.FTP.Activities/NetCore/ViewModels/WithFtpSessionViewModel.cs @@ -135,12 +135,12 @@ protected override void InitializeModel() MenuActionsBuilder.WithValueProperty(PasswordInputModeSwitch) .AddMenuProperty(Password, PasswordInputMode.Password) .AddMenuProperty(SecurePassword, PasswordInputMode.SecurePassword) - .BuildAndInsertMenuActions(); + .BuildAndInsertMenuActions(true); MenuActionsBuilder.WithValueProperty(CertificatePasswordInputModeSwitch) .AddMenuProperty(ClientCertificatePassword, PasswordInputMode.Password) .AddMenuProperty(ClientCertificateSecurePassword, PasswordInputMode.SecurePassword) - .BuildAndInsertMenuActions(); + .BuildAndInsertMenuActions(true); } /// diff --git a/Activities/FTP/UiPath.FTP.Activities/WithFtpSession.cs b/Activities/FTP/UiPath.FTP.Activities/WithFtpSession.cs index 425188ca..676cf59e 100644 --- a/Activities/FTP/UiPath.FTP.Activities/WithFtpSession.cs +++ b/Activities/FTP/UiPath.FTP.Activities/WithFtpSession.cs @@ -173,13 +173,17 @@ protected override async Task> ExecuteAsync(Native ftpConfiguration.Port = Port.Expression == null ? null : (int?)Port.Get(context); ftpConfiguration.UseAnonymousLogin = UseAnonymousLogin; ftpConfiguration.SslProtocols = SslProtocols; - ftpConfiguration.Password = passwordValue; ftpConfiguration.ProxyType = ProxyType; - if (ftpConfiguration.Password == null) + if (PasswordInputModeSwitch == PasswordInputMode.Password) + { + ftpConfiguration.Password = passwordValue; + } + else { ftpConfiguration.Password = new NetworkCredential("", securePasswordValue).Password; } + if(ftpConfiguration.ProxyType != FtpProxyType.None) { ftpConfiguration.ProxyServer = ProxyServer.Get(context); diff --git a/Activities/FTP/UiPath.FTP/Properties/UiPath.FTP.resx b/Activities/FTP/UiPath.FTP/Properties/UiPath.FTP.resx index d1ec4de1..22a32d34 100644 --- a/Activities/FTP/UiPath.FTP/Properties/UiPath.FTP.resx +++ b/Activities/FTP/UiPath.FTP/Properties/UiPath.FTP.resx @@ -136,9 +136,9 @@ The destination directory already exists - Toggle to text input + Use string - Toggle to Secure input + Use secure string \ No newline at end of file