diff --git a/public/js/apps/Dashboard/Fhc.js b/public/js/apps/Dashboard/Fhc.js index c9c81cddb..9c55b5f17 100644 --- a/public/js/apps/Dashboard/Fhc.js +++ b/public/js/apps/Dashboard/Fhc.js @@ -233,11 +233,18 @@ const app = Vue.createApp({ renderers: null, }), components: {}, - inject: ["isMobile"], + computed: { + isMobile() { + const smallScreen = window.matchMedia("(max-width: 767px)").matches; + const touchCapable = ("ontouchstart" in window) || navigator.maxTouchPoints > 0; + return smallScreen;// && touchCapable; + }, + }, provide() { return { // provide injectable & watchable language property language: Vue.computed(() => this.$p.user_language), renderers: Vue.computed(() => this.renderers), + isMobile: this.isMobile, } }, methods: {