build(node): package NetBird and JK BMS with pinned shared UI sources
This commit is contained in:
@@ -109,6 +109,16 @@ class NodeApplication(Gtk.Application):
|
||||
if not local_url(self.view.get_uri() or ""):
|
||||
return
|
||||
action = result.get_js_value().to_string()
|
||||
if action.startswith("{") and len(action) <= 4096:
|
||||
try:
|
||||
payload = json.loads(action)
|
||||
uri = payload.get("url", "")
|
||||
parsed = urlsplit(uri)
|
||||
if payload.get("action") == "netbird-login" and parsed.scheme == "https" and parsed.hostname and not parsed.username and not parsed.password and parsed.path.startswith("/oauth2/"):
|
||||
Gio.AppInfo.launch_default_for_uri(uri, None)
|
||||
except (ValueError, TypeError, AttributeError, GLib.Error):
|
||||
pass
|
||||
return
|
||||
if action == "authorize":
|
||||
self.login()
|
||||
elif action == "configure-system":
|
||||
|
||||
Reference in New Issue
Block a user