Fix websockets and vite hmr on local dev

environments/review-front-deve-otr6gc/deployments/13419
Kasper Seweryn 2022-05-03 02:53:02 +02:00 zatwierdzone przez Georg Krause
rodzic 0b53ec5b1c
commit 461aa51e03
3 zmienionych plików z 7 dodań i 4 usunięć

Wyświetl plik

@ -29,7 +29,7 @@
</li>
</ul>
</div>
<template v-if="document.domain === $store.getters['instance/domain']">
<template v-if="domain === $store.getters['instance/domain']">
<div class="field">
<label for="username-field">
<translate translate-context="Content/Login/Input.Label/Noun">Username or e-mail address</translate>
@ -110,7 +110,8 @@ export default {
password: ''
},
error: '',
isLoading: false
isLoading: false,
domain: document.domain
}
},
computed: {

Wyświetl plik

@ -13,9 +13,10 @@ export const install: InitModule = ({ store }) => {
})
watch(() => store.state.auth.authenticated, (authenticated) => {
console.log(Math.random())
if (authenticated) return open()
close()
})
}, { immediate: true })
whenever(data, () => {
return store.dispatch('ui/websocketEvent', JSON.parse(data.value))
@ -24,5 +25,5 @@ export const install: InitModule = ({ store }) => {
watchEffect(() => {
console.log('Websocket status:', status.value)
})
})
}, { immediate: true })
}

Wyświetl plik

@ -55,4 +55,5 @@ Promise.all(modules).finally(() => {
// TODO (wvffle): Find all array watchers and make them deep
// TODO (wvffle): Migrate to <script setup lang="ts"> and remove allowJs from tsconfig.json
// TODO (wvffle): Replace `from '(../)+` with `from '~/`
// TODO (wvffle): Fix props not being available in template in IntelliJ Idea
// TODO (wvffle): Use navigation guards