mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-30 00:03:31 -05:00
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).
This commit is contained in:
parent
be2faf64ce
commit
ddf35ec96f
@ -6,11 +6,18 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import MonitorList from "../components/MonitorList.vue";
|
import MonitorList from "../components/MonitorList.vue";
|
||||||
|
import mobileMixin from "../mixins/mobile.js";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
MonitorList,
|
MonitorList,
|
||||||
},
|
},
|
||||||
|
mixins: [mobileMixin],
|
||||||
|
created() {
|
||||||
|
if (!this.isMobile) {
|
||||||
|
this.$router.push("/dashboard");
|
||||||
|
}
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user