Promote authenticated BIM share viewers

This commit is contained in:
CODEX
2026-06-23 00:16:06 +03:00
parent f680d6bad2
commit 09492a5fdc
4 changed files with 24 additions and 8 deletions
+7 -4
View File
@@ -76,10 +76,13 @@ const isSharedViewerPath = () => (
typeof window !== "undefined" &&
/^\/share\/[^/]+\/?$/.test(window.location.pathname || "")
);
const isReadonlySettingsContext = () => (
isSharedViewerPath() ||
(typeof document !== "undefined" && document.body?.dataset?.viewerMode === "guest")
);
const isReadonlySettingsContext = () => {
if (typeof document !== "undefined") {
const mode = document.body?.dataset?.viewerMode;
if (mode) return mode === "guest";
}
return isSharedViewerPath();
};
const projectSettings = typeof window !== "undefined" && window.__BIMDC_THEME__
? { ...defaultSettings, ...window.__BIMDC_THEME__ }
: { ...defaultSettings };