|
@@ -47,7 +47,8 @@ export default {
|
|
socketConnected: true,
|
|
socketConnected: true,
|
|
keyIsDown: false,
|
|
keyIsDown: false,
|
|
scrollPosition: { y: 0, x: 0 },
|
|
scrollPosition: { y: 0, x: 0 },
|
|
- aModalIsOpen2: false
|
|
|
|
|
|
+ aModalIsOpen2: false,
|
|
|
|
+ broadcastChannel: null
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -107,6 +108,20 @@ export default {
|
|
if (e.matches === !this.nightmode) this.toggleNightMode();
|
|
if (e.matches === !this.nightmode) this.toggleNightMode();
|
|
});
|
|
});
|
|
|
|
|
|
|
|
+ if (!this.loggedIn) {
|
|
|
|
+ lofig.get("cookie.SIDname").then(sid => {
|
|
|
|
+ this.broadcastChannel = new BroadcastChannel(
|
|
|
|
+ `${sid}.user_login`
|
|
|
|
+ );
|
|
|
|
+ this.broadcastChannel.onmessage = data => {
|
|
|
|
+ if (data) {
|
|
|
|
+ this.broadcastChannel.close();
|
|
|
|
+ window.location.reload();
|
|
|
|
+ }
|
|
|
|
+ };
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+
|
|
document.onkeydown = ev => {
|
|
document.onkeydown = ev => {
|
|
const event = ev || window.event;
|
|
const event = ev || window.event;
|
|
const { keyCode } = event;
|
|
const { keyCode } = event;
|