Sync BIM controls with live Launcher session

This commit is contained in:
CODEX
2026-06-23 18:32:04 +03:00
parent ffa60e4a22
commit 168b535953
2 changed files with 95 additions and 2 deletions
+4 -1
View File
@@ -929,9 +929,10 @@ const buildSharePromotionUrls = (token) => {
const sharePath = `/share/${encodeURIComponent(safeToken)}`;
const guestPath = `${sharePath}?${SHARE_AUTH_GUEST_PARAM}=1`;
const bridgePath = `/auth/share-promoted?next=${encodeURIComponent(sharePath)}`;
const guestBridgePath = `/auth/share-promoted?next=${encodeURIComponent(sharePath)}&status=guest`;
return {
promoteUrl: buildLauncherLaunchUrl(sharePath),
silentPromoteUrl: buildLauncherLaunchUrl(bridgePath),
silentPromoteUrl: buildLauncherOptionalLaunchUrl(bridgePath, guestBridgePath),
optionalPromoteUrl: buildLauncherOptionalLaunchUrl(sharePath, guestPath)
};
};
@@ -1781,6 +1782,7 @@ const handleLauncherHandoff = async (req, res, url) => {
const handleSharePromoted = (res, url) => {
const nextPath = sanitizeReturnTo(url.searchParams.get("next") || "/");
const nextPathJson = JSON.stringify(nextPath);
const promoted = url.searchParams.get("status") !== "guest";
res.statusCode = 200;
res.setHeader("Content-Type", "text/html; charset=utf-8");
res.setHeader("Cache-Control", "no-store");
@@ -1797,6 +1799,7 @@ const handleSharePromoted = (res, url) => {
const payload = {
type: "nodedc:bim-share-promoted",
nextPath,
promoted: ${promoted ? "true" : "false"},
createdAt: Date.now()
};
if (window.parent && window.parent !== window) {