diff --git a/app/src/router/index.js b/app/src/router/index.js index ed1f8fa32330a1db17cdad69775526c8ed49d0b9..c9548bd7748674230f9979ab0b3bf2c628db3832 100644 --- a/app/src/router/index.js +++ b/app/src/router/index.js @@ -21,7 +21,7 @@ const routes = [ }, // dynamic segement `:microcosm` is added to the path { - path: '/:device/microcosm/:microcosm', + path: '/microcosm/:microcosm', component: Home } // TODO: Nodecard ID in URL diff --git a/app/src/views/Home.vue b/app/src/views/Home.vue index c858b79b7fd53aa5bef2b34d4fc5d5bc746ed6e9..135141ae66a871de1b7b89d3c15e717be21d357c 100644 --- a/app/src/views/Home.vue +++ b/app/src/views/Home.vue @@ -1,7 +1,12 @@ <template> <div class="home"> <div v-if="clientset"> - <p>microcosm/{{ myMicrocosm }}</p> + <p> + microcosm/ + <b>{{ myMicrocosm }}</b> | client + <b>{{ myClient }}</b> + </p> + <OtherNodeslayer v-for="value in otherNodes" v-bind:key="value.node_id" @@ -32,6 +37,8 @@ import ControlsLayer from '@/components/ControlsLayer.vue' import { mapState } from 'vuex' import { shortcutsMixin } from '@/components/mixins/shortcutsMixin.js' +// import Router from '@/router' +// console.log(Router.currentRoute.params.microcosm) export default { name: 'Home', @@ -41,6 +48,11 @@ export default { if (typeof window !== 'undefined') { document.addEventListener('keydown', this.handleKeyPress) } + if (localStorage.myNNClient == null) { + // visiting from URL get them to name client + // localStorage.setItem('myNNClient', 'unknown client') + // console.log(localStorage.myNNClient) + } }, beforeDestroy() { if (typeof window !== 'undefined') { @@ -63,6 +75,7 @@ export default { }, computed: mapState({ myMicrocosm: state => state.microcosm, + myClient: state => state.myclient, myNodes: state => state.myNodes, otherNodes: state => state.otherNodes, shortcutstate: state => state.shortcutstate