mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-08-10 15:30:41 -04:00
split mobile mixin from socket mixin
This commit is contained in:
parent
d1d000bd74
commit
9ba1743900
4 changed files with 47 additions and 13 deletions
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div :class="$root.theme">
|
||||
<div :class="classes">
|
||||
<div v-if="! $root.socket.connected && ! $root.socket.firstConnect" class="lost-connection">
|
||||
<div class="container-fluid">
|
||||
{{ $root.connectionErrorMsg }}
|
||||
|
@ -79,29 +79,45 @@
|
|||
import Login from "../components/Login.vue";
|
||||
|
||||
export default {
|
||||
|
||||
components: {
|
||||
Login,
|
||||
},
|
||||
|
||||
data() {
|
||||
return {}
|
||||
},
|
||||
computed: {},
|
||||
|
||||
computed: {
|
||||
|
||||
// Theme or Mobile
|
||||
classes() {
|
||||
const classes = {};
|
||||
classes[this.$root.theme] = true;
|
||||
classes["mobile"] = this.$root.isMobile;
|
||||
return classes;
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
watch: {
|
||||
$route (to, from) {
|
||||
this.init();
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.init();
|
||||
},
|
||||
|
||||
methods: {
|
||||
init() {
|
||||
if (this.$route.name === "root") {
|
||||
this.$router.push("/dashboard")
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue