Enforce ENABLE_IMJOY variable in store
The store now won't let you enable imjoy if the environment variable is not set to "true"
This commit is contained in:
parent
dae818b6b5
commit
29de95fe74
1 changed files with 9 additions and 1 deletions
|
|
@ -116,7 +116,15 @@ export default new Vuex.Store({
|
||||||
state.IHIEnabled = enabled;
|
state.IHIEnabled = enabled;
|
||||||
},
|
},
|
||||||
changeImjoyEnabled(state, enabled) {
|
changeImjoyEnabled(state, enabled) {
|
||||||
state.imjoyEnabled = enabled;
|
if (process.env.VUE_APP_ENABLE_IMJOY === "true") {
|
||||||
|
state.imjoyEnabled = enabled;
|
||||||
|
} else {
|
||||||
|
state.imjoyEnabled = false;
|
||||||
|
if (enabled)
|
||||||
|
console.warn(
|
||||||
|
"Attempted to enable ImJoy, but it's disabled by VUE_APP_ENABLE_IMJOY."
|
||||||
|
);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
changeGalleryEnabled(state, enabled) {
|
changeGalleryEnabled(state, enabled) {
|
||||||
state.galleryEnabled = enabled;
|
state.galleryEnabled = enabled;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue