mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-08-24 20:52:11 +00:00
Added enterprise settings to hide vision and changelog
This commit is contained in:
parent
5dc6282908
commit
92cbc14b6d
@ -39,14 +39,20 @@
|
|||||||
</ExpansionPanel>
|
</ExpansionPanel>
|
||||||
}
|
}
|
||||||
|
|
||||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.EventNote" HeaderText="@T("Last Changelog")" IsExpanded="@this.IsPanelExpanded(PANEL_ID_LAST_CHANGELOG)" ExpandedChanged="@(isExpanded => this.SetPanelExpanded(PANEL_ID_LAST_CHANGELOG, isExpanded))">
|
@if (this.SettingsManager.ConfigurationData.App.ShowLastChangelog)
|
||||||
<MudMarkdown Value="@this.LastChangeContent" Props="Markdown.DefaultConfig" MarkdownPipeline="Markdown.SAFE_MARKDOWN_PIPELINE"/>
|
{
|
||||||
</ExpansionPanel>
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.EventNote" HeaderText="@T("Last Changelog")" IsExpanded="@this.IsPanelExpanded(PANEL_ID_LAST_CHANGELOG)" ExpandedChanged="@(isExpanded => this.SetPanelExpanded(PANEL_ID_LAST_CHANGELOG, isExpanded))">
|
||||||
|
<MudMarkdown Value="@this.LastChangeContent" Props="Markdown.DefaultConfig" MarkdownPipeline="Markdown.SAFE_MARKDOWN_PIPELINE"/>
|
||||||
|
</ExpansionPanel>
|
||||||
|
}
|
||||||
|
|
||||||
|
@if (this.SettingsManager.ConfigurationData.App.ShowVision)
|
||||||
|
{
|
||||||
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Lightbulb" HeaderText="@T("Vision")" IsExpanded="@this.IsPanelExpanded(PANEL_ID_VISION)" ExpandedChanged="@(isExpanded => this.SetPanelExpanded(PANEL_ID_VISION, isExpanded))">
|
||||||
|
<Vision/>
|
||||||
|
</ExpansionPanel>
|
||||||
|
}
|
||||||
|
|
||||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.Lightbulb" HeaderText="@T("Vision")" IsExpanded="@this.IsPanelExpanded(PANEL_ID_VISION)" ExpandedChanged="@(isExpanded => this.SetPanelExpanded(PANEL_ID_VISION, isExpanded))">
|
|
||||||
<Vision/>
|
|
||||||
</ExpansionPanel>
|
|
||||||
|
|
||||||
@if (this.SettingsManager.ConfigurationData.App.ShowQuickStartGuide)
|
@if (this.SettingsManager.ConfigurationData.App.ShowQuickStartGuide)
|
||||||
{
|
{
|
||||||
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.RocketLaunch" HeaderText="@T("Quick Start Guide")" IsExpanded="@this.IsPanelExpanded(PANEL_ID_QUICK_START_GUIDE)" ExpandedChanged="@(isExpanded => this.SetPanelExpanded(PANEL_ID_QUICK_START_GUIDE, isExpanded))">
|
<ExpansionPanel HeaderIcon="@Icons.Material.Filled.RocketLaunch" HeaderText="@T("Quick Start Guide")" IsExpanded="@this.IsPanelExpanded(PANEL_ID_QUICK_START_GUIDE)" ExpandedChanged="@(isExpanded => this.SetPanelExpanded(PANEL_ID_QUICK_START_GUIDE, isExpanded))">
|
||||||
|
|||||||
@ -108,9 +108,19 @@ public partial class Home : MSGComponentBase
|
|||||||
return PANEL_ID_BUILT_IN_INTRODUCTION;
|
return PANEL_ID_BUILT_IN_INTRODUCTION;
|
||||||
|
|
||||||
var firstIntroduction = this.introductions.FirstOrDefault();
|
var firstIntroduction = this.introductions.FirstOrDefault();
|
||||||
return firstIntroduction is not null
|
if (firstIntroduction is not null)
|
||||||
? IntroductionPanelId(firstIntroduction)
|
return IntroductionPanelId(firstIntroduction);
|
||||||
: PANEL_ID_LAST_CHANGELOG;
|
|
||||||
|
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()
|
private void EnsureDefaultExpandedPanel()
|
||||||
|
|||||||
@ -226,6 +226,12 @@ CONFIG["SETTINGS"] = {}
|
|||||||
-- Configure whether the built-in introduction is shown on the welcome page.
|
-- Configure whether the built-in introduction is shown on the welcome page.
|
||||||
-- CONFIG["SETTINGS"]["DataApp.ShowIntroduction"] = false
|
-- 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:
|
-- Configure the user permission to add providers:
|
||||||
-- CONFIG["SETTINGS"]["DataApp.AllowUserToAddProvider"] = false
|
-- CONFIG["SETTINGS"]["DataApp.AllowUserToAddProvider"] = false
|
||||||
|
|
||||||
|
|||||||
@ -67,6 +67,16 @@ public sealed class DataApp(Expression<Func<Data, DataApp>>? configSelection = n
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public bool ShowQuickStartGuide { get; set; } = ManagedConfiguration.Register(configSelection, n => n.ShowQuickStartGuide, true);
|
public bool ShowQuickStartGuide { get; set; } = ManagedConfiguration.Register(configSelection, n => n.ShowQuickStartGuide, true);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Should the last changelog be visible on the home page?
|
||||||
|
/// </summary>
|
||||||
|
public bool ShowLastChangelog { get; set; } = ManagedConfiguration.Register(configSelection, n => n.ShowLastChangelog, true);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Should the vision panel be visible on the home page?
|
||||||
|
/// </summary>
|
||||||
|
public bool ShowVision { get; set; } = ManagedConfiguration.Register(configSelection, n => n.ShowVision, true);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The visibility setting for previews features.
|
/// The visibility setting for previews features.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@ -169,7 +169,13 @@ public sealed class PluginConfiguration(bool isInternal, LuaState state, PluginT
|
|||||||
|
|
||||||
// Config: show quick start guide on the home page?
|
// Config: show quick start guide on the home page?
|
||||||
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.ShowQuickStartGuide, this.Id, settingsTable, dryRun);
|
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?
|
// Config: allow the user to add providers?
|
||||||
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.AllowUserToAddProvider, this.Id, settingsTable, dryRun);
|
ManagedConfiguration.TryProcessConfiguration(x => x.App, x => x.AllowUserToAddProvider, this.Id, settingsTable, dryRun);
|
||||||
|
|
||||||
|
|||||||
@ -249,7 +249,15 @@ public static partial class PluginFactory
|
|||||||
// Check for the quick start guide visibility:
|
// Check for the quick start guide visibility:
|
||||||
if(ManagedConfiguration.IsConfigurationLeftOver(x => x.App, x => x.ShowQuickStartGuide, AVAILABLE_PLUGINS))
|
if(ManagedConfiguration.IsConfigurationLeftOver(x => x.App, x => x.ShowQuickStartGuide, AVAILABLE_PLUGINS))
|
||||||
wasConfigurationChanged = true;
|
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:
|
// Check for users allowed to added providers:
|
||||||
if(ManagedConfiguration.IsConfigurationLeftOver(x => x.App, x => x.AllowUserToAddProvider, AVAILABLE_PLUGINS))
|
if(ManagedConfiguration.IsConfigurationLeftOver(x => x.App, x => x.AllowUserToAddProvider, AVAILABLE_PLUGINS))
|
||||||
wasConfigurationChanged = true;
|
wasConfigurationChanged = true;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user