diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh index ca1347b..bc8e775 100644 --- a/docker/entrypoint.sh +++ b/docker/entrypoint.sh @@ -7,5 +7,6 @@ window.VUE_APP_MQTT='${WIS2BOX_MQTT_URL}'\n window.VUE_APP_WAF='${WIS2BOX_URL}/data/'\n window.VUE_APP_BASEMAP_URL='${WIS2BOX_BASEMAP_URL:-https://\{s\}.tile.openstreetmap.org/\{z\}/\{x\}/\{y\}.png}'\n window.VUE_APP_BASEMAP_ATTRIBUTION='${WIS2BOX_BASEMAP_ATTRIBUTION:-© OpenStreetMap contributors}'\n +window.VUE_APP_CLUSTER='${WIS2BOX_UI_CLUSTER}'\n " echo $env >> /usr/share/nginx/html/env.js diff --git a/src/App.vue b/src/App.vue index 6250d80..db14485 100644 --- a/src/App.vue +++ b/src/App.vue @@ -46,7 +46,8 @@ export default { url: '', dialog: false, token: '', - interceptor: null + interceptor: null, + cluster: window.VUE_APP_CLUSTER === true || window.VUE_APP_CLUSTER === 'true' }; }, computed: { diff --git a/src/components/app/AppHeader.vue b/src/components/app/AppHeader.vue index 544db54..5b9bedd 100644 --- a/src/components/app/AppHeader.vue +++ b/src/components/app/AppHeader.vue @@ -21,8 +21,7 @@ - - + @@ -32,8 +31,7 @@ + diff --git a/src/components/app/SelectLocale.vue b/src/components/app/SelectLocale.vue index 6f51f37..7cb390e 100644 --- a/src/components/app/SelectLocale.vue +++ b/src/components/app/SelectLocale.vue @@ -1,15 +1,17 @@ - + - - {{ $t('language') }} + + {{ $t('code') }} {{ name }} @@ -27,6 +29,7 @@ import { defineComponent } from "vue"; export default defineComponent({ name: "SelectLocale", template: "#select-locale", + props: ["header"], computed: { languages: function () { const temp = {}; @@ -35,6 +38,13 @@ export default defineComponent({ } return temp; }, + color: function () { + if (this.header) { + return "#FFFFFF" + } else { + return "#014e9e" + } + } }, }); diff --git a/src/components/app/TokenAuth.vue b/src/components/app/TokenAuth.vue index 50763d7..3ee92b4 100644 --- a/src/components/app/TokenAuth.vue +++ b/src/components/app/TokenAuth.vue @@ -1,8 +1,10 @@ - + - + + {{ $t('util.token') }} +