Introduced .env file for configuration.

This commit is contained in:
Raimund Renkert 2022-03-03 15:16:12 +01:00
parent 6339275b5b
commit b832c30838
2 changed files with 2 additions and 13 deletions

View File

@ -52,17 +52,7 @@ export default {
return { return {
drawer: false, drawer: false,
fixed: false, fixed: false,
layerItems: [ title: process.env.VUE_APP_TITLE,
{
icon: 'mdi-apps',
title: 'Points of Interest',
},
{
icon: 'mdi-chart-bubble',
title: 'Buildings',
},
],
title: 'Minetest - Map of the Real World',
} }
}, },
computed: { computed: {

View File

@ -77,8 +77,7 @@ export default new Vuex.Store({
runAutoUpdate: function({ commit, state, dispatch}) { runAutoUpdate: function({ commit, state, dispatch}) {
var me = this; var me = this;
// TODO: Make the URL to websocket configurable via .env state.socket = new WebSocket(process.env.VUE_APP_WEBSOCKET_URL);
state.socket = new WebSocket('ws://' + window.location.host + '/socket');
state.socket.onerror = function() { state.socket.onerror = function() {
commit('setAutoUpdate', false) commit('setAutoUpdate', false)