updates to make identical to POC - still not working
This commit is contained in:
parent
caa9cc213d
commit
856afcf3bf
|
@ -9,7 +9,7 @@
|
|||
else
|
||||
{
|
||||
<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 {
|
||||
|
|
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())
|
||||
{
|
||||
options.DetailedErrors = false;
|
||||
options.DetailedErrors = true;
|
||||
}
|
||||
}).AddHubOptions(options =>
|
||||
{
|
||||
|
@ -178,13 +178,13 @@ namespace Oqtane
|
|||
|
||||
if (env.IsDevelopment())
|
||||
{
|
||||
app.UseDeveloperExceptionPage();
|
||||
app.UseWebAssemblyDebugging();
|
||||
app.UseForwardedHeaders();
|
||||
}
|
||||
else
|
||||
{
|
||||
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.
|
||||
app.UseHsts();
|
||||
}
|
||||
|
@ -210,18 +210,23 @@ namespace Oqtane
|
|||
app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/" + Constants.Version + "/swagger.json", Constants.PackageId + " " + Constants.Version); });
|
||||
}
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
endpoints.MapRazorPages();
|
||||
});
|
||||
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapRazorComponents<App>()
|
||||
.AddInteractiveServerRenderMode()
|
||||
.AddInteractiveWebAssemblyRenderMode();
|
||||
.AddInteractiveWebAssemblyRenderMode()
|
||||
.AddAdditionalAssemblies(typeof(SiteRouter).Assembly);
|
||||
});
|
||||
|
||||
// simulate the fallback routing approach of traditional Blazor - allowing the custom SiteRouter to handle all routing concerns
|
||||
app.UseEndpoints(endpoints =>
|
||||
{
|
||||
endpoints.MapControllers();
|
||||
endpoints.MapRazorPages();
|
||||
endpoints.MapFallback();
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user