mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
removed no longer needed plugin init files
This commit is contained in:
parent
c3d25e3a38
commit
86e41b070a
3 changed files with 0 additions and 72 deletions
6
app/src/plugins/bootstrap-vue.js
vendored
6
app/src/plugins/bootstrap-vue.js
vendored
|
@ -1,6 +0,0 @@
|
||||||
import Vue from 'vue'
|
|
||||||
import BootstrapVue from 'bootstrap-vue'
|
|
||||||
|
|
||||||
// Styles are imported in `src/App.vue` <style>
|
|
||||||
|
|
||||||
Vue.use(BootstrapVue)
|
|
|
@ -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()
|
|
||||||
})
|
|
|
@ -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
|
|
||||||
}
|
|
||||||
})
|
|
Loading…
Reference in a new issue