update
This commit is contained in:
@@ -4,7 +4,7 @@ import { io } from 'socket.io-client'
|
||||
import { parseURL } from 'ufo'
|
||||
|
||||
export const useSignaling = createSharedComposable(() => {
|
||||
const toast = useToast()
|
||||
const { emit } = useEventBus()
|
||||
const { me } = useAuth()
|
||||
|
||||
const socket = shallowRef<Socket>()
|
||||
@@ -41,9 +41,9 @@ export const useSignaling = createSharedComposable(() => {
|
||||
|
||||
watch(connected, (connected) => {
|
||||
if (connected)
|
||||
toast.add({ severity: 'success', summary: 'Connected', closable: false, life: 1000 })
|
||||
emit('socket:connected')
|
||||
else
|
||||
toast.add({ severity: 'error', summary: 'Disconnected', closable: false, life: 1000 })
|
||||
emit('socket:disconnected')
|
||||
}, { immediate: true })
|
||||
|
||||
watch(me, (me) => {
|
||||
|
||||
Reference in New Issue
Block a user