forked from noxious/client
Worked on zone manager
This commit is contained in:
@ -30,14 +30,12 @@
|
||||
import { ref } from 'vue'
|
||||
import { login, register } from '@/services/authentication'
|
||||
import { useNotificationStore } from '@/stores/notifications'
|
||||
import ZoneEditor from '@/components/utilities/zoneEditor/ZoneEditor.vue'
|
||||
import Modal from '@/components/utilities/Modal.vue'
|
||||
import { useSocketStore } from '@/stores/socket'
|
||||
|
||||
const bgm = ref('bgm')
|
||||
if (bgm.value.paused) {
|
||||
window.addEventListener('click', () => bgm.value.play())
|
||||
window.addEventListener('keydown', () => bgm.value.play())
|
||||
addEventListener('click', () => bgm.value.play())
|
||||
addEventListener('keydown', () => bgm.value.play())
|
||||
}
|
||||
|
||||
const socket = useSocketStore()
|
||||
@ -61,7 +59,7 @@ async function loginFunc() {
|
||||
}
|
||||
|
||||
socket.setToken(response.token)
|
||||
socket.initConnection();
|
||||
socket.initConnection()
|
||||
}
|
||||
|
||||
async function registerFunc() {
|
||||
@ -80,7 +78,7 @@ async function registerFunc() {
|
||||
}
|
||||
|
||||
socket.setToken(response.token)
|
||||
socket.initConnection();
|
||||
socket.initConnection()
|
||||
}
|
||||
</script>
|
||||
|
||||
|
Reference in New Issue
Block a user