Zone editor UX improvements, possibly fixed login issue after registration
This commit is contained in:
@ -25,7 +25,6 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<audio ref="bgm" id="bgm" src="/assets/music/bgm.mp3" loop autoplay></audio>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@ -35,12 +34,6 @@ import { useNotificationStore } from '@/stores/notifications'
|
||||
import { useGameStore } from '@/stores/game'
|
||||
import { useAssetStore } from '@/stores/assets'
|
||||
|
||||
const bgm = ref('bgm')
|
||||
if (bgm.value.paused) {
|
||||
addEventListener('click', () => bgm.value.play())
|
||||
addEventListener('keydown', () => bgm.value.play())
|
||||
}
|
||||
|
||||
const gameStore = useGameStore()
|
||||
const notifications = useNotificationStore()
|
||||
const assetStore = useAssetStore()
|
||||
@ -73,7 +66,7 @@ async function loginFunc() {
|
||||
}
|
||||
|
||||
gameStore.setToken(response.token)
|
||||
await gameStore.initConnection()
|
||||
gameStore.initConnection()
|
||||
}
|
||||
|
||||
async function registerFunc() {
|
||||
@ -91,7 +84,6 @@ async function registerFunc() {
|
||||
return
|
||||
}
|
||||
|
||||
gameStore.setToken(response.token)
|
||||
await gameStore.initConnection()
|
||||
await loginFunc()
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user