feat(network): integrate NetBird clients, profiles and private backups

This commit is contained in:
DCCONSTRUCTIONS
2026-11-04 00:42:25 +03:00
parent 1e77b198cb
commit 2c0a10b687
47 changed files with 2721 additions and 82 deletions
+7
View File
@@ -43,3 +43,10 @@ export async function loginFromLaunch(): Promise<void> {
if (location.hash) history.replaceState(null, "", location.pathname);
if (token) await request("/api/session", "POST", { token });
}
export function openNetworkLogin(url:string):void {
const parsed=new URL(url);if(parsed.protocol!=="https:"||!parsed.pathname.startsWith("/oauth2/")||parsed.username||parsed.password)return;
const host=window as Window & {webkit?:{messageHandlers?:{node?:{postMessage:(message:string)=>void}}}};
if(host.webkit?.messageHandlers?.node)host.webkit.messageHandlers.node.postMessage(JSON.stringify({action:"netbird-login",url}));
else window.open(url,"_blank","noopener,noreferrer");
}