npm run format

This commit is contained in:
2024-06-02 02:35:42 +02:00
parent 8329afe897
commit 86b80f8244
28 changed files with 572 additions and 562 deletions

View File

@ -15,20 +15,23 @@ import Register from '@/components/screens/Register.vue'
import Characters from '@/components/screens/Characters.vue'
import Game from '@/components/Game.vue'
const screen:Ref<string> = ref('login');
const socket = useSocketStore();
const screen: Ref<string> = ref('login')
const socket = useSocketStore()
socket.$subscribe((mutation, state) => {
if (!state.connection) {
screen.value = 'login';
}
if (state.connection){
screen.value = 'characters';
if (state.character) {
screen.value = 'game';
socket.$subscribe(
(mutation, state) => {
if (!state.connection) {
screen.value = 'login'
}
}
}, { detached: true })
</script>
if (state.connection) {
screen.value = 'characters'
if (state.character) {
screen.value = 'game'
}
}
},
{ detached: true }
)
</script>