diff --git a/app/src/components/ListLayer.vue b/app/src/components/ListLayer.vue index 7b6509aa1bd2dcd9c57b0afe22a5614cba9fe791..8dc4ef4059441d5e3d2e3318bec74bd006acb1e9 100644 --- a/app/src/components/ListLayer.vue +++ b/app/src/components/ListLayer.vue @@ -22,8 +22,7 @@ export default { }, computed: mapState({ - myNodes: state => state.myNodes, - otherNodes: state => state.otherNodes + myNodes: state => state.myNodes }), filters: { diff --git a/app/src/components/OtherListlayer.vue b/app/src/components/OtherListlayer.vue new file mode 100644 index 0000000000000000000000000000000000000000..76e2f3dd0664476d20164af512c0064c0a230013 --- /dev/null +++ b/app/src/components/OtherListlayer.vue @@ -0,0 +1,39 @@ +<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 diff --git a/app/src/views/Home.vue b/app/src/views/Home.vue index 257826194509214d4c84dbcc6eba646a83258efb..c7c7a6cf8de84a79886e801d9e604fc9dcc430b0 100644 --- a/app/src/views/Home.vue +++ b/app/src/views/Home.vue @@ -22,6 +22,13 @@ v-bind:nodeid="value.node_id" v-bind:nodetext="value.node_text" /> + + <OtherListlayer + v-for="value in otherNodes" + v-bind:key="value.node_id" + v-bind:nodeid="value.node_id" + v-bind:nodetext="value.node_text" + /> </div> <ControlsLayer @listView="listView()" /> </div> @@ -35,6 +42,7 @@ import OnBoard from '@/components/OnBoard.vue' import NodesLayer from '@/components/NodesLayer.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 { mapState } from 'vuex' @@ -75,6 +83,7 @@ export default { NodesLayer, OtherNodeslayer, ListLayer, + OtherListlayer, ControlsLayer }, computed: mapState({