Refactored disconnect watcher

This commit is contained in:
2022-09-27 21:39:27 -04:00
parent aa3a3b06a7
commit 93994d5dd7
2 changed files with 4 additions and 6 deletions

View File

@ -45,6 +45,8 @@
</style>
<script>
import { watchEffect } from 'vue';
import vistax from './vistax.mjs';
export default {
@ -122,6 +124,7 @@
this.$emit('update:server', this.x_server = (await this.x_client.serverinfo()).result);
console.log('Backend secret', this.secret);
console.log(this.banner);
var stop = watchEffect(() => { if(!this.x_client.connected.value) { stop(); this.x_client = this.x_server = this.x_user = null; this.fail = true; } });
} else this.fail = true;
},
async login(evt) {