|
|
@ -365,7 +365,7 @@ public partial class MainSettingsViewModel : PageViewModelBase |
|
|
|
var viewModel = dialogFactory.Get<EnvVarsViewModel>(); |
|
|
|
var viewModel = dialogFactory.Get<EnvVarsViewModel>(); |
|
|
|
|
|
|
|
|
|
|
|
// Load current settings |
|
|
|
// Load current settings |
|
|
|
var current = settingsManager.Settings.EnvironmentVariables ?? new Dictionary<string, string>(); |
|
|
|
var current = settingsManager.Settings.UserEnvironmentVariables ?? new Dictionary<string, string>(); |
|
|
|
viewModel.EnvVars = new ObservableCollection<EnvVarKeyPair>( |
|
|
|
viewModel.EnvVars = new ObservableCollection<EnvVarKeyPair>( |
|
|
|
current.Select(kvp => new EnvVarKeyPair(kvp.Key, kvp.Value)) |
|
|
|
current.Select(kvp => new EnvVarKeyPair(kvp.Key, kvp.Value)) |
|
|
|
); |
|
|
|
); |
|
|
@ -385,7 +385,7 @@ public partial class MainSettingsViewModel : PageViewModelBase |
|
|
|
.EnvVars.Where(kvp => !string.IsNullOrWhiteSpace(kvp.Key)) |
|
|
|
.EnvVars.Where(kvp => !string.IsNullOrWhiteSpace(kvp.Key)) |
|
|
|
.GroupBy(kvp => kvp.Key, StringComparer.Ordinal) |
|
|
|
.GroupBy(kvp => kvp.Key, StringComparer.Ordinal) |
|
|
|
.ToDictionary(g => g.Key, g => g.First().Value, StringComparer.Ordinal); |
|
|
|
.ToDictionary(g => g.Key, g => g.First().Value, StringComparer.Ordinal); |
|
|
|
settingsManager.Transaction(s => s.EnvironmentVariables = newEnvVars); |
|
|
|
settingsManager.Transaction(s => s.UserEnvironmentVariables = newEnvVars); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|