From 289034fd4f36dfd5809ac606fcd38247ae2e0342 Mon Sep 17 00:00:00 2001 From: Shaun Walker Date: Fri, 17 Sep 2021 08:48:01 -0400 Subject: [PATCH] fix #1640 - prevent UX "flicker" which was caused by pre-rendering --- Oqtane.Client/App.razor | 43 ++++++++++++++++++++------------ Oqtane.Server/Pages/_Host.cshtml | 2 +- 2 files changed, 28 insertions(+), 17 deletions(-) diff --git a/Oqtane.Client/App.razor b/Oqtane.Client/App.razor index ccb64327..6d0a3bf5 100644 --- a/Oqtane.Client/App.razor +++ b/Oqtane.Client/App.razor @@ -4,31 +4,40 @@ @if (_initialized) { - @if (!_installation.Success) - { - - } - else - { - @if (string.IsNullOrEmpty(_installation.Message)) +
+ @if (!_installation.Success) { - - - - - + } else { -
- @_installation.Message -
+ @if (string.IsNullOrEmpty(_installation.Message)) + { + + + + + + } + else + { +
+ @_installation.Message +
+ } } - } +
} @code { + [Parameter] + public string Runtime { get; set; } + + [Parameter] + public string RenderMode { get; set; } + private bool _initialized = false; + private string _display = "display: none;"; private Installation _installation = new Installation { Success = false, Message = "" }; private PageState PageState { get; set; } @@ -53,6 +62,8 @@ { var interop = new Interop(JSRuntime); SiteState.AntiForgeryToken = await interop.GetElementByName(Constants.RequestVerificationToken); + _display = ""; + StateHasChanged(); } } diff --git a/Oqtane.Server/Pages/_Host.cshtml b/Oqtane.Server/Pages/_Host.cshtml index cfd3b78c..10c13f5b 100644 --- a/Oqtane.Server/Pages/_Host.cshtml +++ b/Oqtane.Server/Pages/_Host.cshtml @@ -20,7 +20,7 @@ @(Html.AntiForgeryToken()) - +