add SiteState.IsPrerendering property back to avoid breaking change. New implementation relies on .NET 8 HttpContext CascadingParameter
This commit is contained in:
parent
5ab2f6ea3a
commit
6b2a5d7777
|
@ -49,6 +49,9 @@
|
|||
[Parameter]
|
||||
public string AuthorizationToken { get; set; }
|
||||
|
||||
[CascadingParameter]
|
||||
HttpContext HttpContext { get; set; }
|
||||
|
||||
private bool _initialized = false;
|
||||
private string _display = "display: none;";
|
||||
private Installation _installation = new Installation { Success = false, Message = "" };
|
||||
|
@ -60,6 +63,7 @@
|
|||
SiteState.RemoteIPAddress = RemoteIPAddress;
|
||||
SiteState.AntiForgeryToken = AntiForgeryToken;
|
||||
SiteState.AuthorizationToken = AuthorizationToken;
|
||||
SiteState.IsPrerendering = (HttpContext != null) ? true : false;
|
||||
|
||||
_installation = await InstallationService.IsInstalled();
|
||||
if (_installation.Alias != null)
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace Oqtane.Shared
|
|||
public string AntiForgeryToken { get; set; } // passed from server for use in service calls on client
|
||||
public string AuthorizationToken { get; set; } // passed from server for use in service calls on client
|
||||
public string RemoteIPAddress { get; set; } // passed from server as cannot be reliably retrieved on client
|
||||
public bool IsPrerendering { get; set; }
|
||||
|
||||
private dynamic _properties;
|
||||
public dynamic Properties => _properties ?? (_properties = new PropertyDictionary());
|
||||
|
|
Loading…
Reference in New Issue
Block a user