diff --git a/src/components/lern-store/LernstoreDetailView.vue b/src/components/lern-store/LernstoreDetailView.vue index 5ed02e679d..ba7f84c347 100644 --- a/src/components/lern-store/LernstoreDetailView.vue +++ b/src/components/lern-store/LernstoreDetailView.vue @@ -225,6 +225,7 @@ export default { }, }; }, + inject: ["mq"], computed: { author() { return getAuthor(this.resource.properties); @@ -233,7 +234,7 @@ export default { return this.resource.preview.url; }, closeButtonStyleSelector() { - return this.$mq === "tabletPortrait" || this.$mq === "mobile"; + return this.mq === "tabletPortrait" || this.mq === "mobile"; }, collectionLink() { let relation = getMetadataAttribute( diff --git a/src/components/molecules/Alert.vue b/src/components/molecules/Alert.vue index 9f4f035d3f..35746e35cc 100644 --- a/src/components/molecules/Alert.vue +++ b/src/components/molecules/Alert.vue @@ -46,6 +46,7 @@ export default { mdiInformation, }; }, + inject: ["mq"], computed: { notifierData() { return notifierModule.getNotifier; @@ -54,7 +55,7 @@ export default { return this.notifierData?.status; }, isMobile() { - return this.$mq === "mobile"; + return this.mq === "mobile"; }, text() { return this.notifierData?.text; diff --git a/src/layouts/loggedOut.layout.vue b/src/layouts/loggedOut.layout.vue index 0aac86dbb5..5722b11aa6 100644 --- a/src/layouts/loggedOut.layout.vue +++ b/src/layouts/loggedOut.layout.vue @@ -32,7 +32,7 @@ export default { TheFooter, }, - inject: { envConfigModule: { from: ENV_CONFIG_MODULE_KEY } }, + inject: { envConfigModule: { from: ENV_CONFIG_MODULE_KEY }, mq: "mq" }, computed: { ghostBaseUrl() { @@ -58,7 +58,7 @@ export default { ]; }, isMobile() { - return this.$mq === "mobile"; + return this.mq === "mobile"; }, }, }; diff --git a/src/pages/rooms/RoomOverview.page.vue b/src/pages/rooms/RoomOverview.page.vue index 41a738f463..0e3ca83295 100644 --- a/src/pages/rooms/RoomOverview.page.vue +++ b/src/pages/rooms/RoomOverview.page.vue @@ -147,6 +147,7 @@ export default { inject: { notifierModule: { from: NOTIFIER_MODULE_KEY }, i18n: { from: I18N_KEY }, + mq: "mq", }, layout: "defaultVuetify", data() { @@ -224,8 +225,8 @@ export default { }, methods: { getDeviceDims() { - this.device = this.$mq; - switch (this.$mq) { + this.device = this.mq; + switch (this.mq) { case "tablet": this.dimensions.colCount = 4; this.dimensions.cellWidth = "4em"; diff --git a/src/plugins/global.d.ts b/src/plugins/global.d.ts index d8e0fc7ee2..144a0ae5a8 100644 --- a/src/plugins/global.d.ts +++ b/src/plugins/global.d.ts @@ -1,11 +1,8 @@ -import Vue from "vue"; - interface Theme { name: string; } declare module "vue/types/vue" { interface Vue { - $mq(): string; $theme: Theme; } }