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
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
<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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment