Removed "lite" build target

This commit is contained in:
Joel Collins 2020-05-26 10:44:51 +01:00
parent 952085fee7
commit 5f44edaa91
10 changed files with 22 additions and 95 deletions

View file

@ -1,4 +0,0 @@
NODE_ENV=development
VUE_APP_PLATFORM=web
VUE_APP_TARGET=web
VUE_APP_LITEMODE=true

View file

@ -1,4 +0,0 @@
NODE_ENV=production
VUE_APP_PLATFORM=web
VUE_APP_TARGET=web
VUE_APP_LITEMODE=true

View file

@ -26,6 +26,5 @@ files:
- '!**/app/installers${/*}' - '!**/app/installers${/*}'
- '!**/hooks${/*}' - '!**/hooks${/*}'
- '!**/platforms${/*}' - '!**/platforms${/*}'
- '!**/dist-lite*${/*}'
- '!**/release-builds${/*}' - '!**/release-builds${/*}'
- '!src${/*}' - '!src${/*}'

View file

@ -12,10 +12,8 @@
"main": "./app/app.js", "main": "./app/app.js",
"scripts": { "scripts": {
"build:web": "vue-cli-service build --mode production.web", "build:web": "vue-cli-service build --mode production.web",
"build:lite": "vue-cli-service build --mode production.lite",
"build:app": "vue-cli-service build --mode production.app", "build:app": "vue-cli-service build --mode production.app",
"serve:web": "vue-cli-service serve --mode development.web", "serve:web": "vue-cli-service serve --mode development.web",
"serve:lite": "vue-cli-service serve --mode development.lite",
"start": "npm run build:app && electron app/app.js", "start": "npm run build:app && electron app/app.js",
"dist:linux": "electron-builder --linux --config app/builder-config-x86_64.yaml", "dist:linux": "electron-builder --linux --config app/builder-config-x86_64.yaml",
"dist:raspi": "electron-builder --linux --config app/builder-config-raspi.yaml", "dist:raspi": "electron-builder --linux --config app/builder-config-raspi.yaml",

View file

@ -48,7 +48,6 @@ export default {
keysDown: {}, keysDown: {},
systemDark: undefined, systemDark: undefined,
themeObserver: undefined, themeObserver: undefined,
liteMode: process.env.VUE_APP_LITEMODE == "true" ? true : false,
isElectron: isElectron(), isElectron: isElectron(),
tourCallbacks: { tourCallbacks: {
onStop: () => { onStop: () => {
@ -95,18 +94,15 @@ export default {
placement: "bottom" placement: "bottom"
} }
}, },
...(!this.liteMode
? [ {
{ target: "#new-connection-card",
target: "#new-connection-card", header: {
header: { title: "New connection"
title: "New connection" },
}, content: `Connect locally if you're running on a microscope, \nor open a new remote connection to a microscope`
content: `Connect locally if you're running on a microscope, \nor open a new remote connection to a microscope` },
} ...(this.isElectron
]
: []),
...(this.isElectron && !this.liteMode
? [ ? [
{ {
target: "#nearby-connections-grid", target: "#nearby-connections-grid",
@ -117,17 +113,14 @@ export default {
} }
] ]
: []), : []),
...(!this.liteMode
? [ {
{ target: "#saved-connections-grid",
target: "#saved-connections-grid", header: {
header: { title: "Saved microscopes"
title: "Saved microscopes" },
}, content: `Connect to your saved microscopes for faster access`
content: `Connect to your saved microscopes for faster access` },
}
]
: []),
{ {
target: "#gallery-tab-icon", target: "#gallery-tab-icon",
header: { header: {
@ -168,9 +161,6 @@ export default {
}, },
mounted() { mounted() {
if (process.env.VUE_APP_LITEMODE == "true") {
console.log("Built lite-mode");
}
// Query CSS dark theme preference // Query CSS dark theme preference
var mql = window.matchMedia("(prefers-color-scheme: dark)"); var mql = window.matchMedia("(prefers-color-scheme: dark)");
// Check for system dark theme when mounted // Check for system dark theme when mounted

View file

@ -15,7 +15,6 @@
class="uk-flex uk-flex-column uk-padding-remove uk-width-auto uk-height-1-1 uk-text-center" class="uk-flex uk-flex-column uk-padding-remove uk-width-auto uk-height-1-1 uk-text-center"
> >
<tabIcon <tabIcon
v-show="!liteMode"
id="connect-tab-icon" id="connect-tab-icon"
tab-i-d="connect" tab-i-d="connect"
:require-connection="false" :require-connection="false"
@ -196,8 +195,7 @@ export default {
return { return {
plugins: [], plugins: [],
currentTab: "connect", currentTab: "connect",
unwatchStoreFunction: null, unwatchStoreFunction: null
liteMode: process.env.VUE_APP_LITEMODE == "true" ? true : false
}; };
}, },

View file

@ -2,8 +2,7 @@
<!-- Grid managing tab content --> <!-- Grid managing tab content -->
<div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove"> <div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove">
<div class="view-component uk-width-expand"> <div class="view-component uk-width-expand">
<connectDisplayLite v-if="liteMode" /> <connectDisplay />
<connectDisplay v-else />
</div> </div>
</div> </div>
</template> </template>
@ -19,9 +18,7 @@ export default {
}, },
data: function() { data: function() {
return { return {};
liteMode: process.env.VUE_APP_LITEMODE == "true" ? true : false
};
} }
}; };
</script> </script>

View file

@ -1,42 +0,0 @@
<template>
<div class="connectDisplayLite uk-padding uk-padding-remove-left">
Lite connect
</div>
</template>
<script>
// Export main app
export default {
name: "ConnectDisplayLite",
components: {},
data: function() {
return {};
},
mounted() {
// Connect to the current location
// NOTE: This assumes that the GUI is being served from the same location as the API"
this.connectToHost(location);
},
methods: {
connectToHost: function(host) {
console.log(host);
// Commit the hostname and port to store
this.$store.commit("resetState");
this.$store.commit("changeHost", [host.hostname, host.port]);
this.$store.commit("setConnected");
}
}
};
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="less">
.connect-card-align-top {
margin-top: 52px;
}
</style>

View file

@ -94,8 +94,7 @@ export default {
configuration: null, configuration: null,
settings: null, settings: null,
systemActionLinks: {}, systemActionLinks: {},
clientVersion: process.env.PACKAGE.version, clientVersion: process.env.PACKAGE.version
liteMode: process.env.VUE_APP_LITEMODE == "true" ? true : false
}; };
}, },
@ -110,9 +109,7 @@ export default {
return `${this.$store.getters.baseUri}/api/v2/actions`; return `${this.$store.getters.baseUri}/api/v2/actions`;
}, },
clientVersionName: function() { clientVersionName: function() {
const liteMode = process.env.VUE_APP_LITEMODE == "true" ? true : false; return `${process.env.PACKAGE.version}`;
const suffix = liteMode ? "-Lite" : "";
return `${process.env.PACKAGE.version}${suffix}`;
} }
}, },

View file

@ -23,8 +23,6 @@ module.exports = {
outputDir: (function() { outputDir: (function() {
if (process.env.VUE_APP_TARGET == "electron-renderer") { if (process.env.VUE_APP_TARGET == "electron-renderer") {
return "./app/dist"; return "./app/dist";
} else if (process.env.VUE_APP_LITEMODE == "true") {
return "./dist-lite";
} else { } else {
return "./dist"; return "./dist";
} }