RT state managment and rectangle support

This commit is contained in:
2026-02-16 16:14:25 +01:00
parent 0f0418dee3
commit d9caeb2209
21 changed files with 459 additions and 5 deletions

View File

@@ -3,6 +3,7 @@ import {
HubConnectionBuilder,
HubConnectionState,
} from "@microsoft/signalr";
import {useAuthStore} from "@/stores/auth.ts";
export class SignalRService {
private connection: HubConnection;
@@ -10,8 +11,12 @@ export class SignalRService {
constructor(
hubUrl: string,
) {
const authStore = useAuthStore();
this.connection = new HubConnectionBuilder()
.withUrl(hubUrl)
.withUrl(hubUrl, {
accessTokenFactory: () => authStore.accessToken!
})
.withAutomaticReconnect()
.build();
}