Sync BIM controls with live Launcher session
This commit is contained in:
+4
-1
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user