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

more v-for tweaks

parent 913d07e3
No related branches found
No related tags found
No related merge requests found
...@@ -90,14 +90,18 @@ export default { ...@@ -90,14 +90,18 @@ export default {
marked: marked, marked: marked,
}, },
computed: mapState({ computed: {
...mapState({
myNodes: (state) => state.myNodes, myNodes: (state) => state.myNodes,
configPositions: (state) => state.configPositions, configPositions: (state) => state.configPositions,
configEmoji: (state) => state.configEmoji, configEmoji: (state) => state.configEmoji,
}),
// FIXME: these filters dont work yet // FIXME: these filters dont work yet
nodes: () => { // ALSO dont forget you did this.$options.myArray = this.myNodes
return this.nodes.filter(function (node) { // Otherwise your hit the realtimesync issue again
nodes() {
return this.nodes.filter((node) => {
return ( return (
(node == this.myNodes.node_id) == this.configPositions.node_id && (node == this.myNodes.node_id) == this.configPositions.node_id &&
this.myNodes.deleted == false && this.myNodes.deleted == false &&
...@@ -105,24 +109,26 @@ export default { ...@@ -105,24 +109,26 @@ export default {
) )
}) })
}, },
readnodes: () => {
return this.readnodes.filter(function (node) { readnodes() {
return this.readnodes.filter((readnode) => {
return ( return (
(node == this.myNodes.node_id) == this.configPositions.node_id && (readnode == this.myNodes.node_id) == this.configPositions.node_id &&
this.myNodes.deleted == false && this.myNodes.deleted == false &&
this.configPositions.read_mode == true this.configPositions.read_mode == true
) )
}) })
}, },
emojis: () => {
return this.nodes.filter(function (emoji) { emojis() {
return this.emojis.filter((emoji) => {
return ( return (
(emoji == this.myNodes.node_id) == this.configPositions.node_id && (emoji == this.myNodes.node_id) == this.configPositions.node_id &&
this.myNodes.deleted == false this.myNodes.deleted == false
) )
}) })
}, },
}), },
myArray: null, myArray: null,
created() { created() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment