mirror of
https://gitlab.com/RemixDev/deemix-webui.git
synced 2024-12-28 02:16:11 +00:00
Show error text if you can't connect to the local server
This commit is contained in:
parent
71eb7a9949
commit
5fcdd07be4
|
@ -13,7 +13,7 @@
|
|||
</div>
|
||||
|
||||
<BaseLoadingPlaceholder
|
||||
text="Connecting to local server..."
|
||||
:text=loadingText
|
||||
:hidden="isSocketConnected"
|
||||
additional-classes="absolute top-0 left-0 w-screen h-screen bg-black bg-opacity-50 z-50"
|
||||
/>
|
||||
|
@ -55,7 +55,8 @@ export default {
|
|||
},
|
||||
data() {
|
||||
return {
|
||||
isSocketConnected: false
|
||||
isSocketConnected: false,
|
||||
loadingText: "Connecting to local server..."
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
@ -64,6 +65,10 @@ export default {
|
|||
console.log('Connected to WebSocket')
|
||||
this.isSocketConnected = true
|
||||
})
|
||||
socket.addEventListener('error', (event) => {
|
||||
console.log(event)
|
||||
this.loadingText = "Couldn't connect to local server."
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue