move stylesheet injection to App component to eliminate FOUC on static rendering
This commit is contained in:
@ -32,8 +32,8 @@ namespace Oqtane.Models
|
||||
PathAndQuery = uri.PathAndQuery;
|
||||
AliasPath = aliaspath;
|
||||
PagePath = AbsolutePath;
|
||||
ModuleId = "";
|
||||
Action = "";
|
||||
ModuleId = "-1";
|
||||
Action = Constants.DefaultAction;
|
||||
UrlParameters = "";
|
||||
|
||||
if (AliasPath.Length != 0 && PagePath.StartsWith("/" + AliasPath))
|
||||
@ -50,6 +50,7 @@ namespace Oqtane.Models
|
||||
if (pos != -1)
|
||||
{
|
||||
ModuleId = PagePath.Substring(pos + 3);
|
||||
ModuleId = (int.TryParse(ModuleId, out _)) ? ModuleId : "-1";
|
||||
PagePath = PagePath.Substring(0, pos);
|
||||
}
|
||||
if (ModuleId.Length != 0)
|
||||
@ -57,8 +58,10 @@ namespace Oqtane.Models
|
||||
pos = ModuleId.IndexOf("/");
|
||||
if (pos != -1)
|
||||
{
|
||||
Action = ModuleId.Substring(pos + 1);
|
||||
Action = ModuleId.Substring(pos + 1);
|
||||
Action = (!string.IsNullOrEmpty(Action)) ? Action : Constants.DefaultAction;
|
||||
ModuleId = ModuleId.Substring(0, pos);
|
||||
ModuleId = (int.TryParse(ModuleId, out _)) ? ModuleId : "-1";
|
||||
}
|
||||
}
|
||||
if (PagePath.StartsWith("/"))
|
||||
|
Reference in New Issue
Block a user