From b5251ec22bbb23da004eab010603c99a682712ea Mon Sep 17 00:00:00 2001
From: Adam Procter <adamprocter@researchnot.es>
Date: Mon, 6 Apr 2020 19:55:01 +0100
Subject: [PATCH] tweaks

the device name has to be in place to identify what you want to edit
---
 app/src/router/index.js |  2 +-
 app/src/views/Home.vue  | 15 ++++++++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)

diff --git a/app/src/router/index.js b/app/src/router/index.js
index ed1f8fa..c9548bd 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 c858b79..135141a 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
-- 
GitLab