diff --git a/openflexure_microscope/api/static/.env.development b/openflexure_microscope/api/static/.env.development index 284c703f..0fd381c8 100644 --- a/openflexure_microscope/api/static/.env.development +++ b/openflexure_microscope/api/static/.env.development @@ -1,3 +1,5 @@ NODE_ENV=development +VUE_APP_MODE=development VUE_APP_PLATFORM=web -VUE_APP_TARGET=web \ No newline at end of file +VUE_APP_TARGET=web +VUE_APP_ENABLE_IMJOY=true \ No newline at end of file diff --git a/openflexure_microscope/api/static/.env.production b/openflexure_microscope/api/static/.env.production index e9a62687..ed3afd8e 100644 --- a/openflexure_microscope/api/static/.env.production +++ b/openflexure_microscope/api/static/.env.production @@ -1,3 +1,5 @@ NODE_ENV=production +VUE_APP_MODE=production VUE_APP_PLATFORM=web -VUE_APP_TARGET=web \ No newline at end of file +VUE_APP_TARGET=web +VUE_APP_ENABLE_IMJOY=true diff --git a/openflexure_microscope/api/static/package.json b/openflexure_microscope/api/static/package.json index d1c31011..d7bbf433 100644 --- a/openflexure_microscope/api/static/package.json +++ b/openflexure_microscope/api/static/package.json @@ -6,7 +6,9 @@ "author": "OpenFlexure (https://www.openflexure.org)", "scripts": { "serve": "vue-cli-service serve --mode development", + "serve-without-imjoy": "VUE_APP_ENABLE_IMJOY=false vue-cli-service serve --mode development", "build": "vue-cli-service build --mode production", + "build-without-imjoy": "VUE_APP_ENABLE_IMJOY=false vue-cli-service build --mode production", "lint": "vue-cli-service lint", "lint:fix": "vue-cli-service lint --fix" }, diff --git a/openflexure_microscope/api/static/src/components/appContent.vue b/openflexure_microscope/api/static/src/components/appContent.vue index bc2cb1c7..9212302a 100644 --- a/openflexure_microscope/api/static/src/components/appContent.vue +++ b/openflexure_microscope/api/static/src/components/appContent.vue @@ -49,6 +49,7 @@ import(/* webpackChunkName: "imjoy" */"./tabContentComponents/imjoyContent.vue") }, data: function() { return { @@ -297,6 +298,10 @@ export default { return this.tabOrder.indexOf(this.currentTab); }, + imjoyEnabled: function() { + return process.env.VUE_APP_ENABLE_IMJOY === "true"; + }, + ...mapState("imjoy", { imjoyTabs: "tabs" }) },