1
0
forked from noxious/client

Fixed characters not showing after logging in, added loading screen before showing characters, worked on GM tools

This commit is contained in:
2024-06-10 02:39:00 +02:00
parent 2f7153fbfe
commit 3e003962dc
10 changed files with 85 additions and 26 deletions

View File

@ -32,6 +32,7 @@ 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) {
@ -39,6 +40,7 @@ if (bgm.value.paused) {
window.addEventListener('keydown', () => bgm.value.play())
}
const socket = useSocketStore()
const notifications = useNotificationStore()
const username = ref('')
const password = ref('')
@ -55,7 +57,11 @@ async function loginFunc() {
if (response.success === undefined) {
notifications.addNotification({ message: response.error })
return
}
socket.setToken(response.token)
socket.initConnection();
}
async function registerFunc() {
@ -70,7 +76,11 @@ async function registerFunc() {
if (response.success === undefined) {
notifications.addNotification({ message: response.error })
return
}
socket.setToken(response.token)
socket.initConnection();
}
</script>