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:
@ -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>
|
||||
|
||||
|
Reference in New Issue
Block a user