ui_migration feat(deps): Modified src/ main.js for vue3 compatibility

This commit is contained in:
Antonio Anaya 2026-01-20 18:58:38 -06:00
parent 70cdce3323
commit 8ced9f8b75
2 changed files with 16 additions and 14 deletions

View file

@ -1,4 +1,4 @@
<template>
<template :key="shortcut.shortcut">
<div id="app" class="uk-height-1-1 uk-margin-remove uk-padding-remove" :class="handleTheme">
<!-- this stops the app loading until setConnected is committed in the store, this means
other components will not load until we have Thing Descriptions. -->
@ -10,7 +10,6 @@
<button class="uk-modal-close-default" type="button" uk-close></button>
<div
v-for="shortcut in keyboardManual"
:key="shortcut.shortcut"
class="uk-margin-small"
uk-grid
>
@ -26,10 +25,9 @@
// Import components
import appContent from "./components/appContent.vue";
import loadingContent from "./components/loadingContent.vue";
import MouseTrap from "mousetrap";
var Mousetrap = require("mousetrap");
Mousetrap.prototype.stopCallback = function (e, element) {
MouseTrap.prototype.stopCallback = function (e, element) {
// if the element has the class "mousetrap" then no need to stop
if ((" " + element.className + " ").indexOf(" mousetrap ") > -1) {
return false;

View file

@ -1,4 +1,4 @@
import Vue from "vue";
import { createApp } from 'vue';
import App from "./App.vue";
import store from "./store";
import UIkit from "uikit";
@ -21,15 +21,19 @@ UIkit.mixin(
"accordion",
);
// Create Vue app
const app = createApp(App);
// Use visibility observer
Vue.use(VueObserveVisibility);
app.use(VueObserveVisibility);
Vue.config.productionTip = false;
// Disable production tip for Vue
app.config.productionTip = false;
Vue.mixin(queryMixin);
Vue.mixin(modalMixin);
// Use global mixins
app.mixin(queryMixin);
app.mixin(modalMixin);
new Vue({
store,
render: (h) => h(App),
}).$mount("#app");
// Use Vuex store
app.use(store);
app.mount("#app");