(_options =>
{
_options.ViewLocationFormats.Add(@"/Views/Plugins/{1}/{0}" + RazorViewEngine.ViewExtension);
@@ -94,9 +93,9 @@ namespace WebfrontCore
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
- public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
- if (env.IsDevelopment())
+ if (env.EnvironmentName == "Development")
{
app.UseDeveloperExceptionPage();
}
@@ -115,11 +114,10 @@ namespace WebfrontCore
app.UseAuthentication();
app.UseCors("AllowAll");
- app.UseMvc(routes =>
+ app.UseRouting();
+ app.UseEndpoints(endpoints =>
{
- routes.MapRoute(
- name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
+ endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
});
}
}
diff --git a/WebfrontCore/TagHelpers/ColorCode.cs b/WebfrontCore/TagHelpers/ColorCode.cs
index f3f184550..b947e71a4 100644
--- a/WebfrontCore/TagHelpers/ColorCode.cs
+++ b/WebfrontCore/TagHelpers/ColorCode.cs
@@ -17,8 +17,6 @@ namespace WebfrontCore.TagHelpers
output.TagName = "ColorCode";
output.TagMode = TagMode.StartTagAndEndTag;
-
-
if (Allow)
{
var matches = Regex.Matches(Value, @"\^([0-9]|\:)([^\^]*)");
diff --git a/WebfrontCore/Views/Configuration/Index.cshtml b/WebfrontCore/Views/Configuration/Index.cshtml
index f8aafa4d2..4035d736e 100644
--- a/WebfrontCore/Views/Configuration/Index.cshtml
+++ b/WebfrontCore/Views/Configuration/Index.cshtml
@@ -51,9 +51,8 @@
if (property.PropertyType.Name == typeof(System.Boolean).Name)
{
- var attributes = linkedPropertyNames.Length > 0 ? new { htmlAttributes = new { @class = "has-related-content mb-0", data_related_content = string.Join(',', linkedPropertyNames.Select(_id => $"#{_id}_content")) } } : null;
- @Html.Editor(property.Name, attributes)
+ @Html.Editor(property.Name, linkedPropertyNames.Length > 0 ? new { htmlAttributes = new { @class= "has-related-content mb-0", data_related_content = string.Join(',', linkedPropertyNames.Select(_id => $"#{_id}_content")) } } : null)
@Html.Label(property.Name, null, new { @class = "form-check-label ml-1" })
}
diff --git a/WebfrontCore/WebfrontCore.csproj b/WebfrontCore/WebfrontCore.csproj
index 076be9222..20f5ec30d 100644
--- a/WebfrontCore/WebfrontCore.csproj
+++ b/WebfrontCore/WebfrontCore.csproj
@@ -1,10 +1,10 @@
- netcoreapp2.2
- 2.2.2
+ netcoreapp3.0
true
true
+ true
true
2.6
RaidMax.IW4MAdmin.WebfrontCore
@@ -68,18 +68,8 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+