removed no longer needed plugin init files

This commit is contained in:
Axolotle 2020-08-29 19:09:59 +02:00
parent c3d25e3a38
commit 86e41b070a
3 changed files with 0 additions and 72 deletions

View file

@ -1,6 +0,0 @@
import Vue from 'vue'
import BootstrapVue from 'bootstrap-vue'
// Styles are imported in `src/App.vue` <style>
Vue.use(BootstrapVue)

View file

@ -1,34 +0,0 @@
import Vue from 'vue'
import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
function loadLocaleMessages () {
const locales = require.context('../locales', true, /[A-Za-z0-9-_,\s]+\.json$/i)
const messages = {}
locales.keys().forEach(key => {
const matched = key.match(/([A-Za-z0-9-_]+)\./i)
if (matched && matched.length > 1) {
const locale = matched[1]
messages[locale] = locales(key)
}
})
return messages
}
function getBrowserLocale () {
const navigatorLocale = navigator.languages !== undefined
? navigator.languages[0]
: navigator.language
return !navigatorLocale
? process.env.VUE_APP_I18N_LOCALE || 'en'
: navigatorLocale
}
export default new VueI18n({
locale: getBrowserLocale(),
fallbackLocale: process.env.VUE_APP_I18N_FALLBACK_LOCALE || 'en',
// TODO : chunk locales json and lazy load them
messages: loadLocaleMessages()
})

View file

@ -1,32 +0,0 @@
import Vue from 'vue'
import Vuex from 'vuex'
import dataStore from '@/helpers/dataStore'
Vue.use(Vuex)
export default new Vuex.Store({
state: {
connected: localStorage.getItem('connected') === 'true',
yunohostInfos: null
},
// Mutations must be synchronous. They are used to change the store state.
mutations: {
'CONNECTED' (state, connected) {
localStorage.setItem('connected', connected)
state.connected = connected
if (!connected) {
state.yunohostInfos = null
}
},
'YUNOHOST_INFOS' (state, data) {
state.yunohostInfos = data
}
},
// Actions may be asynchronous. They are used to commit mutations.
actions: {
},
modules: {
data: dataStore
}
})