1
0
mirror of https://github.com/louislam/uptime-kuma.git synced 2024-12-22 22:13:20 +02:00

Feat: Move redirect logic to onResize

This commit is contained in:
NihadBadalov 2024-02-17 19:01:43 +01:00
parent 2aebf316a4
commit cfd20f086c
2 changed files with 10 additions and 5 deletions

View File

@ -19,6 +19,16 @@ export default {
onResize() { onResize() {
this.windowWidth = window.innerWidth; this.windowWidth = window.innerWidth;
this.updateBody(); this.updateBody();
if (this.$router.currentRoute.value.path === "/dashboard"
|| this.$router.currentRoute.value.path === "/list") {
this.$router.push({
path: this.isMobile
? "/list"
: "/dashboard",
query: this.$router.currentRoute.value?.query,
});
}
}, },
/** /**

View File

@ -11,11 +11,6 @@ export default {
components: { components: {
MonitorList, MonitorList,
}, },
async mounted() {
if (!this.$root.isMobile) {
this.$router.push("/dashboard");
}
},
}; };
</script> </script>