diff --git a/app/MindWork AI Studio/Pages/About.razor b/app/MindWork AI Studio/Pages/About.razor
index 3c13e8da..4cd02e40 100644
--- a/app/MindWork AI Studio/Pages/About.razor
+++ b/app/MindWork AI Studio/Pages/About.razor
@@ -1,4 +1,5 @@
@attribute [Route(Routes.ABOUT)]
+@using AIStudio.Tools.Services
@inherits MSGComponentBase
@@ -24,7 +25,7 @@
- @switch (this.currentEnvironment.IsActive)
+ @switch (EnterpriseEnvironmentService.CURRENT_ENVIRONMENT.IsActive)
{
case false when this.configPlug is null:
@@ -55,16 +56,16 @@
- @T("Enterprise configuration ID:") @this.currentEnvironment.ConfigurationId
-
+ @T("Enterprise configuration ID:") @EnterpriseEnvironmentService.CURRENT_ENVIRONMENT.ConfigurationId
+
- @T("Configuration server:") @this.currentEnvironment.ConfigurationServerUrl
-
+ @T("Configuration server:") @EnterpriseEnvironmentService.CURRENT_ENVIRONMENT.ConfigurationServerUrl
+
@@ -78,16 +79,16 @@
- @T("Enterprise configuration ID:") @this.currentEnvironment.ConfigurationId
-
+ @T("Enterprise configuration ID:") @EnterpriseEnvironmentService.CURRENT_ENVIRONMENT.ConfigurationId
+
- @T("Configuration server:") @this.currentEnvironment.ConfigurationServerUrl
-
+ @T("Configuration server:") @EnterpriseEnvironmentService.CURRENT_ENVIRONMENT.ConfigurationServerUrl
+
diff --git a/app/MindWork AI Studio/Pages/About.razor.cs b/app/MindWork AI Studio/Pages/About.razor.cs
index 8c1aabca..ecdf1d17 100644
--- a/app/MindWork AI Studio/Pages/About.razor.cs
+++ b/app/MindWork AI Studio/Pages/About.razor.cs
@@ -58,12 +58,10 @@ public partial class About : MSGComponentBase
private GetLogPathsResponse logPaths;
- private bool showEnterpriseConfigDetails = false;
+ private bool showEnterpriseConfigDetails;
private IPluginMetadata? configPlug = PluginFactory.AvailablePlugins.FirstOrDefault(x => x.Type is PluginType.CONFIGURATION);
- private EnterpriseEnvironment currentEnvironment = EnterpriseEnvironmentService.CURRENT_ENVIRONMENT;
-
///
/// Determines whether the enterprise configuration has details that can be shown/hidden.
/// Returns true if there are details available, false otherwise.
@@ -72,7 +70,7 @@ public partial class About : MSGComponentBase
{
get
{
- return this.currentEnvironment.IsActive switch
+ return EnterpriseEnvironmentService.CURRENT_ENVIRONMENT.IsActive switch
{
// Case 1: No enterprise config and no plugin - no details available
false when this.configPlug is null => false,
@@ -105,6 +103,23 @@ public partial class About : MSGComponentBase
#endregion
+ #region Overrides of MSGComponentBase
+
+ protected override async Task ProcessIncomingMessage(ComponentBase? sendingComponent, Event triggeredEvent, T? data) where T : default
+ {
+ switch (triggeredEvent)
+ {
+ case Event.PLUGINS_RELOADED:
+ this.configPlug = PluginFactory.AvailablePlugins.FirstOrDefault(x => x.Type is PluginType.CONFIGURATION);
+ await this.InvokeAsync(this.StateHasChanged);
+ break;
+ }
+
+ await base.ProcessIncomingMessage(sendingComponent, triggeredEvent, data);
+ }
+
+ #endregion
+
private async Task DeterminePandocVersion()
{
this.pandocInstallation = await Pandoc.CheckAvailabilityAsync(this.RustService, false);
@@ -153,10 +168,6 @@ public partial class About : MSGComponentBase
private void ToggleEnterpriseConfigDetails()
{
- // can configPlug and currentEnvironment change?
- this.configPlug = PluginFactory.AvailablePlugins.FirstOrDefault(x => x.Type is PluginType.CONFIGURATION);
- this.currentEnvironment = EnterpriseEnvironmentService.CURRENT_ENVIRONMENT;
-
this.showEnterpriseConfigDetails = !this.showEnterpriseConfigDetails;
}