mirror of
https://github.com/spacebarchat/server.git
synced 2026-05-15 18:15:24 +00:00
28 lines
825 B
Plaintext
28 lines
825 B
Plaintext
@* Workaround for Rider "Bad compile constant value" bug *@
|
|
@attribute [Route(PageUri)]
|
|
@using ArcaneLibs.Blazor.Components.Services
|
|
@using Spacebar.Client.Core
|
|
@using Spacebar.Models.Gateway
|
|
@inject JsConsoleService jsConsole
|
|
|
|
<h3>@@me</h3>
|
|
<p>@Client?.ApiHttpClient.BaseAddress</p>
|
|
<p>@Client?.Gateway.RawClientWebSocket.State</p>
|
|
|
|
@code {
|
|
private const string PageUri = "/channels/@me";
|
|
|
|
[Parameter, CascadingParameter]
|
|
public required AuthenticatedSpacebarClient? Client {
|
|
get;
|
|
set { field = value; Console.WriteLine("Set client: " + value); }
|
|
}
|
|
|
|
protected override async Task OnParametersSetAsync() {
|
|
if (Client == null) return;
|
|
Client.Gateway.OnGatewayMessage.Add(async msg => {
|
|
await jsConsole.Log("Received gateway message: ", msg);
|
|
});
|
|
}
|
|
|
|
} |