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${/*}'
- '!**/hooks${/*}'
- '!**/platforms${/*}'
- '!**/dist-lite*${/*}'
- '!**/release-builds${/*}'
- '!src${/*}'

View file

@ -12,10 +12,8 @@
"main": "./app/app.js",
"scripts": {
"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",
"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",
"dist:linux": "electron-builder --linux --config app/builder-config-x86_64.yaml",
"dist:raspi": "electron-builder --linux --config app/builder-config-raspi.yaml",

View file

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

View file

@ -2,8 +2,7 @@
<!-- Grid managing tab content -->
<div uk-grid class="uk-height-1-1 uk-margin-remove uk-padding-remove">
<div class="view-component uk-width-expand">
<connectDisplayLite v-if="liteMode" />
<connectDisplay v-else />
<connectDisplay />
</div>
</div>
</template>
@ -19,9 +18,7 @@ export default {
},
data: function() {
return {
liteMode: process.env.VUE_APP_LITEMODE == "true" ? true : false
};
return {};
}
};
</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,
settings: null,
systemActionLinks: {},
clientVersion: process.env.PACKAGE.version,
liteMode: process.env.VUE_APP_LITEMODE == "true" ? true : false
clientVersion: process.env.PACKAGE.version
};
},
@ -110,9 +109,7 @@ export default {
return `${this.$store.getters.baseUri}/api/v2/actions`;
},
clientVersionName: function() {
const liteMode = process.env.VUE_APP_LITEMODE == "true" ? true : false;
const suffix = liteMode ? "-Lite" : "";
return `${process.env.PACKAGE.version}${suffix}`;
return `${process.env.PACKAGE.version}`;
}
},

View file

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