updates to make identical to POC - still not working
This commit is contained in:
parent
caa9cc213d
commit
856afcf3bf
|
@ -9,7 +9,7 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
<div>Render Mode: @ModuleState.RenderMode</div><br />
|
<div>Render Mode: @ModuleState.RenderMode</div><br />
|
||||||
<RenderModeBoundary ModuleState="@ModuleState" PageState="@PageState" SiteState="@SiteState" @rendermode="InteractiveRenderMode.GetInteractiveRenderMode(PageState.Site.Runtime, PageState.Site.Prerender)" />
|
<RenderModeBoundary ModuleState="@ModuleState" PageState="@PageState" SiteState="@SiteState" @rendermode="@InteractiveRenderMode.GetInteractiveRenderMode(PageState.Site.Runtime, PageState.Site.Prerender)" />
|
||||||
}
|
}
|
||||||
|
|
||||||
@code {
|
@code {
|
||||||
|
|
29
Oqtane.Server/Components/_Imports.razor
Normal file
29
Oqtane.Server/Components/_Imports.razor
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
@using System
|
||||||
|
@using System.Linq
|
||||||
|
@using System.Collections.Generic
|
||||||
|
@using System.Net.Http
|
||||||
|
@using System.Net.Http.Json
|
||||||
|
|
||||||
|
@using Microsoft.AspNetCore.Components.Authorization
|
||||||
|
@using Microsoft.AspNetCore.Components.Forms
|
||||||
|
@using Microsoft.AspNetCore.Components.Routing
|
||||||
|
@using Microsoft.AspNetCore.Components.Web
|
||||||
|
@using Microsoft.AspNetCore.Components.Web.Virtualization
|
||||||
|
@using Microsoft.Extensions.Localization
|
||||||
|
@using Microsoft.JSInterop
|
||||||
|
@using static Microsoft.AspNetCore.Components.Web.RenderMode
|
||||||
|
|
||||||
|
@using Oqtane.Client
|
||||||
|
@using Oqtane.Models
|
||||||
|
@using Oqtane.Modules
|
||||||
|
@using Oqtane.Modules.Controls
|
||||||
|
@using Oqtane.Providers
|
||||||
|
@using Oqtane.Security
|
||||||
|
@using Oqtane.Services
|
||||||
|
@using Oqtane.Shared
|
||||||
|
@using Oqtane.Themes
|
||||||
|
@using Oqtane.Themes.Controls
|
||||||
|
@using Oqtane.UI
|
||||||
|
@using Oqtane.Enums
|
||||||
|
@using Oqtane.Installer
|
||||||
|
@using Oqtane.Interfaces
|
|
@ -151,7 +151,7 @@ namespace Oqtane
|
||||||
{
|
{
|
||||||
if (_env.IsDevelopment())
|
if (_env.IsDevelopment())
|
||||||
{
|
{
|
||||||
options.DetailedErrors = false;
|
options.DetailedErrors = true;
|
||||||
}
|
}
|
||||||
}).AddHubOptions(options =>
|
}).AddHubOptions(options =>
|
||||||
{
|
{
|
||||||
|
@ -178,13 +178,13 @@ namespace Oqtane
|
||||||
|
|
||||||
if (env.IsDevelopment())
|
if (env.IsDevelopment())
|
||||||
{
|
{
|
||||||
app.UseDeveloperExceptionPage();
|
|
||||||
app.UseWebAssemblyDebugging();
|
app.UseWebAssemblyDebugging();
|
||||||
app.UseForwardedHeaders();
|
app.UseForwardedHeaders();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
app.UseForwardedHeaders();
|
app.UseForwardedHeaders();
|
||||||
|
app.UseExceptionHandler("/Error", createScopeForErrors: true);
|
||||||
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
// The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
|
||||||
app.UseHsts();
|
app.UseHsts();
|
||||||
}
|
}
|
||||||
|
@ -210,18 +210,23 @@ namespace Oqtane
|
||||||
app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/" + Constants.Version + "/swagger.json", Constants.PackageId + " " + Constants.Version); });
|
app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/" + Constants.Version + "/swagger.json", Constants.PackageId + " " + Constants.Version); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
app.UseEndpoints(endpoints =>
|
||||||
|
{
|
||||||
|
endpoints.MapControllers();
|
||||||
|
endpoints.MapRazorPages();
|
||||||
|
});
|
||||||
|
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
{
|
{
|
||||||
endpoints.MapRazorComponents<App>()
|
endpoints.MapRazorComponents<App>()
|
||||||
.AddInteractiveServerRenderMode()
|
.AddInteractiveServerRenderMode()
|
||||||
.AddInteractiveWebAssemblyRenderMode();
|
.AddInteractiveWebAssemblyRenderMode()
|
||||||
|
.AddAdditionalAssemblies(typeof(SiteRouter).Assembly);
|
||||||
});
|
});
|
||||||
|
|
||||||
// simulate the fallback routing approach of traditional Blazor - allowing the custom SiteRouter to handle all routing concerns
|
// simulate the fallback routing approach of traditional Blazor - allowing the custom SiteRouter to handle all routing concerns
|
||||||
app.UseEndpoints(endpoints =>
|
app.UseEndpoints(endpoints =>
|
||||||
{
|
{
|
||||||
endpoints.MapControllers();
|
|
||||||
endpoints.MapRazorPages();
|
|
||||||
endpoints.MapFallback();
|
endpoints.MapFallback();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user