web/app: add another hack to detect wails properly

This commit is contained in:
Tulir Asokan 2024-12-01 22:12:40 +02:00
parent c6f8d55201
commit 0d25f746a4

View file

@ -26,7 +26,7 @@ import { LightboxWrapper } from "./ui/modal/Lightbox.tsx"
import { useEventAsState } from "./util/eventdispatcher.ts"
function makeRPCClient(): RPCClient {
if (window.wails || window._wails) {
if (window.wails || window._wails || navigator.userAgent.includes("wails.io")) {
return new WailsClient()
}
return new WSClient("_gomuks/websocket")