-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
base: master
Are you sure you want to change the base?
Conversation
@CommanderStorm Gentle ping ^^ |
src/pages/List.vue
Outdated
watch: { | ||
"$root.isMobile"(newVal) { | ||
if (!newVal && this.$route.path === "/list") { | ||
this.$router.push("/dashboard"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest you tu use replace
instead of push
. You'll avoid having the /list
and the /dashboard
in the browser history (you'll instead only have /dashboard
).
this.$router.replace({ path: "/new_path" })
Doc: https://router.vuejs.org/guide/essentials/navigation.html#Replace-current-location
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks !
src/pages/List.vue
Outdated
}, | ||
mounted() { | ||
if (!this.$root.isMobile && this.$route.path === "/list") { | ||
this.$router.push("/dashboard"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same than before!
@CommanderStorm Hi, the PR is ready ! |
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
The changes are fixing the issues #359 .
The bug is when a user use the mobile interface and go '/list' then shrinking or switch to computer size, there is a duplication of monitoring component.
I setup a redirection when the user shrink/switch to computer to /dashboard
Fixes #(issue)
#359
Type of change
Please delete any options that are not relevant.
Checklist
Screenshots (if any)
2024-10-27.11-53-50.mp4