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:
Couteau Arthur 2025-11-27 21:12:38 +01:00 committed by GitHub
parent 5d1b372072
commit bd2eb30e09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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>