- Move all Launcher components to LANCommander.Launcher.UI namespace - Move all SCSS files next to components (when possible) - Refactor styles that control overflow of content into titlebar to MainWindow only - Remove use in launcher UI of SDK.Client
24 lines
No EOL
749 B
Text
24 lines
No EOL
749 B
Text
@namespace LANCommander.Launcher.UI
|
|
@inject IConnectionClient ConnectionClient
|
|
|
|
@if (ConnectionClient.IsConnected() || ConnectionClient.IsOfflineMode())
|
|
{
|
|
@Authenticated
|
|
}
|
|
else
|
|
{
|
|
@NotAuthenticated
|
|
}
|
|
|
|
@code {
|
|
[Parameter] public RenderFragment Authenticated { get; set; }
|
|
[Parameter] public RenderFragment NotAuthenticated { get; set; }
|
|
[Parameter] public bool NoAutoValidate { get; set; }
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
ConnectionClient.OnConnect += (sender, args) => InvokeAsync(StateHasChanged);
|
|
ConnectionClient.OnDisconnect += (sender, args) => InvokeAsync(StateHasChanged);
|
|
ConnectionClient.OnOfflineModeEnabled += (sender, args) => InvokeAsync(StateHasChanged);
|
|
}
|
|
} |