connect client only when authenticated

This commit is contained in:
Julian Krauser 2025-03-10 11:10:40 +01:00
parent 582a974161
commit 06edeb234d

View file

@ -28,6 +28,11 @@ import { useMissionStore } from "./stores/admin/operation/mission";
<script lang="ts">
export default defineComponent({
watch: {
authCheck() {
if (this.authCheck) {
this.connectClient();
}
},
connectionStatus() {
if (this.connectionStatus) {
this.initialize();
@ -48,7 +53,6 @@ export default defineComponent({
window.addEventListener("online", function (e) {
e.preventDefault();
});
this.connectClient();
},
beforeUnmount() {
window.removeEventListener("online", function (e) {