mirror of
https://github.com/koichixD/uptime-kuma.git
synced 2026-08-29 04:01:01 +00:00
fix: Redirect to '/dashboard' on computer when shrinking from '/list' on mobile (#5305)
Co-authored-by: Louis Lam <louislam@users.noreply.github.com> Co-authored-by: Frank Elsinga <frank@elsinga.de>
This commit is contained in:
+12
-1
@@ -11,6 +11,18 @@ export default {
|
||||
components: {
|
||||
MonitorList,
|
||||
},
|
||||
watch: {
|
||||
"$root.isMobile"(newVal) {
|
||||
if (!newVal && this.$route.path === "/list") {
|
||||
this.$router.replace({ path: "/dashboard" });
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (!this.$root.isMobile && this.$route.path === "/list") {
|
||||
this.$router.replace({ path: "/dashboard" });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
@@ -20,5 +32,4 @@ export default {
|
||||
.shadow-box {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user