From 92cbc14b6dbf39754dfacf0303b00148855387cc Mon Sep 17 00:00:00 2001 From: Dominic Neuburg Date: Tue, 14 Jul 2026 20:48:21 +0200 Subject: [PATCH] Added enterprise settings to hide vision and changelog --- app/MindWork AI Studio/Pages/Home.razor | 20 ++++++++++++------- app/MindWork AI Studio/Pages/Home.razor.cs | 16 ++++++++++++--- .../Plugins/configuration/plugin.lua | 6 ++++++ .../Settings/DataModel/DataApp.cs | 10 ++++++++++ .../Tools/PluginSystem/PluginConfiguration.cs | 8 +++++++- .../PluginSystem/PluginFactory.Loading.cs | 10 +++++++++- 6 files changed, 58 insertions(+), 12 deletions(-) diff --git a/app/MindWork AI Studio/Pages/Home.razor b/app/MindWork AI Studio/Pages/Home.razor index d6c4158a..58790989 100644 --- a/app/MindWork AI Studio/Pages/Home.razor +++ b/app/MindWork AI Studio/Pages/Home.razor @@ -39,14 +39,20 @@ } - - - + @if (this.SettingsManager.ConfigurationData.App.ShowLastChangelog) + { + + + + } + + @if (this.SettingsManager.ConfigurationData.App.ShowVision) + { + + + + } - - - - @if (this.SettingsManager.ConfigurationData.App.ShowQuickStartGuide) { diff --git a/app/MindWork AI Studio/Pages/Home.razor.cs b/app/MindWork AI Studio/Pages/Home.razor.cs index 5fb95872..244007bd 100644 --- a/app/MindWork AI Studio/Pages/Home.razor.cs +++ b/app/MindWork AI Studio/Pages/Home.razor.cs @@ -108,9 +108,19 @@ public partial class Home : MSGComponentBase return PANEL_ID_BUILT_IN_INTRODUCTION; var firstIntroduction = this.introductions.FirstOrDefault(); - return firstIntroduction is not null - ? IntroductionPanelId(firstIntroduction) - : PANEL_ID_LAST_CHANGELOG; + if (firstIntroduction is not null) + return IntroductionPanelId(firstIntroduction); + + if (this.SettingsManager.ConfigurationData.App.ShowLastChangelog) + return PANEL_ID_LAST_CHANGELOG; + + if (this.SettingsManager.ConfigurationData.App.ShowVision) + return PANEL_ID_VISION; + + if (this.SettingsManager.ConfigurationData.App.ShowQuickStartGuide) + return PANEL_ID_QUICK_START_GUIDE; + + return string.Empty; } private void EnsureDefaultExpandedPanel() diff --git a/app/MindWork AI Studio/Plugins/configuration/plugin.lua b/app/MindWork AI Studio/Plugins/configuration/plugin.lua index 30e042af..1d49cab6 100644 --- a/app/MindWork AI Studio/Plugins/configuration/plugin.lua +++ b/app/MindWork AI Studio/Plugins/configuration/plugin.lua @@ -226,6 +226,12 @@ CONFIG["SETTINGS"] = {} -- Configure whether the built-in introduction is shown on the welcome page. -- CONFIG["SETTINGS"]["DataApp.ShowIntroduction"] = false +-- Configure whether the last changelog is shown on the welcome page. +-- CONFIG["SETTINGS"]["DataApp.ShowLastChangelog"] = false + +-- Configure whether the vision panel is shown on the welcome page. +-- CONFIG["SETTINGS"]["DataApp.ShowVision"] = false + -- Configure the user permission to add providers: -- CONFIG["SETTINGS"]["DataApp.AllowUserToAddProvider"] = false diff --git a/app/MindWork AI Studio/Settings/DataModel/DataApp.cs b/app/MindWork AI Studio/Settings/DataModel/DataApp.cs index a0c2c58e..6c0ef294 100644 --- a/app/MindWork AI Studio/Settings/DataModel/DataApp.cs +++ b/app/MindWork AI Studio/Settings/DataModel/DataApp.cs @@ -67,6 +67,16 @@ public sealed class DataApp(Expression>? configSelection = n /// public bool ShowQuickStartGuide { get; set; } = ManagedConfiguration.Register(configSelection, n => n.ShowQuickStartGuide, true); + /// + /// Should the last changelog be visible on the home page? + /// + public bool ShowLastChangelog { get; set; } = ManagedConfiguration.Register(configSelection, n => n.ShowLastChangelog, true); + + /// + /// Should the vision panel be visible on the home page? + /// + public bool ShowVision { get; set; } = ManagedConfiguration.Register(configSelection, n => n.ShowVision, true); + /// /// The visibility setting for previews features. /// diff --git a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs index 1574f8e2..7600f278 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/PluginConfiguration.cs @@ -169,7 +169,13 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT // Config: show quick start guide on the home page? ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.ShowQuickStartGuide, this.Id, settingsTable, dryRun); - + + // Config: show last changelog on the home page? + ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.ShowLastChangelog, this.Id, settingsTable, dryRun); + + // Config: show vision panel on the home page? + ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.ShowVision, this.Id, settingsTable, dryRun); + // Config: allow the user to add providers? ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.AllowUserToAddProvider, this.Id, settingsTable, dryRun); diff --git a/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.Loading.cs b/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.Loading.cs index b46409a5..0c1c1c96 100644 --- a/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.Loading.cs +++ b/app/MindWork AI Studio/Tools/PluginSystem/PluginFactory.Loading.cs @@ -249,7 +249,15 @@ public static partial class PluginFactory // Check for the quick start guide visibility: if(ManagedConfiguration.IsConfigurationLeftOver(x => x.App, x => x.ShowQuickStartGuide, AVAILABLE_PLUGINS)) wasConfigurationChanged = true; - + + // Check for the last changelog visibility: + if(ManagedConfiguration.IsConfigurationLeftOver(x => x.App, x => x.ShowLastChangelog, AVAILABLE_PLUGINS)) + wasConfigurationChanged = true; + + // Check for the vision panel visibility: + if(ManagedConfiguration.IsConfigurationLeftOver(x => x.App, x => x.ShowVision, AVAILABLE_PLUGINS)) + wasConfigurationChanged = true; + // Check for users allowed to added providers: if(ManagedConfiguration.IsConfigurationLeftOver(x => x.App, x => x.AllowUserToAddProvider, AVAILABLE_PLUGINS)) wasConfigurationChanged = true;