mirror of
https://github.com/netbirdio/dashboard.git
synced 2026-09-23 00:30:43 -07:00
Compare commits
2
Commits
main
...
wasm-device-name
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3b077d096 | ||
|
|
f7c0cc2a5d |
No files matched your search
@@ -160,7 +160,7 @@ export const useNetBirdClient = () => {
|
||||
}, []);
|
||||
|
||||
const connect = useCallback(
|
||||
async (privateKey: string): Promise<boolean> => {
|
||||
async (privateKey: string, deviceName?: string): Promise<boolean> => {
|
||||
await initialize();
|
||||
|
||||
if (typeof (window as any).NetBirdClient !== "function") {
|
||||
@@ -178,6 +178,10 @@ export const useNetBirdClient = () => {
|
||||
privateKey,
|
||||
logLevel: "info",
|
||||
managementURL: config.apiOrigin,
|
||||
// Report the name the peer was registered with, so its meta does not
|
||||
// change on the first sync (a meta change pushes a network map to
|
||||
// every peer in the account).
|
||||
...(deviceName ? { deviceName } : {}),
|
||||
});
|
||||
|
||||
await netBirdClient.current.start();
|
||||
@@ -293,7 +297,7 @@ export const useNetBirdClient = () => {
|
||||
},
|
||||
`/${peerId}/temporary-access`,
|
||||
);
|
||||
return await connect(keyPairs.privateKey);
|
||||
return await connect(keyPairs.privateKey, name);
|
||||
} catch (error) {
|
||||
netBirdStore.setState({ status: NetBirdStatus.DISCONNECTED });
|
||||
throw error;
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ const loadConfig = (): Config => {
|
||||
googleTagManagerID: configJson?.googleTagManagerID || undefined,
|
||||
authServiceUrl: configJson?.authServiceUrl ?? undefined,
|
||||
wasmPath:
|
||||
configJson?.wasmPath || "https://pkgs.netbird.io/wasm/client/v0.76.3",
|
||||
configJson?.wasmPath || "https://pkgs.netbird.io/wasm/client/v0.78.0",
|
||||
licensed: configJson?.licensed === "true",
|
||||
cloud: configJson?.cloud === "true",
|
||||
agentNetworkOnly: configJson?.agentNetworkOnly === "true",
|
||||
|
||||
Reference in new issue
Block a user