This repository has been archived on 2025-05-14. You can view files and clone it, but cannot push or open issues or pull requests.

35 lines
770 B
Plaintext

@using Oqtane.Shared
@using Oqtane.Client.Shared
@using Oqtane.Services
@inject IInstallationService InstallationService
@if (!Installed)
{
<Installer Installed="@Installed" />
}
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;
StateHasChanged();
}
}