diff --git a/frontend/src/main.js b/frontend/src/main.js index 2f30736..c628886 100644 --- a/frontend/src/main.js +++ b/frontend/src/main.js @@ -7,37 +7,43 @@ import App from './App.vue'; import router from './router'; import store from './store'; import * as api from './api'; -import utils from './utils'; import { models } from './constants'; +import Utils from './utils'; // Internationalisation. Vue.use(VueI18n); - -// Create VueI18n instance with options const i18n = new VueI18n(); Vue.use(Buefy, {}); Vue.config.productionTip = false; -// Custom global elements. -Vue.prototype.$api = api; -Vue.prototype.$utils = utils; +// Globals. +const ut = new Utils(i18n); +Vue.mixin({ + computed: { + $utils: () => ut, + $api: () => api, + }, -Vue.prototype.$reloadServerConfig = () => { - // Get the config.js