diff --git a/assets/index.html b/assets/index.html index 396062c83..111ab55f0 100644 --- a/assets/index.html +++ b/assets/index.html @@ -74,9 +74,6 @@ - -
@@ -522,22 +504,6 @@ loadpoints:
- - diff --git a/assets/js/app.js b/assets/js/app.js index 4e5f08916..6ba7164f4 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -125,6 +125,62 @@ window.setInterval(function() { }); }, 5000); +// +// App & Routing +// + +const main = Vue.component('main', { + template: '#main-template', + data: function() { + return { + state: store.state // global state + } + }, + methods: { + configured: function (val) { + // for development purposes + if (val == '<<.Configured>>') { + return true; + } + if (!isNaN(parseInt(val)) && parseInt(val) > 0) { + return true; + } + return false; + } + } +}); + +const config = Vue.component("config", { + template: "#config-template", + data: function() { + return { + state: store.state // global state + }; + }, +}); + +const routes = [ + { path: "/", component: main }, + { path: "/config", component: config }, +]; + +const router = new VueRouter({ + routes, // short for `routes: routes` + linkExactActiveClass: "active", // Bootstrap