Add flag to enable fullVersion in beta

This commit is contained in:
tobspr 2020-06-13 11:01:43 +02:00
parent a0305512a2
commit 766d9e943e
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,5 @@
import { queryParamOptions } from "./query_parameters";
export const IS_DEBUG =
G_IS_DEV &&
typeof window !== "undefined" &&
@ -5,9 +7,10 @@ export const IS_DEBUG =
(window.location.host.indexOf("localhost:") >= 0 || window.location.host.indexOf("192.168.0.") >= 0) &&
window.location.search.indexOf("nodebug") < 0;
export const IS_DEMO =
(G_IS_PROD && !G_IS_STANDALONE) ||
(typeof window !== "undefined" && window.location.search.indexOf("demo") >= 0);
export const IS_DEMO = queryParamOptions.fullVersion
? false
: (G_IS_PROD && !G_IS_STANDALONE) ||
(typeof window !== "undefined" && window.location.search.indexOf("demo") >= 0);
const smoothCanvas = true;

View File

@ -3,8 +3,14 @@ const options = queryString.parse(location.search);
export let queryParamOptions = {
embedProvider: null,
fullVersion: false,
};
if (options.embed) {
queryParamOptions.embedProvider = options.embed;
}
// Allow testing full version outside of standalone
if (options.fullVersion && !G_IS_PROD) {
queryParamOptions.fullVersion = true;
}