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

trying to refresh components from pouchdb

when using /microcosm in the URL
parent 1b0f5e1b
No related branches found
No related tags found
No related merge requests found
<template>
<div id="app">
<navigation />
<router-view />
<router-view :key="$route.fullPath"></router-view>
</div>
</template>
......
......@@ -5,6 +5,9 @@ import Cards from '../views/Cards.vue'
import List from '../views/List.vue'
import Discarded from '../views/Discarded.vue'
import Leave from '../views/Leave.vue'
import About from '../views/About.vue'
import NotFound from '../views/NotFound.vue'
//import store from '../store'
// import Oldhome from '../views/Oldhome'
//import Test from '../views/Test'
......@@ -13,19 +16,21 @@ Vue.use(VueRouter)
export const routes = [
{
path: '/',
name: 'Home',
name: 'Collect',
component: List,
},
{
path: '/organise',
name: 'Organise',
component: Home,
},
{
path: '/cards',
name: 'Cards',
component: Cards,
},
{
path: '/list',
name: 'My List',
component: List,
},
{
path: '/discarded',
name: 'Discarded',
......@@ -39,38 +44,20 @@ export const routes = [
{
path: '/about',
name: 'About',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () =>
import(/* webpackChunkName: "about" */ '../views/About.vue'),
},
// {
// path: '/test',
// name: 'IPFS Test',
// component: Test,
// },
// {
// path: '/oldhome',
// name: 'Old Home',
// component: Oldhome,
// },
// dynamic segement `:microcosm` is added to the path
{
path: '/microcosm/:microcosm',
component: Home,
component: About,
},
{
// catches 404 errors
path: '*',
name: '404',
component: () =>
import(
/* webpackChunkName: "NotFoundComponent" */ '../views/NotFound.vue'
),
component: NotFound,
},
// dynamic segement `:microcosm` is added to the path
{
path: '/microcosm/:microcosm',
component: List,
},
]
......@@ -82,4 +69,5 @@ const router = new VueRouter({
routes,
})
export default router
......@@ -78,8 +78,8 @@ const store = new Vuex.Store({
pouchdb.close().then(function () {
if (urlmicrocosm != undefined) {
// myclient = urldevice
microcosm = urlmicrocosm
localStorage.setItem('mylastMicrocosm', microcosm)
} else {
microcosm = doc
}
......
......@@ -30,7 +30,7 @@
</div>
<div v-else>
<!-- <div v-if="this.currentroute.name == 'Home'"> -->
<div v-if="this.currentroute.name == 'Home'">
<OtherNodeslayer
v-for="value in otherNodes"
v-bind:key="value.node_id"
......@@ -47,7 +47,7 @@
v-bind:nodetext="value.node_text"
v-bind:deleted="value.deleted"
/>
</div>
<OnBoard @clientAdded="clientAdded()" @editTrue="(e) => editTrue(e)" />
</div>
</div>
......
......@@ -13,7 +13,7 @@
</div>
<div v-else>
<!-- <div v-if="this.currentroute.name == 'Home'"> -->
<div v-if="this.currentroute.name == 'Home'">
<OtherNodeslayer
v-for="value in otherNodes"
v-bind:key="value.node_id"
......@@ -30,7 +30,7 @@
v-bind:nodetext="value.node_text"
v-bind:deleted="value.deleted"
/>
</div>
<OnBoard @clientAdded="clientAdded()" @editTrue="(e) => editTrue(e)" />
</div>
</div>
......
......@@ -137,6 +137,11 @@ export default {
// shortcutstate: false,
}
},
// beforeRouteLeave(to, from, next) {
// this.$store.commit('GET_ALL_NODES')
// next()
// },
computed: {
domContainerReady() {
return !!this.elementWidth && !!this.elementHeight
......
......@@ -19,7 +19,7 @@
</div>
</div>
<div v-else>
<!-- <div v-if="this.currentroute.name == 'Home'"> -->
<div v-if="this.currentroute.name == 'Home'">
<OtherNodeslayer
v-for="value in otherNodes"
v-bind:key="value.node_id"
......@@ -36,6 +36,7 @@
v-bind:nodetext="value.node_text"
v-bind:deleted="value.deleted"
/>
</div>
<OnBoard @clientAdded="clientAdded()" @editTrue="(e) => editTrue(e)" />
</div>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment