show version in the footer

This commit is contained in:
LouisLam
2021-07-13 18:08:12 +08:00
parent b3a5d868a7
commit 010ebea210
3 changed files with 35 additions and 11 deletions

View File

@@ -9,6 +9,7 @@ export default {
data() {
return {
info: { },
socket: {
token: null,
firstConnect: true,
@@ -44,6 +45,10 @@ export default {
transports: ['websocket']
});
socket.on('info', (info) => {
this.info = info;
});
socket.on('setup', (monitorID, data) => {
this.$router.push("/setup")
});
@@ -280,6 +285,13 @@ export default {
watch: {
// Reload the SPA if the server version is changed.
"info.version"(to, from) {
if (from && from !== to) {
window.location.reload()
}
},
remember() {
localStorage.remember = (this.remember) ? "1" : "0"
}