2023-09-20 17:34:33 +02:00
|
|
|
import '/resources/js_vue3/assets/app.scss';
|
|
|
|
|
|
|
|
import { createApp } from 'vue'
|
2023-09-22 12:00:16 +02:00
|
|
|
import { i18nVue } from 'laravel-vue-i18n'
|
2023-09-22 15:07:47 +02:00
|
|
|
import { createPinia } from 'pinia'
|
2023-09-20 17:34:33 +02:00
|
|
|
import App from './App.vue'
|
|
|
|
import router from './router'
|
2023-09-21 17:10:12 +02:00
|
|
|
import Notifications from '@kyvg/vue3-notification'
|
2023-09-22 13:10:42 +02:00
|
|
|
import FontAwesomeIcon from './icons'
|
2023-09-20 17:34:33 +02:00
|
|
|
|
2023-09-22 15:35:58 +02:00
|
|
|
import ResponsiveWidthWrapper from '@/layouts/ResponsiveWidthWrapper.vue'
|
|
|
|
import FormWrapper from '@/layouts/FormWrapper.vue'
|
|
|
|
|
|
|
|
|
2023-09-20 17:34:33 +02:00
|
|
|
const app = createApp(App)
|
|
|
|
|
2023-09-22 11:32:24 +02:00
|
|
|
// Immutable app properties provided by the laravel blade view
|
|
|
|
app.config.globalProperties.$2fauth = {
|
|
|
|
config: window.appConfig,
|
|
|
|
version: window.appVersion,
|
|
|
|
isDemoApp: window.isDemoApp,
|
|
|
|
isTestingApp: window.isTestingApp,
|
|
|
|
langs: window.appLocales
|
|
|
|
}
|
|
|
|
|
2023-09-22 15:07:47 +02:00
|
|
|
app.use(createPinia())
|
2023-09-20 17:34:33 +02:00
|
|
|
app.use(router)
|
2023-09-22 12:00:16 +02:00
|
|
|
app.use(i18nVue, {
|
|
|
|
resolve: async lang => {
|
|
|
|
const langs = import.meta.glob('../lang/*.json');
|
|
|
|
return await langs[`../lang/${lang}.json`]();
|
|
|
|
}
|
|
|
|
})
|
2023-09-21 17:10:12 +02:00
|
|
|
app.use(Notifications)
|
2023-09-22 15:35:58 +02:00
|
|
|
app
|
|
|
|
.component('font-awesome-icon', FontAwesomeIcon)
|
|
|
|
.component('responsive-width-wrapper', ResponsiveWidthWrapper)
|
|
|
|
.component('form-wrapper', FormWrapper)
|
2023-09-22 13:10:42 +02:00
|
|
|
|
2023-09-20 17:34:33 +02:00
|
|
|
app.mount('#app')
|