From 70a2f9cc4e910fb8c7909f3b9dc6e7ab0a511f2e Mon Sep 17 00:00:00 2001 From: Elijah R Date: Sun, 7 Apr 2024 14:39:38 -0400 Subject: [PATCH] allow the client to request its preferred username even if webapp-wide auth is enabled since some VMs might not support auth --- src/ts/main.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ts/main.ts b/src/ts/main.ts index b863f26..27df705 100644 --- a/src/ts/main.ts +++ b/src/ts/main.ts @@ -429,7 +429,7 @@ async function openVM(vm: VM): Promise { // Connect to node chatMessage('', `${vm.id}
`); - let username = Config.Auth.Enabled ? null : localStorage.getItem('username'); + let username = Config.Auth.Enabled ? (auth!.account?.username ?? null) : localStorage.getItem('username'); let connected = await VM.connect(vm.id, username); elements.adminInputVMID.value = vm.id; w.VMName = vm.id;