redirect to /dashboard when shrinking on computer from /list on mobile size

This commit is contained in:
Logorrheique 2024-11-04 10:59:29 +01:00
parent 595b35fb15
commit bb14bc18ca
2 changed files with 14 additions and 2 deletions

4
package-lock.json generated
View file

@ -1,12 +1,12 @@
{
"name": "uptime-kuma",
"version": "2.0.0-dev",
"version": "2.0.0-beta.0",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "uptime-kuma",
"version": "2.0.0-dev",
"version": "2.0.0-beta.0",
"license": "MIT",
"dependencies": {
"@grpc/grpc-js": "~1.8.22",

View file

@ -11,6 +11,18 @@ export default {
components: {
MonitorList,
},
mounted() {
if (!this.$root.isMobile && this.$route.path === '/list') {
this.$router.push('/dashboard');
}
},
watch: {
'$root.isMobile'(newVal) {
if (!newVal && this.$route.path === '/list') {
this.$router.push('/dashboard');
}
}
}
};
</script>