diff --git a/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs b/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs index ca8bdcc5e..a7ed32357 100644 --- a/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs +++ b/src/Squidex/Areas/Api/Controllers/UI/MyUIOptions.cs @@ -13,8 +13,12 @@ namespace Squidex.Areas.Api.Controllers.UI { public Dictionary RegexSuggestions { get; set; } + public Dictionary More { get; set; } = new Dictionary(); + public MapOptions Map { get; set; } + public bool ShowInfo { get; set; } + public bool HideNews { get; set; } public bool HideOnboarding { get; set; } diff --git a/src/Squidex/Areas/Frontend/Middlewares/IndexExtensions.cs b/src/Squidex/Areas/Frontend/Middlewares/IndexExtensions.cs index 518bb7ae9..cf283c1ba 100644 --- a/src/Squidex/Areas/Frontend/Middlewares/IndexExtensions.cs +++ b/src/Squidex/Areas/Frontend/Middlewares/IndexExtensions.cs @@ -9,9 +9,9 @@ using System; using Microsoft.AspNetCore.Http; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; -using Newtonsoft.Json; using Squidex.Areas.Api.Controllers.UI; using Squidex.Infrastructure.Json; +using Squidex.Web; namespace Squidex.Areas.Frontend.Middlewares { @@ -45,6 +45,13 @@ namespace Squidex.Areas.Frontend.Middlewares if (uiOptions != null) { + var values = httpContext.RequestServices.GetService(); + + if (values != null) + { + uiOptions.More["info"] = values.ToString(); + } + var jsonSerializer = httpContext.RequestServices.GetRequiredService(); var jsonOptions = jsonSerializer.Serialize(uiOptions, false); diff --git a/src/Squidex/WebStartup.cs b/src/Squidex/WebStartup.cs index 6bc48e67d..0ad0d7642 100644 --- a/src/Squidex/WebStartup.cs +++ b/src/Squidex/WebStartup.cs @@ -94,6 +94,8 @@ namespace Squidex config.GetSection("usage")); services.Configure( config.GetSection("rebuild")); + services.Configure( + config.GetSection("exposedConfiguration")); services.Configure( config.GetSection("contentsController")); diff --git a/src/Squidex/app/features/apps/pages/apps-page.component.html b/src/Squidex/app/features/apps/pages/apps-page.component.html index 38eb2d9d3..2a02152a8 100644 --- a/src/Squidex/app/features/apps/pages/apps-page.component.html +++ b/src/Squidex/app/features/apps/pages/apps-page.component.html @@ -100,6 +100,8 @@ +
{{info}}
+ diff --git a/src/Squidex/app/features/apps/pages/apps-page.component.scss b/src/Squidex/app/features/apps/pages/apps-page.component.scss index af1a2f69f..ca1de18bf 100644 --- a/src/Squidex/app/features/apps/pages/apps-page.component.scss +++ b/src/Squidex/app/features/apps/pages/apps-page.component.scss @@ -89,4 +89,11 @@ .deeplinks { display: none; } +} + +.info { + color: $color-border-dark; + padding: 2rem; + padding-left: $size-sidebar-width + .25rem; + font-size: .8rem; } \ No newline at end of file diff --git a/src/Squidex/app/features/apps/pages/apps-page.component.ts b/src/Squidex/app/features/apps/pages/apps-page.component.ts index f51a6a7d3..1c73760fd 100644 --- a/src/Squidex/app/features/apps/pages/apps-page.component.ts +++ b/src/Squidex/app/features/apps/pages/apps-page.component.ts @@ -35,6 +35,8 @@ export class AppsPageComponent implements OnInit { public newsFeatures: FeatureDto[]; public newsDialog = new DialogModel(); + public info: string; + constructor( public readonly appsState: AppsState, public readonly authState: AuthService, @@ -44,6 +46,9 @@ export class AppsPageComponent implements OnInit { private readonly onboardingService: OnboardingService, private readonly uiOptions: UIOptions ) { + if (uiOptions.get('showInfo')) { + this.info = uiOptions.get('more.info'); + } } public ngOnInit() { diff --git a/src/Squidex/appsettings.json b/src/Squidex/appsettings.json index 1f60a272f..f66f73f51 100644 --- a/src/Squidex/appsettings.json +++ b/src/Squidex/appsettings.json @@ -78,7 +78,11 @@ /* * Hide all onboarding tooltips and dialogs. */ - "hideOnboarding": false + "hideOnboarding": false, + /* + * Show the exposed values as information on the apps overview page. + */ + "showInfo": false }, "email": { @@ -485,7 +489,7 @@ "indexes": false }, - /* + /*" * A list of configuration valeus that should be exposed from the info endpoint and in the UI. */ "exposedConfiguration": {