- fixed problems of '_t' undefined: Was the .js files created automatically, in the folder BOOT !

This commit is contained in:
Paolo Arena
2019-10-10 17:35:30 +02:00
parent 142cd789aa
commit 39ab006e72
11 changed files with 0 additions and 209 deletions

View File

@@ -1,5 +0,0 @@
import axios from 'axios'
export default ({ Vue }) => {
Vue.prototype.$axios = axios
}

View File

@@ -1,5 +0,0 @@
import Dialog from 'quasar'
export default ({ Vue }) => {
Vue.use(Dialog)
}

View File

@@ -1,10 +0,0 @@
import Vue from 'vue'
import { Vue2Dragula } from 'vue2-dragula'
export default ({ Vue }) => {
Vue.use(Vue2Dragula, {
logging: {
service: false // to only log methods in service (DragulaService)
}
})
}

View File

@@ -1,7 +0,0 @@
// import something here
import errorHandler from '../error-handler'
// leave the export, even if you don't use it
export default ({ app, router, Vue }) => {
// something to do
Vue.prototype.$errorHandler = errorHandler
}

View File

@@ -1,8 +0,0 @@
import globalroutines from '../globalroutines'
export default ({ app, router, store, Vue }) => {
// something to do
Vue.prototype.$globalroutines = globalroutines
}

View File

@@ -1,89 +0,0 @@
// import something here
// leave the export, even if you don't use it
export default ({ app, router, store, Vue }) => {
// something to do
// ******************************************
// *** Per non permettere di accedere alle pagine in cui è necessario essere Loggati ! ***
// ******************************************
// Creates a `nextMiddleware()` function which not only
// runs the default `next()` callback but also triggers
// the subsequent Middleware function.
function nextFactory(context, middleware, index) {
const subsequentMiddleware = middleware[index]
// If no subsequent Middleware exists,
// the default `next()` callback is returned.
if (!subsequentMiddleware) return context.next
return (...parameters) => {
// Run the default Vue Router `next()` callback first.
context.next(...parameters)
// Then run the subsequent Middleware with a new
// `nextMiddleware()` callback.
const nextMiddleware = nextFactory(context, middleware, index + 1)
subsequentMiddleware({ ...context, next: nextMiddleware })
};
}
router.beforeEach((to, from, next) => {
if (to.meta.middleware) {
const middleware = Array.isArray(to.meta.middleware)
? to.meta.middleware
: [to.meta.middleware];
const context = {
from,
next,
router,
to,
};
const nextMiddleware = nextFactory(context, middleware, 1)
return middleware[0]({ ...context, next: nextMiddleware })
}
return next()
})
/*router.beforeEach((to, from, next) => {
var accessToken = store.state.session.userSession.accessToken
// ESTANDO LOGEADO
if (accessToken) {
// SE PERMITE IR DE AREA PUBLICA A PRIVADA
if (!from.matched.some(record => record.meta.requiresAuth) && to.matched.some(record => record.meta.requiresAuth)) {
next()
}
// SE PERMITE IR DE UNA AREA PRIVADA A OTRA PRIVADA
if (from.matched.some(record => record.meta.requiresAuth) && to.matched.some(record => record.meta.requiresAuth)) {
next()
}
// NO SE PERMITE IR A UN AREA PUBLICA DESDE UN AREA PRIVADA
if (from.matched.some(record => record.meta.requiresAuth) && !to.matched.some(record => record.meta.requiresAuth)) {
next(false)
}
// SE REDIRIJE AL PANEL
if (!from.matched.some(record => record.meta.requiresAuth) && !to.matched.some(record => record.meta.requiresAuth)) {
next('/Panel')
}
// NO ESTA LOGEADO
} else {
// SE PERMITE IR DE UNA AREA PUBLICA A OTRA PUBLICA
if (!from.matched.some(record => record.meta.requiresAuth) && !to.matched.some(record => record.meta.requiresAuth)) {
next()
}
// SE PERMITE IR DE UNA AREA PRIVADA A UNA PUBLICA (LOGOUT)
if (from.matched.some(record => record.meta.requiresAuth) && !to.matched.some(record => record.meta.requiresAuth)) {
next()
}
// NO SE PERMITE IR DE UNA AREA PUBLICA A UNA PRIVADA
if (!from.matched.some(record => record.meta.requiresAuth) && to.matched.some(record => record.meta.requiresAuth)) {
// REDIRIGIR A LOGIN
next('/')
}
}
})*/
}

View File

@@ -1,9 +0,0 @@
// import something here
import myconfig from '../myconfig'
// leave the export, even if you don't use it
export default ({ Vue }) => {
//Vue.use(myconfig);
// something to do
Vue.prototype.$myconfig = myconfig
}

View File

@@ -1,5 +0,0 @@
import VeeValidate from "vee-validate";
export default ({ Vue }) => {
Vue.use(VeeValidate, { inject: false })
}

View File

@@ -1,46 +0,0 @@
// src/boot/i18n.js
import VueI18n from 'vue-i18n';
import messages from 'src/statics/i18n';
import { tools } from "../store/Modules/tools";
export default ({ app, store, Vue }) => {
Vue.use(VueI18n);
// Vue.config.lang = process.env.LANG_DEFAULT;
let mylang = tools.getItemLS(tools.localStorage.lang)
if ((navigator) && (mylang === '')) {
mylang = navigator.language
console.log(`LANG NAVIGATOR ${mylang}`)
}
if (mylang === '')
mylang = process.env.LANG_DEFAULT;
if (mylang.toLowerCase() === 'es-es')
mylang = 'esEs'
console.log('MYLANG2=', mylang)
console.log('process.env.LANG_DEFAULT=', process.env.LANG_DEFAULT)
Vue.config.lang = mylang
import(`quasar/lang/${mylang}`).then(lang => {
console.log(' ... LANGDEFAULT=', lang)
this.$q.lang.set(lang.default)
import(`src/statics/i18n`).then(function () {
})
})
// console.log("PLUGINS INIT....");
//console.log("LANG_DEFAULT: ")
//console.log(process.env.LANG_DEFAULT)
// Set i18n instance on app
app.lang = new VueI18n({
locale: mylang,
fallbackLocale: mylang,
messages
})
}

View File

@@ -1,20 +0,0 @@
import Vue from 'vue'
import VueIdb from 'vue-idb'
export default ({ Vue }) => {
Vue.use(VueIdb)
}
/*
export default new VueIdb({
version: 1,
database: 'test',
schemas: [
{ categories: '++_id, sub_categ_id, descr_it' }
]
})
*/

View File

@@ -1,5 +0,0 @@
import Vuelidate from 'vuelidate'
export default ({ Vue }) => {
Vue.use(Vuelidate)
}