Skip to content
Snippets Groups Projects
Commit b5251ec2 authored by Adam Procter's avatar Adam Procter
Browse files

tweaks

the device name has to be in place to identify what you want to edit
parent 1614707b
Branches
Tags
No related merge requests found
...@@ -21,7 +21,7 @@ const routes = [ ...@@ -21,7 +21,7 @@ const routes = [
}, },
// dynamic segement `:microcosm` is added to the path // dynamic segement `:microcosm` is added to the path
{ {
path: '/:device/microcosm/:microcosm', path: '/microcosm/:microcosm',
component: Home component: Home
} }
// TODO: Nodecard ID in URL // TODO: Nodecard ID in URL
......
<template> <template>
<div class="home"> <div class="home">
<div v-if="clientset"> <div v-if="clientset">
<p>microcosm/{{ myMicrocosm }}</p> <p>
microcosm/
<b>{{ myMicrocosm }}</b> | client
<b>{{ myClient }}</b>
</p>
<OtherNodeslayer <OtherNodeslayer
v-for="value in otherNodes" v-for="value in otherNodes"
v-bind:key="value.node_id" v-bind:key="value.node_id"
...@@ -32,6 +37,8 @@ import ControlsLayer from '@/components/ControlsLayer.vue' ...@@ -32,6 +37,8 @@ import ControlsLayer from '@/components/ControlsLayer.vue'
import { mapState } from 'vuex' import { mapState } from 'vuex'
import { shortcutsMixin } from '@/components/mixins/shortcutsMixin.js' import { shortcutsMixin } from '@/components/mixins/shortcutsMixin.js'
// import Router from '@/router'
// console.log(Router.currentRoute.params.microcosm)
export default { export default {
name: 'Home', name: 'Home',
...@@ -41,6 +48,11 @@ export default { ...@@ -41,6 +48,11 @@ export default {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
document.addEventListener('keydown', this.handleKeyPress) 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() { beforeDestroy() {
if (typeof window !== 'undefined') { if (typeof window !== 'undefined') {
...@@ -63,6 +75,7 @@ export default { ...@@ -63,6 +75,7 @@ export default {
}, },
computed: mapState({ computed: mapState({
myMicrocosm: state => state.microcosm, myMicrocosm: state => state.microcosm,
myClient: state => state.myclient,
myNodes: state => state.myNodes, myNodes: state => state.myNodes,
otherNodes: state => state.otherNodes, otherNodes: state => state.otherNodes,
shortcutstate: state => state.shortcutstate shortcutstate: state => state.shortcutstate
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment