mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-22 17:38:57 +08:00
show version in the footer
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
Reference in New Issue
Block a user