Skip to content

Commit

Permalink
fix: refresh smart start list on node added event
Browse files Browse the repository at this point in the history
  • Loading branch information
robertsLando committed Apr 24, 2024
1 parent d830bbc commit 2ae13fa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/views/SmartStart.vue
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ import {
import useBaseStore from '../stores/base.js'
import InstancesMixin from '../mixins/InstancesMixin.js'
import { protocolsItems } from '../lib/items.js'
import { socketEvents } from '@server/lib/SocketEvents'
export default {
name: 'SmartStart',
Expand Down Expand Up @@ -343,6 +344,15 @@ export default {
})
this.refreshItems()
this.bindEvent(socketEvents.nodeAdded, () => {
this.refreshItems()
})
},
beforeDestroy() {
if (this.socket) {
this.unbindEvents()
}
},
methods: {
...mapActions(useBaseStore, ['showSnackbar']),
Expand Down

0 comments on commit 2ae13fa

Please sign in to comment.