connect client only when authenticated
This commit is contained in:
parent
582a974161
commit
06edeb234d
1 changed files with 5 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue