Fix list route for responsive UI

Related to #359

Add a check to redirect to the homepage if the view is not mobile in the `src/pages/List.vue` file.

* Import `mobileMixin` in `src/pages/List.vue`.
* Add a `created` lifecycle hook to check if the view is mobile and redirect to `/dashboard` if not.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/louislam/uptime-kuma/issues/359?shareId=XXXX-XXXX-XXXX-XXXX).
pull/5471/head
Manthan Ankolekar 2 days ago
parent be2faf64ce
commit ddf35ec96f

@ -6,11 +6,18 @@
<script>
import MonitorList from "../components/MonitorList.vue";
import mobileMixin from "../mixins/mobile.js";
export default {
components: {
MonitorList,
},
mixins: [mobileMixin],
created() {
if (!this.isMobile) {
this.$router.push("/dashboard");
}
},
};
</script>

Loading…
Cancel
Save