PASSAGGIO A VITE !
AGG. 1.1.23
This commit is contained in:
@@ -3,27 +3,27 @@ import {
|
||||
defineComponent, onBeforeMount, onBeforeUnmount, onMounted, ref, toRefs, watch, inject, computed, nextTick,
|
||||
} from 'vue'
|
||||
|
||||
import { tools } from '@store/Modules/tools'
|
||||
import { tools } from '@tools'
|
||||
|
||||
import { shared_consts } from '@src/common/shared_vuejs'
|
||||
import { useI18n } from '@src/boot/i18n'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import { boot } from 'quasar/wrappers'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { static_data } from '@/db/static_data'
|
||||
import { static_data } from '@src/db/static_data'
|
||||
import messagePopover from '../../layouts/toolbar/messagePopover/messagePopover.vue'
|
||||
import notifPopover from '../../layouts/toolbar/notifPopover/notifPopover.vue'
|
||||
import coinsPopover from '../../layouts/toolbar/coinsPopover/coinsPopover.vue'
|
||||
import drawer from '../../layouts/drawer/drawer.vue'
|
||||
import { CMyAvatar } from '@/components/CMyAvatar'
|
||||
import { CMyFieldDb } from '@/components/CMyFieldDb'
|
||||
import { CSelectUserActive } from '@/components/CSelectUserActive'
|
||||
import { CMyAvatar } from '@src/components/CMyAvatar'
|
||||
import { CMyFieldDb } from '@src/components/CMyFieldDb'
|
||||
import { CSelectUserActive } from '@src/components/CSelectUserActive'
|
||||
import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useGlobalStore } from '@store/globalStore'
|
||||
import { useUserStore } from '@store/UserStore'
|
||||
import { useProducts } from '@store/Products'
|
||||
|
||||
import MixinUsers from '../../mixins/mixin-users'
|
||||
import { CMyCart, CSigninNoreg } from '@/components'
|
||||
import { CMyCart, CSigninNoreg } from '@src/components'
|
||||
import { costanti } from '@costanti'
|
||||
import { useNotifStore } from '@src/store/NotifStore'
|
||||
|
||||
@@ -80,6 +80,14 @@ export default defineComponent({
|
||||
|
||||
const leftDrawerOpen = ref(globalStore.leftDrawerOpen)
|
||||
|
||||
const editOn = computed({
|
||||
get: () => globalStore.editOn,
|
||||
set: val => {
|
||||
tools.updateEditOn(val)
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
const getClassColorHeader = computed(() => {
|
||||
// if (tools.isTest()) return 'bg-light-blue'
|
||||
// if (tools.isDebug()) return 'bg-info'
|
||||
@@ -227,22 +235,6 @@ export default defineComponent({
|
||||
return str.replace(/(-\w)/g, (m) => m[1].toUpperCase())
|
||||
}
|
||||
|
||||
function setLangAtt(mylang: string) {
|
||||
|
||||
// console.log('LANG =', mylang)
|
||||
// console.log('PRIMA $q.lang.isoName', $q.lang.isoName)
|
||||
|
||||
// dynamic import, so loading on demand only
|
||||
import(`quasar/lang/${mylang}`).then((lang2: any) => {
|
||||
$q.lang.set(lang2.default)
|
||||
|
||||
import('../../statics/i18n').then(() => {
|
||||
// console.log('MY LANG DOPO=', $q.lang.isoName)
|
||||
})
|
||||
})
|
||||
|
||||
globalStore.addDynamicPages($router)
|
||||
}
|
||||
|
||||
function setshortlang(mylang: string) {
|
||||
static_data.lang_available.forEach((langavail: any) => {
|
||||
@@ -320,7 +312,7 @@ export default defineComponent({
|
||||
|
||||
setshortlang(mylangtopass)
|
||||
|
||||
setLangAtt(mylangtopass)
|
||||
tools.setLangAtt(mylangtopass)
|
||||
|
||||
userStore.setLangServer()
|
||||
},
|
||||
@@ -406,12 +398,12 @@ export default defineComponent({
|
||||
function getAppVersion() {
|
||||
// return "AA"
|
||||
let strv = ''
|
||||
if (process.env.DEV) {
|
||||
if (import.meta.env.DEV) {
|
||||
strv = 'DEV '
|
||||
} else if (tools.isTest()) {
|
||||
strv = 'TEST '
|
||||
}
|
||||
return `${strv}v. ${process.env.APP_VERSION}`
|
||||
return `${strv}v. ${import.meta.env.VITE_APP_VERSION}`
|
||||
}
|
||||
|
||||
function getLangAtt() {
|
||||
@@ -443,7 +435,7 @@ export default defineComponent({
|
||||
|
||||
mylang = toolsext.checkLangPassed($q, $router, mylang)
|
||||
|
||||
setLangAtt(mylang)
|
||||
tools.setLangAtt(mylang)
|
||||
setshortlang(mylang)
|
||||
}
|
||||
|
||||
@@ -632,6 +624,7 @@ export default defineComponent({
|
||||
userStore,
|
||||
clickMenu3Orizz,
|
||||
isEditor,
|
||||
editOn,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user