mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-06-05 04:42:34 +02:00

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).
31 lines
551 B
Vue
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>
|