@foreach (var control in area.controls)
{
- if (control != null && control.editor != null && control.editor.view != null)
+ if (control?.editor?.view != null)
{
@await Html.PartialAsync("grid/editors/base", (object)control)
}
diff --git a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/base.cshtml b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/base.cshtml
index eca6381..e40543b 100644
--- a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/base.cshtml
+++ b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/base.cshtml
@@ -3,7 +3,7 @@
@try
{
string editor = EditorView(Model);
-
@await Html.PartialAsync(editor, (object)Model)
+
@await Html.PartialAsync(editor, Model as object)
}
catch (Exception ex)
{
@@ -15,7 +15,7 @@ catch (Exception ex)
public static string EditorView(dynamic contentItem)
{
string view = contentItem.editor.render != null ? contentItem.editor.render.ToString() : contentItem.editor.view.ToString();
- view = view.ToLower().Replace(".html", ".cshtml");
+ view = view.Replace(".html", ".cshtml");
if (!view.Contains("/"))
{
diff --git a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/embed.cshtml b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/embed.cshtml
index a383046..74c8fe2 100644
--- a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/embed.cshtml
+++ b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/embed.cshtml
@@ -1,10 +1,11 @@
-@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
+@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
-@{
- string embedValue = Convert.ToString(Model.value);
- embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value;
-}
+@if (Model is not null)
+{
+ string embedValue = Convert.ToString(Model.value);
+ embedValue = embedValue.DetectIsJson() ? Model.value.preview : Model.value;
-
- @Html.Raw(embedValue)
-
+
+ @Html.Raw(embedValue)
+
+}
diff --git a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/macro.cshtml b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/macro.cshtml
index 0e9661e..a4450d1 100644
--- a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/macro.cshtml
+++ b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/macro.cshtml
@@ -1,6 +1,6 @@
@inherits Umbraco.Cms.Web.Common.Views.UmbracoViewPage
-@if (Model.value != null)
+@if (Model?.value is not null)
{
string macroAlias = Model.value.macroAlias.ToString();
var parameters = new Dictionary();
diff --git a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/media.cshtml b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/media.cshtml
index 4cc31d0..bc3b111 100644
--- a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/media.cshtml
+++ b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/media.cshtml
@@ -2,7 +2,8 @@
@using Umbraco.Cms.Core.Media
@using Umbraco.Cms.Core.PropertyEditors.ValueConverters
@inject IImageUrlGenerator ImageUrlGenerator
-@if (Model.value != null)
+
+@if (Model?.value is not null)
{
var url = Model.value.image;
diff --git a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/rte.cshtml b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/rte.cshtml
index e14c6e1..9445666 100644
--- a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/rte.cshtml
+++ b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/rte.cshtml
@@ -5,7 +5,7 @@
@inject HtmlImageSourceParser HtmlImageSourceParser;
@{
- var value = HtmlLocalLinkParser.EnsureInternalLinks(Model.value.ToString());
+ var value = HtmlLocalLinkParser.EnsureInternalLinks(Model?.value.ToString());
value = HtmlUrlParser.EnsureUrls(value);
value = HtmlImageSourceParser.EnsureImageSources(value);
}
diff --git a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/textstring.cshtml b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/textstring.cshtml
index 42972f6..e6b9352 100644
--- a/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/textstring.cshtml
+++ b/src/FeatureManagement.ExampleWeb/Views/Partials/grid/editors/textstring.cshtml
@@ -1,7 +1,6 @@
-@using System.Web
@model dynamic
-@if (Model.editor.config.markup != null)
+@if (Model?.editor.config.markup is not null)
{
string markup = Model.editor.config.markup.ToString();
markup = markup.Replace("#value#", Html.ReplaceLineBreaks((string)Model.value.ToString()).ToString());
@@ -18,6 +17,6 @@
else
{
- @Model.value
+ @Model?.value
}
diff --git a/src/FeatureManagement.ExampleWeb/Views/_ViewImports.cshtml b/src/FeatureManagement.ExampleWeb/Views/_ViewImports.cshtml
index 97ed030..541ba3d 100644
--- a/src/FeatureManagement.ExampleWeb/Views/_ViewImports.cshtml
+++ b/src/FeatureManagement.ExampleWeb/Views/_ViewImports.cshtml
@@ -7,4 +7,4 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Microsoft.FeatureManagement.AspNetCore
@addTagHelper *, Smidge
-@inject Smidge.SmidgeHelper SmidgeHelper
+@inject Smidge.SmidgeHelper SmidgeHelper
\ No newline at end of file
diff --git a/src/FeatureManagement.ExampleWeb/appsettings.Development.json b/src/FeatureManagement.ExampleWeb/appsettings.Development.json
index 13d5c48..0c279af 100644
--- a/src/FeatureManagement.ExampleWeb/appsettings.Development.json
+++ b/src/FeatureManagement.ExampleWeb/appsettings.Development.json
@@ -1,5 +1,5 @@
{
- "$schema": "./umbraco/config/appsettings-schema.json",
+ "$schema": "appsettings-schema.json",
"Serilog": {
"MinimumLevel": {
"Default": "Information"
@@ -25,19 +25,12 @@
"Content": {
"MacroErrors": "Throw"
},
- "Global": {
- "Smtp": {
- "From": "your@email.here",
- "Host": "localhost",
- "Port": 25
- }
- },
"Hosting": {
"Debug": true
},
"RuntimeMinification": {
- "useInMemoryCache": true,
- "cacheBuster": "Timestamp"
+ "UseInMemoryCache": true,
+ "CacheBuster": "Timestamp"
}
}
}
diff --git a/src/FeatureManagement.ExampleWeb/appsettings.json b/src/FeatureManagement.ExampleWeb/appsettings.json
index 1e1c5c7..348f793 100644
--- a/src/FeatureManagement.ExampleWeb/appsettings.json
+++ b/src/FeatureManagement.ExampleWeb/appsettings.json
@@ -1,5 +1,5 @@
{
- "$schema": "./umbraco/config/appsettings-schema.json",
+ "$schema": "appsettings-schema.json",
"Serilog": {
"MinimumLevel": {
"Default": "Information",
@@ -10,24 +10,17 @@
}
}
},
- "ConnectionStrings": {
- "umbracoDbDSN": ""
- },
"Umbraco": {
"CMS": {
- "Hosting": {
- "Debug": false
+ "Global": {
+ "Id": "26848e4a-acc6-434e-b673-9c09763e3fbb",
+ "SanitizeTinyMce": true
},
"Content": {
+ "AllowEditInvariantFromNonDefault": true,
"ContentVersionCleanupPolicy": {
"EnableCleanup": true
}
- },
- "ModelsBuilder": {
- "ModelsMode": "Nothing"
- },
- "Global": {
- "Id": "af261308-8c62-4525-8e66-654a78200a3d"
}
}
},
diff --git a/src/Module.FeaturesManagementDashboard.Application/FeaturesManagementDashboard.Application.csproj b/src/Module.FeaturesManagementDashboard.Application/FeaturesManagementDashboard.Application.csproj
index 3119f48..801caf5 100644
--- a/src/Module.FeaturesManagementDashboard.Application/FeaturesManagementDashboard.Application.csproj
+++ b/src/Module.FeaturesManagementDashboard.Application/FeaturesManagementDashboard.Application.csproj
@@ -4,8 +4,8 @@
-
-
+
+
diff --git a/src/Module.FeaturesManagementDashboard.Infrastructure/FeaturesManagementDashboard.Infrastructure.csproj b/src/Module.FeaturesManagementDashboard.Infrastructure/FeaturesManagementDashboard.Infrastructure.csproj
index bc7eea4..cbeb3f0 100644
--- a/src/Module.FeaturesManagementDashboard.Infrastructure/FeaturesManagementDashboard.Infrastructure.csproj
+++ b/src/Module.FeaturesManagementDashboard.Infrastructure/FeaturesManagementDashboard.Infrastructure.csproj
@@ -8,13 +8,15 @@
-
-
-
-
+
+
+
+
+
+
diff --git a/src/Module.FeaturesManagementDashboard.Infrastructure/Repositories/UmbracoFeatureRepository.cs b/src/Module.FeaturesManagementDashboard.Infrastructure/Repositories/UmbracoFeatureRepository.cs
index 3d175e9..42bb613 100644
--- a/src/Module.FeaturesManagementDashboard.Infrastructure/Repositories/UmbracoFeatureRepository.cs
+++ b/src/Module.FeaturesManagementDashboard.Infrastructure/Repositories/UmbracoFeatureRepository.cs
@@ -74,6 +74,7 @@ public async ValueTask> GetAllAsync()
}
catch (Exception)
{
+ // ignored
}
return Enumerable.Empty();
@@ -96,6 +97,7 @@ public async ValueTask GetAsync(FeatureId featureId)
}
catch (Exception)
{
+ // ignored
}
return null;
@@ -122,6 +124,7 @@ public async ValueTask SaveAsync(Feature feature)
}
catch (Exception)
{
+ // ignored
}
}
}
diff --git a/src/Module.FeaturesManagementDashboard/FeaturesManagementDashboard.csproj b/src/Module.FeaturesManagementDashboard/FeaturesManagementDashboard.csproj
index ea9e6de..444e218 100644
--- a/src/Module.FeaturesManagementDashboard/FeaturesManagementDashboard.csproj
+++ b/src/Module.FeaturesManagementDashboard/FeaturesManagementDashboard.csproj
@@ -4,8 +4,8 @@
.
Our.Umbraco.FeaturesManagementDashboard
Our.Umbraco.FeaturesManagementDashboard
- Feature Management dashboard for Umbraco 9/10. This package adds feature management dashboard into **Umbraco** backoffice. It use as feature management the Microsoft Feature Flags engine
- Feature Management dashboard for Umbraco 9/10
+ Feature Management dashboard for Umbraco 9/10/11. This package adds feature management dashboard into **Umbraco** backoffice. It use as feature management the Microsoft Feature Flags engine
+ Feature Management dashboard for Umbraco 9/10/11
umbraco plugin package feature management toggle
Adrian Ochmann, Marcin Zajkowski
@@ -26,13 +26,13 @@
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/src/Shared/Shared.csproj b/src/Shared/Shared.csproj
index 1c3989f..e9562c6 100644
--- a/src/Shared/Shared.csproj
+++ b/src/Shared/Shared.csproj
@@ -4,9 +4,9 @@
-
-
-
+
+
+