Skip to content

Commit

Permalink
fix access to vue3-mq
Browse files Browse the repository at this point in the history
  • Loading branch information
uidp committed Sep 22, 2023
1 parent 49662c8 commit 97ebb5b
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
3 changes: 2 additions & 1 deletion src/components/lern-store/LernstoreDetailView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ export default {
},
};
},
inject: ["mq"],
computed: {
author() {
return getAuthor(this.resource.properties);
Expand All @@ -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(
Expand Down
3 changes: 2 additions & 1 deletion src/components/molecules/Alert.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export default {
mdiInformation,
};
},
inject: ["mq"],
computed: {
notifierData() {
return notifierModule.getNotifier;
Expand All @@ -54,7 +55,7 @@ export default {
return this.notifierData?.status;
},
isMobile() {
return this.$mq === "mobile";
return this.mq === "mobile";
},
text() {
return this.notifierData?.text;
Expand Down
4 changes: 2 additions & 2 deletions src/layouts/loggedOut.layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -58,7 +58,7 @@ export default {
];
},
isMobile() {
return this.$mq === "mobile";
return this.mq === "mobile";
},
},
};
Expand Down
5 changes: 3 additions & 2 deletions src/pages/rooms/RoomOverview.page.vue
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ export default {
inject: {
notifierModule: { from: NOTIFIER_MODULE_KEY },
i18n: { from: I18N_KEY },
mq: "mq",
},
layout: "defaultVuetify",
data() {
Expand Down Expand Up @@ -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";
Expand Down
3 changes: 0 additions & 3 deletions src/plugins/global.d.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import Vue from "vue";

interface Theme {
name: string;
}
declare module "vue/types/vue" {
interface Vue {
$mq(): string;
$theme: Theme;
}
}

0 comments on commit 97ebb5b

Please sign in to comment.