Skip to content
This repository has been archived by the owner on Feb 24, 2021. It is now read-only.

Commit

Permalink
feat(ui): save items per page in local storage (#816)
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando authored Nov 4, 2020
1 parent 0294f83 commit f5ce7c2
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/components/ControlPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
:footer-props="{
itemsPerPageOptions: [10, 20, { text: 'All', value: -1 }]
}"
:items-per-page.sync="nodeTableItems"
item-key="node_id"
class="elevation-1"
>
Expand Down Expand Up @@ -672,6 +673,9 @@ export default {
}
},
watch: {
nodeTableItems (val) {
localStorage.setItem('nodes_itemsPerPage', val)
},
dialogValue (val) {
val || this.closeDialog()
},
Expand Down Expand Up @@ -724,6 +728,7 @@ export default {
debugActive: false,
selectedScene: null,
cnt_status: 'Unknown',
nodeTableItems: 10,
newScene: '',
scene_values: [],
dialogValue: false,
Expand Down Expand Up @@ -1359,6 +1364,10 @@ export default {
mounted () {
var self = this
const itemsPerPage = parseInt(localStorage.getItem('nodes_itemsPerPage'))
this.nodeTableItems = !isNaN(itemsPerPage) ? itemsPerPage : 10
this.socket.on(this.socketEvents.controller, data => {
self.cnt_status = data.help
})
Expand Down

0 comments on commit f5ce7c2

Please sign in to comment.