40 lines
892 B
Plaintext
40 lines
892 B
Plaintext
@using Oqtane.Shared
|
|
@using Oqtane.Client.Shared
|
|
@using Oqtane.Services
|
|
@inject IInstallationService InstallationService
|
|
|
|
@if (Initialized)
|
|
{
|
|
@if (!Installed)
|
|
{
|
|
<Installer />
|
|
}
|
|
else
|
|
{
|
|
<CascadingAuthenticationState>
|
|
<CascadingValue Value="@PageState">
|
|
<SiteRouter OnStateChange="@ChangeState" />
|
|
</CascadingValue>
|
|
</CascadingAuthenticationState>
|
|
}
|
|
}
|
|
|
|
@code {
|
|
private bool Initialized = false;
|
|
private bool Installed = false;
|
|
private PageState PageState { get; set; }
|
|
|
|
protected override async Task OnParametersSetAsync()
|
|
{
|
|
var response = await InstallationService.IsInstalled();
|
|
Installed = response.Success;
|
|
Initialized = true;
|
|
}
|
|
|
|
private void ChangeState(PageState pagestate)
|
|
{
|
|
PageState = pagestate;
|
|
StateHasChanged();
|
|
}
|
|
}
|