Promote authenticated BIM share viewers
This commit is contained in:
@@ -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 };
|
||||
|
||||
Reference in New Issue
Block a user