Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/#359 - Redirect to '/dashboard' on computer when shrinking from '/list' on mobile #5305

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
13 changes: 12 additions & 1 deletion src/pages/List.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand All @@ -20,5 +32,4 @@ export default {
.shadow-box {
padding: 20px;
}

</style>
Loading