some bare minimum to get vue3 boot (no UI yet)
This commit is contained in:
parent
8b96ea9377
commit
ced9c0fa7e
7 changed files with 585 additions and 316 deletions
26
src/main.js
26
src/main.js
|
@ -1,6 +1,4 @@
|
|||
import Vue from 'vue'
|
||||
import VueRouter from 'vue-router'
|
||||
import Vuex from 'vuex'
|
||||
import { createStore } from 'vuex'
|
||||
|
||||
import 'custom-event-polyfill'
|
||||
import './lib/event_target_polyfill.js'
|
||||
|
@ -21,34 +19,18 @@ import pollsModule from './modules/polls.js'
|
|||
import postStatusModule from './modules/postStatus.js'
|
||||
import chatsModule from './modules/chats.js'
|
||||
|
||||
import VueI18n from 'vue-i18n'
|
||||
import { createI18n } from 'vue-i18n'
|
||||
|
||||
import createPersistedState from './lib/persisted_state.js'
|
||||
import pushNotifications from './lib/push_notifications_plugin.js'
|
||||
|
||||
import messages from './i18n/messages.js'
|
||||
|
||||
import VueClickOutside from 'v-click-outside'
|
||||
import PortalVue from 'portal-vue'
|
||||
import VBodyScrollLock from './directives/body_scroll_lock'
|
||||
|
||||
import { FontAwesomeIcon, FontAwesomeLayers } from '@fortawesome/vue-fontawesome'
|
||||
|
||||
import afterStoreSetup from './boot/after_store.js'
|
||||
|
||||
const currentLocale = (window.navigator.language || 'en').split('-')[0]
|
||||
|
||||
Vue.use(Vuex)
|
||||
Vue.use(VueRouter)
|
||||
Vue.use(VueI18n)
|
||||
Vue.use(VueClickOutside)
|
||||
Vue.use(PortalVue)
|
||||
Vue.use(VBodyScrollLock)
|
||||
|
||||
Vue.component('FAIcon', FontAwesomeIcon)
|
||||
Vue.component('FALayers', FontAwesomeLayers)
|
||||
|
||||
const i18n = new VueI18n({
|
||||
const i18n = createI18n({
|
||||
// By default, use the browser locale, we will update it if neccessary
|
||||
locale: 'en',
|
||||
fallbackLocale: 'en',
|
||||
|
@ -75,7 +57,7 @@ const persistedStateOptions = {
|
|||
console.error(e)
|
||||
storageError = true
|
||||
}
|
||||
const store = new Vuex.Store({
|
||||
const store = createStore({
|
||||
modules: {
|
||||
i18n: {
|
||||
getters: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue