Install Wizard
This commit is contained in:
@ -1,15 +1,31 @@
|
||||
@using Oqtane.Shared
|
||||
@using Oqtane.Client.Shared
|
||||
@using Oqtane.Services
|
||||
@inject IInstallationService InstallationService
|
||||
|
||||
<CascadingAuthenticationState>
|
||||
<CascadingValue Value="@PageState">
|
||||
<SiteRouter OnStateChange="@ChangeState" />
|
||||
</CascadingValue>
|
||||
</CascadingAuthenticationState>
|
||||
@if (!Installed)
|
||||
{
|
||||
<Installer />
|
||||
}
|
||||
else
|
||||
{
|
||||
<CascadingAuthenticationState>
|
||||
<CascadingValue Value="@PageState">
|
||||
<SiteRouter OnStateChange="@ChangeState" />
|
||||
</CascadingValue>
|
||||
</CascadingAuthenticationState>
|
||||
}
|
||||
|
||||
@code {
|
||||
private bool Installed = false;
|
||||
private PageState PageState { get; set; }
|
||||
|
||||
protected override async Task OnInitAsync()
|
||||
{
|
||||
var response = await InstallationService.IsInstalled();
|
||||
Installed = response.Success;
|
||||
}
|
||||
|
||||
private void ChangeState(PageState pagestate)
|
||||
{
|
||||
PageState = pagestate;
|
||||
|
Reference in New Issue
Block a user