1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-06 09:34:05 +00:00

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 = export const IS_DEBUG =
G_IS_DEV && G_IS_DEV &&
typeof window !== "undefined" && 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.host.indexOf("localhost:") >= 0 || window.location.host.indexOf("192.168.0.") >= 0) &&
window.location.search.indexOf("nodebug") < 0; window.location.search.indexOf("nodebug") < 0;
export const IS_DEMO = export const IS_DEMO = queryParamOptions.fullVersion
(G_IS_PROD && !G_IS_STANDALONE) || ? false
(typeof window !== "undefined" && window.location.search.indexOf("demo") >= 0); : (G_IS_PROD && !G_IS_STANDALONE) ||
(typeof window !== "undefined" && window.location.search.indexOf("demo") >= 0);
const smoothCanvas = true; const smoothCanvas = true;

View File

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