diff --git a/src/boot/axios.js b/src/boot/axios.js deleted file mode 100644 index 11b8239..0000000 --- a/src/boot/axios.js +++ /dev/null @@ -1,5 +0,0 @@ -import axios from 'axios' - -export default ({ Vue }) => { - Vue.prototype.$axios = axios -} diff --git a/src/boot/dialog.js b/src/boot/dialog.js deleted file mode 100644 index 5b145d3..0000000 --- a/src/boot/dialog.js +++ /dev/null @@ -1,5 +0,0 @@ -import Dialog from 'quasar' - -export default ({ Vue }) => { - Vue.use(Dialog) -} diff --git a/src/boot/dragula.js b/src/boot/dragula.js deleted file mode 100644 index 76abac7..0000000 --- a/src/boot/dragula.js +++ /dev/null @@ -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) - } - }) -} diff --git a/src/boot/error-handler.js b/src/boot/error-handler.js deleted file mode 100644 index 77e6339..0000000 --- a/src/boot/error-handler.js +++ /dev/null @@ -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 -} diff --git a/src/boot/globalroutines.js b/src/boot/globalroutines.js deleted file mode 100644 index b3ff5a0..0000000 --- a/src/boot/globalroutines.js +++ /dev/null @@ -1,8 +0,0 @@ -import globalroutines from '../globalroutines' - -export default ({ app, router, store, Vue }) => { - // something to do - Vue.prototype.$globalroutines = globalroutines -} - - diff --git a/src/boot/guard.js b/src/boot/guard.js deleted file mode 100644 index 45dde93..0000000 --- a/src/boot/guard.js +++ /dev/null @@ -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('/') - } - } - })*/ - -} diff --git a/src/boot/myconfig.js b/src/boot/myconfig.js deleted file mode 100644 index 64d6adc..0000000 --- a/src/boot/myconfig.js +++ /dev/null @@ -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 -} diff --git a/src/boot/vee-validate.js b/src/boot/vee-validate.js deleted file mode 100644 index d849de1..0000000 --- a/src/boot/vee-validate.js +++ /dev/null @@ -1,5 +0,0 @@ -import VeeValidate from "vee-validate"; - -export default ({ Vue }) => { - Vue.use(VeeValidate, { inject: false }) -} diff --git a/src/boot/vue-i18n.js b/src/boot/vue-i18n.js deleted file mode 100644 index 7e436ac..0000000 --- a/src/boot/vue-i18n.js +++ /dev/null @@ -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 - }) -} - diff --git a/src/boot/vue-idb.js b/src/boot/vue-idb.js deleted file mode 100644 index 3b1f502..0000000 --- a/src/boot/vue-idb.js +++ /dev/null @@ -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' } - ] -}) -*/ diff --git a/src/boot/vuelidate.js b/src/boot/vuelidate.js deleted file mode 100644 index 30d04fc..0000000 --- a/src/boot/vuelidate.js +++ /dev/null @@ -1,5 +0,0 @@ -import Vuelidate from 'vuelidate' - -export default ({ Vue }) => { - Vue.use(Vuelidate) -}