fluxy-bot 0.3.18 → 0.3.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-fluxy/assets/{fluxy-DDgCW8m4.js → fluxy-DmbQycIj.js} +1 -1
- package/dist-fluxy/assets/{globals-CYritkLr.js → globals-A5sTL-kb.js} +8 -8
- package/dist-fluxy/assets/{onboard-BnNwYTId.js → onboard-DnbGE0aK.js} +1 -1
- package/dist-fluxy/fluxy.html +2 -2
- package/dist-fluxy/onboard.html +2 -2
- package/package.json +1 -1
- package/supervisor/chat/OnboardWizard.tsx +24 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as o,j as e,R as n,O as r}from"./globals-
|
|
1
|
+
import{b as o,j as e,R as n,O as r}from"./globals-A5sTL-kb.js";function a(){const t=()=>{window.parent?.postMessage({type:"fluxy:onboard-complete"},"*")};return e.jsx(r,{onComplete:t,isInitialSetup:!0})}o.createRoot(document.getElementById("root")).render(e.jsx(n.StrictMode,{children:e.jsx(a,{})}));
|
package/dist-fluxy/fluxy.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, interactive-widget=resizes-content" />
|
|
6
6
|
<title>Fluxy Chat</title>
|
|
7
|
-
<script type="module" crossorigin src="/fluxy/assets/fluxy-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-
|
|
7
|
+
<script type="module" crossorigin src="/fluxy/assets/fluxy-DmbQycIj.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-A5sTL-kb.js">
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/fluxy/assets/globals-BdY9BJIP.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body class="bg-background text-foreground">
|
package/dist-fluxy/onboard.html
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, interactive-widget=resizes-content" />
|
|
6
6
|
<title>Fluxy Setup</title>
|
|
7
|
-
<script type="module" crossorigin src="/fluxy/assets/onboard-
|
|
8
|
-
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-
|
|
7
|
+
<script type="module" crossorigin src="/fluxy/assets/onboard-DnbGE0aK.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="/fluxy/assets/globals-A5sTL-kb.js">
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/fluxy/assets/globals-BdY9BJIP.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body class="bg-background text-foreground">
|
package/package.json
CHANGED
|
@@ -472,13 +472,31 @@ export default function OnboardWizard({ onComplete, isInitialSetup = false }: Pr
|
|
|
472
472
|
portalUser: portalUser.trim(),
|
|
473
473
|
portalPass,
|
|
474
474
|
};
|
|
475
|
-
console.log('[OnboardWizard] handleComplete called
|
|
475
|
+
console.log('[OnboardWizard] handleComplete called');
|
|
476
|
+
console.log('[OnboardWizard] inIframe:', window.parent !== window, 'origin:', window.location.origin, 'href:', window.location.href);
|
|
476
477
|
try {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
478
|
+
// Try XHR as fallback if in iframe (fetch POST can fail through tunnels)
|
|
479
|
+
const inIframe = window.parent !== window;
|
|
480
|
+
let res: Response;
|
|
481
|
+
if (inIframe) {
|
|
482
|
+
console.log('[OnboardWizard] Using XHR for POST (iframe context)');
|
|
483
|
+
res = await new Promise<Response>((resolve, reject) => {
|
|
484
|
+
const xhr = new XMLHttpRequest();
|
|
485
|
+
xhr.open('POST', '/api/onboard');
|
|
486
|
+
xhr.setRequestHeader('Content-Type', 'application/json');
|
|
487
|
+
xhr.onload = () => resolve(new Response(xhr.responseText, { status: xhr.status, statusText: xhr.statusText }));
|
|
488
|
+
xhr.onerror = () => reject(new Error('XHR network error'));
|
|
489
|
+
xhr.ontimeout = () => reject(new Error('XHR timeout'));
|
|
490
|
+
xhr.timeout = 15000;
|
|
491
|
+
xhr.send(JSON.stringify(payload));
|
|
492
|
+
});
|
|
493
|
+
} else {
|
|
494
|
+
res = await fetch('/api/onboard', {
|
|
495
|
+
method: 'POST',
|
|
496
|
+
headers: { 'Content-Type': 'application/json' },
|
|
497
|
+
body: JSON.stringify(payload),
|
|
498
|
+
});
|
|
499
|
+
}
|
|
482
500
|
console.log('[OnboardWizard] POST /api/onboard response:', res.status, res.statusText);
|
|
483
501
|
const data = await res.json().catch(() => null);
|
|
484
502
|
console.log('[OnboardWizard] response body:', data);
|