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

Merge branch 'listView'

parents 3f5952bd 5500ce7b
No related branches found
No related tags found
No related merge requests found
# 0.1.11
_10th April 2020_
### Added
- You can now switch between spatial view (organise) and list view (bucket mode).
### Fixed
- Typo in CHANGELOG.md
# 0.1.10 # 0.1.10
_7th April 2020_ _7th April 2020_
...@@ -12,7 +24,7 @@ _7th April 2020_ ...@@ -12,7 +24,7 @@ _7th April 2020_
### Fixed ### Fixed
- Create/ Join a new microcosm now reloads URL dependant on whether in development or prodction enviroment - Create/ Join a new microcosm now reloads URL dependant on whether in development or production environment.
# 0.1.9 # 0.1.9
......
{ {
"name": "nodenogg.in", "name": "nodenogg.in",
"version": "0.1.10", "version": "0.1.11",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
......
<template> <template>
<div class="controls"> <div class="controls">
<div class="btn-row"> <div class="btn-row">
<BaseButton buttonClass="action" @click="addNode()" <BaseButton buttonClass="action" @click="addNode()">Create Node</BaseButton>
>Create Node</BaseButton <BaseButton buttonClass="action" @click="listView()">Switch View</BaseButton>
> <BaseButton buttonClass="action" @click="removeLocal()">Join another microcosm</BaseButton>
<BaseButton buttonClass="action" @click="removeLocal()"
>Join another microcosm</BaseButton
>
<!-- <BaseButton @click="exportStorage()">Export my contributions</BaseButton> <!-- <BaseButton @click="exportStorage()">Export my contributions</BaseButton>
<BaseButton buttonClass="danger" v-on:click="deleteClient"> <BaseButton buttonClass="danger" v-on:click="deleteClient">
Delete my contributions (inc. attachments) permanently Delete my contributions (inc. attachments) permanently
...@@ -49,6 +46,10 @@ export default { ...@@ -49,6 +46,10 @@ export default {
addNode() { addNode() {
this.$store.dispatch('addNode') this.$store.dispatch('addNode')
}, },
listView() {
// FIXME: add action here to toggle visiblity
this.$emit('listView')
},
exportStorage: function() { exportStorage: function() {
// Save local indexeddb document-store to JSON file // Save local indexeddb document-store to JSON file
// or export state.notes to JSON file // or export state.notes to JSON file
......
<template>
<div class="list">
<ul v-for="value in myNodes" v-bind:key="value.node_id">
<li
class="dataeach"
v-if="nodeid == value.node_id"
:inner-html.prop="value.node_text | marked"
></li>
</ul>
</div>
</template>
<script>
import { mapState } from 'vuex'
import marked from 'marked'
export default {
name: 'ListLayer',
props: {
nodeid: String,
nodetext: String
},
computed: mapState({
myNodes: state => state.myNodes
}),
filters: {
// need to write a reverse data filter I suspect here so new data is at the top of list
marked: marked
}
}
</script>
<style lang="css" scoped>
li {
margin-bottom: -15px;
}
</style>
\ No newline at end of file
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
></textarea> ></textarea>
</div> </div>
</div> </div>
<!-- FIXME: What is this doing below now ? Looks old -->
<div v-else> <div v-else>
<p :id="nodeid" :inner-html.prop="nodetext | marked">{{ nodeid }}</p> <p :id="nodeid" :inner-html.prop="nodetext | marked">{{ nodeid }}</p>
</div> </div>
......
<template>
<div class="otherlist">
<ul v-for="value in otherNodes" v-bind:key="value.node_id">
<li
class="dataeach"
v-if="nodeid == value.node_id"
:inner-html.prop="value.node_text | marked"
>{{ nodeid }}</li>
</ul>
</div>
</template>
<script>
import { mapState } from 'vuex'
import marked from 'marked'
export default {
name: 'OtherListlayer',
props: {
nodeid: String,
nodetext: String
},
computed: mapState({
otherNodes: state => state.otherNodes
}),
filters: {
// need to write a reverse data filter I suspect here so new data is at the top of list
marked: marked
}
}
</script>
<style lang="css" scoped>
li {
margin-bottom: -15px;
}
</style>
\ No newline at end of file
<template> <template>
<div class="home"> <div class="home">
<div v-if="clientset"> <div v-if="clientset">
<OtherNodeslayer <div v-if="listview">
v-for="value in otherNodes" <ListLayer
v-bind:key="value.node_id" v-for="value in myNodes"
v-bind:nodeid="value.node_id" v-bind:key="value.node_id"
v-bind:nodetext="value.node_text" v-bind:nodeid="value.node_id"
/> v-bind:nodetext="value.node_text"
/>
<NodesLayer <OtherListlayer
@editTrue="e => editTrue(e)" v-for="value in otherNodes"
v-for="value in myNodes" v-bind:key="value.node_id"
v-bind:key="value.node_id" v-bind:nodeid="value.node_id"
v-bind:nodeid="value.node_id" v-bind:nodetext="value.node_text"
v-bind:nodetext="value.node_text" />
/> </div>
<div v-else>
<OtherNodeslayer
v-for="value in otherNodes"
v-bind:key="value.node_id"
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
/>
<ControlsLayer /> <NodesLayer
@editTrue="e => editTrue(e)"
v-for="value in myNodes"
v-bind:key="value.node_id"
v-bind:nodeid="value.node_id"
v-bind:nodetext="value.node_text"
/>
</div>
<ControlsLayer @listView="listView()" />
</div> </div>
<OnBoard v-else @clientAdded="clientAdded()" /> <OnBoard v-else @clientAdded="clientAdded()" />
</div> </div>
...@@ -27,6 +43,8 @@ ...@@ -27,6 +43,8 @@
import OnBoard from '@/components/OnBoard.vue' import OnBoard from '@/components/OnBoard.vue'
import NodesLayer from '@/components/NodesLayer.vue' import NodesLayer from '@/components/NodesLayer.vue'
import OtherNodeslayer from '@/components/OtherNodeslayer.vue' import OtherNodeslayer from '@/components/OtherNodeslayer.vue'
import ListLayer from '@/components/ListLayer.vue'
import OtherListlayer from '@/components/OtherListlayer.vue'
import ControlsLayer from '@/components/ControlsLayer.vue' import ControlsLayer from '@/components/ControlsLayer.vue'
import { mapState } from 'vuex' import { mapState } from 'vuex'
...@@ -57,6 +75,7 @@ export default { ...@@ -57,6 +75,7 @@ export default {
data: function() { data: function() {
return { return {
clientset: false, clientset: false,
listview: false,
offline: false offline: false
} }
}, },
...@@ -65,6 +84,8 @@ export default { ...@@ -65,6 +84,8 @@ export default {
OnBoard, OnBoard,
NodesLayer, NodesLayer,
OtherNodeslayer, OtherNodeslayer,
ListLayer,
OtherListlayer,
ControlsLayer ControlsLayer
}, },
computed: mapState({ computed: mapState({
...@@ -86,6 +107,14 @@ export default { ...@@ -86,6 +107,14 @@ export default {
this.$store.dispatch('addNode') this.$store.dispatch('addNode')
}, },
listView() {
if (this.listview == false) {
this.listview = true
} else {
this.listview = false
}
},
offlineTriggered() { offlineTriggered() {
this.offline = true this.offline = true
}, },
......
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
<div> <div>
<h1>This is a Custom 404</h1> <h1>This is a Custom 404</h1>
<p>Delightful one coming soon</p> <p>Delightful one coming soon</p>
<!-- FIXME: Put stuffed Monkey here -->
</div> </div>
</template> </template>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment