mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
37 lines
1.1 KiB
Plaintext
37 lines
1.1 KiB
Plaintext
@page "/"
|
|
@inject IDataService DataService
|
|
|
|
<AuthorizeView>
|
|
<NotAuthorized>
|
|
<div class="jumbotron">
|
|
<h3 class="display-4">Remotely</h3>
|
|
<p class="lead">
|
|
An open-source remote support solution.
|
|
</p>
|
|
<hr class="my-4">
|
|
<p class="lead">
|
|
<a class="btn btn-primary btn-lg me-2" href="Account/Login" role="button">Log In</a>
|
|
|
|
@if (_isRegistrationEnabled)
|
|
{
|
|
<a class="btn btn-primary btn-lg" href="Account/Register" role="button">Register</a>
|
|
}
|
|
</p>
|
|
</div>
|
|
</NotAuthorized>
|
|
<Authorized>
|
|
<AuthorizedIndex />
|
|
</Authorized>
|
|
</AuthorizeView>
|
|
|
|
@code
|
|
{
|
|
private bool _isRegistrationEnabled;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
var settings = await DataService.GetSettings();
|
|
_isRegistrationEnabled = settings.MaxOrganizationCount < 0 || DataService.GetOrganizationCount() < settings.MaxOrganizationCount;
|
|
await base.OnInitializedAsync();
|
|
}
|
|
} |