add history
This commit is contained in:
+10
-1
@@ -84,6 +84,14 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
'ADD_HISTORY_ENTRIES' (state, ids) {
|
||||
for (const id of ids) {
|
||||
if (!state.history.includes(id)) {
|
||||
state.history.push(id)
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
'UPDATE_OPTIONS_VISIBILITY' (state, visible) {
|
||||
state.optionsVisible = visible
|
||||
}
|
||||
@@ -144,6 +152,7 @@ export default {
|
||||
// Args getters
|
||||
nodes: state => ids => ids.map(id => state.nodes[id]),
|
||||
node: state => id => state.nodes[id],
|
||||
optionsVisible: state => state.optionsVisible
|
||||
optionsVisible: state => state.optionsVisible,
|
||||
history: state => state.history.map(id => state.nodes[id])
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user