Kuma/src/pages/List.vue
Manthan Ankolekar ddf35ec96f 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).
2024-12-24 11:33:02 +05:30

31 lines
551 B
Vue

<template>
<transition name="slide-fade" appear>
<MonitorList :scrollbar="true" />
</transition>
</template>
<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>
<style lang="scss" scoped>
@import "../assets/vars";
.shadow-box {
padding: 20px;
}
</style>