Skip to content

Commit

Permalink
fix .NET MAUI integration
Browse files Browse the repository at this point in the history
  • Loading branch information
sbwalker committed Jan 31, 2024
1 parent c5de567 commit c66982c
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
5 changes: 4 additions & 1 deletion Oqtane.Client/Routes.razor
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div style="@_display">
<CascadingAuthenticationState>
<CascadingValue Value="@PageState">
<SiteRouter Runtime="Web" RenderMode="@RenderMode" VisitorId="@VisitorId" OnStateChange="@ChangeState" />
<SiteRouter Runtime="@Runtime" RenderMode="@RenderMode" VisitorId="@VisitorId" OnStateChange="@ChangeState" />
</CascadingValue>
</CascadingAuthenticationState>
</div>
Expand All @@ -34,6 +34,9 @@
[Parameter]
public string AntiForgeryToken { get; set; }

[Parameter]
public string Runtime { get; set; }

[Parameter]
public string RenderMode { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Client/UI/SiteRouter.razor
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@
Action = action,
EditMode = editmode,
LastSyncDate = lastsyncdate,
Runtime = Shared.Runtime.Hybrid,
Runtime = (Shared.Runtime)Enum.Parse(typeof(Shared.Runtime), Runtime),
RenderMode = RenderMode,
VisitorId = VisitorId,
RemoteIPAddress = SiteState.RemoteIPAddress,
Expand Down
2 changes: 1 addition & 1 deletion Oqtane.Maui/Main.razor
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ else
}

@code {
Type ComponentType = Type.GetType("Oqtane.App, Oqtane.Client");
Type ComponentType = Type.GetType("Oqtane.Routes, Oqtane.Client");
private IDictionary<string, object> Parameters { get; set; }
private string message = "";

Expand Down
4 changes: 2 additions & 2 deletions Oqtane.Server/Components/App.razor
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@
{
@if (_renderMode == RenderModes.StaticServer)
{
<Routes AntiForgeryToken="@_antiForgeryToken" RenderMode="@_renderMode" VisitorId="@_visitorId" RemoteIPAddress="@_remoteIPAddress" AuthorizationToken="@_authorizationToken" />
<Routes AntiForgeryToken="@_antiForgeryToken" Runtime="Web" RenderMode="@_renderMode" VisitorId="@_visitorId" RemoteIPAddress="@_remoteIPAddress" AuthorizationToken="@_authorizationToken" />
}
else
{
<Routes AntiForgeryToken="@_antiForgeryToken" RenderMode="@_renderMode" VisitorId="@_visitorId" RemoteIPAddress="@_remoteIPAddress" AuthorizationToken="@_authorizationToken" @rendermode="@RenderMode.GetInteractiveRenderMode((_renderMode), _prerender)" />
<Routes AntiForgeryToken="@_antiForgeryToken" Runtime="Web" RenderMode="@_renderMode" VisitorId="@_visitorId" RemoteIPAddress="@_remoteIPAddress" AuthorizationToken="@_authorizationToken" @rendermode="@RenderMode.GetInteractiveRenderMode((_renderMode), _prerender)" />
}

<script src="js/interop.js"></script>
Expand Down

0 comments on commit c66982c

Please sign in to comment.