First Committ

This commit is contained in:
Paolo Arena
2021-08-31 18:09:59 +02:00
commit 1d6c55807c
299 changed files with 55382 additions and 0 deletions

7
src/boot/.directory Executable file
View File

@@ -0,0 +1,7 @@
[Dolphin]
Timestamp=2019,10,10,17,25,7
Version=4
ViewMode=1
[Settings]
HiddenFilesShown=true

0
src/boot/.gitkeep Executable file
View File

20
src/boot/axios.ts Executable file
View File

@@ -0,0 +1,20 @@
import axios from 'axios'
import { boot } from 'quasar/wrappers'
// const api = axios.create({ baseURL: 'https://api.example.com' })
export default boot(({ app }) => {
// for use inside Vue files (Options API) through this.$axios and this.$api
app.config.globalProperties.$axios = axios
// ^ ^ ^ this will allow you to use this.$axios (for Vue Options API form)
// so you won't necessarily have to import axios in each vue file
// app.config.globalProperties.$api = api
// ^ ^ ^ this will allow you to use this.$api (for Vue Options API form)
// so you can easily perform requests against your app's API
//
})
export { axios }
// export { axios, api }

6
src/boot/dialog.ts Executable file
View File

@@ -0,0 +1,6 @@
import { Dialog } from 'quasar'
import { boot } from 'quasar/wrappers'
export default boot(({ app }) => {
app.use(Dialog)
})

12
src/boot/dragula.ts.off Executable file
View File

@@ -0,0 +1,12 @@
import { Vue, Options } from "vue-class-component"
// import { Vue2Dragula } from 'vue2-dragula'
import { boot } from 'quasar/wrappers'
export default ({ app }) => {
app.use(Vue2Dragula, {
logging: {
service: false // to only log methods in service (DragulaService)
}
})
}

9
src/boot/error-handler.ts Executable file
View File

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

8
src/boot/globalroutines.ts Executable file
View File

@@ -0,0 +1,8 @@
import { boot } from 'quasar/wrappers'
import globalroutines from '../globalroutines'
// @ts-ignore
export default boot(({ app, router, store }) => {
// something to do
app.config.globalProperties.$globalroutines = globalroutines
})

6
src/boot/googlemap.ts Executable file
View File

@@ -0,0 +1,6 @@
// import google from '../googlemap'
import { boot } from 'quasar/wrappers'
export default boot(({ app, router }) => {
// app.config.globalProperties.$google = google
})

57
src/boot/guard.ts Executable file
View File

@@ -0,0 +1,57 @@
// import something here
// import { isEqual } from 'lodash'
// import { ProgressBar } from '@src/store/Modules/Interface'
// import { UserStore } from "@store"
// @ts-ignore
import { boot } from 'quasar/wrappers'
export default boot(({ app, router }) => {
// ******************************************
// *** 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.
/* 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('/')
}
}
}) */
})

33
src/boot/i18n.ts Executable file
View File

@@ -0,0 +1,33 @@
import { createI18n } from 'vue-i18n'
import messages from '../statics/i18n'
import { boot } from 'quasar/wrappers'
// you'll need to create the src/i18n/index.js file too
const i18n = createI18n({
locale: 'it',
messages,
})
export default ({ app }: { app: any }) => {
// Set i18n instance on app
app.use(i18n)
}
export function useI18n() {
// eslint-disable-next-line @typescript-eslint/unbound-method
const {
t, te, tm, rt, d, n, ...globalApi
} = i18n.global;
return {
t: t.bind(i18n),
te: te.bind(i18n),
tm: tm.bind(i18n),
rt: rt.bind(i18n),
d: d.bind(i18n),
n: n.bind(i18n),
...globalApi,
};
}
export { i18n }

8
src/boot/local-storage.ts Executable file
View File

@@ -0,0 +1,8 @@
// import something here
import { boot } from 'quasar/wrappers'
import { _LocalStorage } from '../local-storage'
// leave the export, even if you don't use it
export default boot(({ app, router }) => {
// something to do
app.config.globalProperties.$_localStorage = _LocalStorage
})

5
src/boot/mycharts.ts.off Executable file
View File

@@ -0,0 +1,5 @@
import Chartkick from 'vue-chartkick'
export default async ({ Vue }) => {
Vue.use(Chartkick)
}

10
src/boot/myconfig.ts Executable file
View File

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

7
src/boot/mypao.ts Normal file
View File

@@ -0,0 +1,7 @@
import { boot } from 'quasar/wrappers'
// "async" is optional;
// more info on params: https://v2.quasar.dev/quasar-cli/boot-files
export default boot(async ({ app, router }) => {
// something to do
})

View File

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

7
src/boot/vee-validate.ts Normal file
View File

@@ -0,0 +1,7 @@
import { boot } from 'quasar/wrappers'
// "async" is optional;
// more info on params: https://v2.quasar.dev/quasar-cli/boot-files
export default boot(async (/* { app, router, ... } */) => {
// something to do
})

6
src/boot/vee-validate.ts.off Executable file
View File

@@ -0,0 +1,6 @@
import VeeValidate from 'vee-validate'
import { boot } from 'quasar/wrappers'
export default boot(({ app }) => {
app.use(VeeValidate, { inject: false })
})

34
src/boot/vue-i18n.ts.off Executable file
View File

@@ -0,0 +1,34 @@
// src/boot/vue-i18n.js
import { createI18n } from 'vue-i18n'
import { toolsext } from '@src/store/Modules/toolsext'
import messages from '../statics/i18n'
import { tools } from '../store/Modules/tools'
import { createPinia } from 'pinia'
export default ({ app }: { app: any }) => {
// Vue.config.lang = process.env.LANG_DEFAULT;
const pinia = createPinia()
app.use(pinia)
let mylang = tools.getItemLS(toolsext.localStorage.lang)
console.log(`LANG LocalStorage ${mylang}`)
if ((navigator)) {
const mylangnav = navigator.language
console.log(`LANG NAVIGATOR ${mylangnav}`)
if (mylang === '') mylang = mylangnav
}
mylang = toolsext.checkLangPassed(mylang)
app.config.globalProperties.lang = mylang
const i18n = createI18n({
fallbackLocale: mylang,
locale: 'en-US',
messages,
})
app.use(i18n)
}

7
src/boot/vue-idb.ts.off Executable file
View File

@@ -0,0 +1,7 @@
import VueIdb from 'vue-idb'
import { boot } from "quasar/wrappers"
export default boot(({ app }) => {
app.use(VueIdb)
})

6
src/boot/vue-meta.ts.off Executable file
View File

@@ -0,0 +1,6 @@
import Component from 'vue-class-component'
// Register the meta hook
Component.registerHooks([
'meta'
])

7
src/boot/vuelidate.ts Executable file
View File

@@ -0,0 +1,7 @@
import Vuelidate from 'vuelidate'
import { boot } from 'quasar/wrappers'
export default boot(({ app }) => {
// @ts-ignore
app.use(Vuelidate)
})

8
src/boot/vuetelinput.ts.off Executable file
View File

@@ -0,0 +1,8 @@
import VueTelInput from 'vue-tel-input'
import { boot } from "quasar/wrappers"
// "async" is optional
export default boot(async ({ app }) => {
// something to do
app.use(VueTelInput)
})