Reactive state cookie

This commit is contained in:
2022-09-26 18:33:21 -04:00
parent 030487d728
commit 6ae57cfd79
5 changed files with 39 additions and 32 deletions

View File

@ -44,7 +44,6 @@
</style>
<script>
import cookie from './cookie.mjs';
import vistax from './vistax.mjs';
export default {
@ -74,7 +73,7 @@
data() {
return {
show: false,
host: cookie.get('host'),
host: vistax.state.host,
x_client: this.client,
x_server: this.server,
x_user: this.user,
@ -85,7 +84,7 @@
},
watch: {
host(value) {
cookie.set('host', value);
vistax.state.host = value;
this.logout();
},
client(value) { this.x_client = value; },