mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 16:25:03 -05:00
Websocket: remove unnecessary notifications
This commit is contained in:
parent
9d9bcc51f8
commit
a5dd6c4968
@ -118,12 +118,14 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
connect: function () {
|
connect: function () {
|
||||||
|
/*
|
||||||
this.$store.dispatch('add_notification', {
|
this.$store.dispatch('add_notification', {
|
||||||
text: 'Connecting to OwnTone server',
|
text: 'Connecting to OwnTone server',
|
||||||
type: 'info',
|
type: 'info',
|
||||||
topic: 'connection',
|
topic: 'connection',
|
||||||
timeout: 2000
|
timeout: 2000
|
||||||
})
|
})
|
||||||
|
*/
|
||||||
|
|
||||||
webapi
|
webapi
|
||||||
.config()
|
.config()
|
||||||
@ -179,12 +181,14 @@ export default {
|
|||||||
})
|
})
|
||||||
|
|
||||||
socket.onopen = function () {
|
socket.onopen = function () {
|
||||||
|
/*
|
||||||
vm.$store.dispatch('add_notification', {
|
vm.$store.dispatch('add_notification', {
|
||||||
text: 'Connection to server established',
|
text: 'Connection to server established',
|
||||||
type: 'primary',
|
type: 'primary',
|
||||||
topic: 'connection',
|
topic: 'connection',
|
||||||
timeout: 2000
|
timeout: 2000
|
||||||
})
|
})
|
||||||
|
*/
|
||||||
vm.reconnect_attempts = 0
|
vm.reconnect_attempts = 0
|
||||||
socket.send(
|
socket.send(
|
||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
@ -215,6 +219,7 @@ export default {
|
|||||||
socket.onclose = function () {
|
socket.onclose = function () {
|
||||||
// vm.$store.dispatch('add_notification', { text: 'Connection closed', type: 'danger', timeout: 2000 })
|
// vm.$store.dispatch('add_notification', { text: 'Connection closed', type: 'danger', timeout: 2000 })
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
socket.onerror = function () {
|
socket.onerror = function () {
|
||||||
vm.reconnect_attempts++
|
vm.reconnect_attempts++
|
||||||
vm.$store.dispatch('add_notification', {
|
vm.$store.dispatch('add_notification', {
|
||||||
@ -224,6 +229,7 @@ export default {
|
|||||||
topic: 'connection'
|
topic: 'connection'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
// When the app becomes active, force an update of all information, because we
|
// When the app becomes active, force an update of all information, because we
|
||||||
// may have missed notifications while the app was inactive.
|
// may have missed notifications while the app was inactive.
|
||||||
|
Loading…
Reference in New Issue
Block a user