Rely on store to enforce IMJOY_ENABLED

This removes some now-redundant code.
This commit is contained in:
Richard 2021-06-22 12:07:27 +01:00
parent 29de95fe74
commit 33b3ffc7f7

View file

@ -312,21 +312,9 @@ export default {
return this.tabOrder.indexOf(this.currentTab);
},
imjoyEnabled: function() {
// Enable the ImJoy tab (and associated code) only if it is
// enabled client-side, and at build time.
// This means that the medical version of the microscope can
// disable the plugin architecture by setting the environment
// variable VUE_APP_ENABLE_IMJOY=false
if (process.env.VUE_APP_ENABLE_IMJOY === "true") {
return this.$store.state.imjoyEnabled;
} else {
return false;
}
},
// Map the tabs from ImJoy's store module so we can display them
...mapState("imjoy", { imjoyTabs: "tabs" })
...mapState("imjoy", { imjoyTabs: "tabs" }),
...mapState({ imjoyEnabled: "imjoyEnabled" })
},
created: function() {