- Aggiunto le Statistiche di visualizzazione delle pagine.

- Aggiunto il componente per visualizzare le statistiche
This commit is contained in:
Surya Paolo
2025-07-08 16:19:12 +02:00
parent 7f5ff3da64
commit 40ec5465b2
61 changed files with 3593791 additions and 654 deletions

View File

@@ -1,7 +1,7 @@
import { defineConfig } from '#q-app/wrappers'
import { defineConfig } from '#q-app/wrappers';
import { fileURLToPath } from 'node:url';
import path from 'path'
import path from 'path';
// console.log(process.env)
@@ -16,10 +16,20 @@ export default defineConfig((ctx) => {
// --> boot files are part of "main.js"
// https://v2.quasar.dev/quasar-cli/boot-files
// boot: ['vue-i18n', 'vue-meta', 'axios', 'vee-validate', 'myconfig', 'local-storage', 'error-handler', 'globalroutines', 'vue-idb', 'dragula', 'guard'],
boot: ['i18n', 'axios', 'pinia', 'vee-validate',
boot: [
'i18n',
'axios',
'pinia',
'vee-validate',
'myconfig',
'local-storage', 'globalroutines',
'calendar', 'social-sharing', 'timeago', 'guard'],
'local-storage',
'globalroutines',
'calendar',
'social-sharing',
'timeago',
'guard',
'trackPageViews',
],
// https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css
css: [
@@ -47,7 +57,7 @@ export default defineConfig((ctx) => {
build: {
target: {
browser: ['es2022', 'firefox115', 'chrome115', 'safari14'],
node: 'node20'
node: 'node20',
},
sassVariables: 'src/css/variables.scss',
// env: envparser(),
@@ -55,9 +65,7 @@ export default defineConfig((ctx) => {
vueRouterMode: 'history',
analyze: false, // true
transpile: true,
transpileDependencies: [
/quasar-ui-qcalendar[\\/]src/
],
transpileDependencies: [/quasar-ui-qcalendar[\\/]src/],
beforeDev(api) {
// Se la variabile d'ambiente SKIP_TSC è impostata, disabilita il type checking
if (process.env.SKIP_TSC === 'true') {
@@ -76,16 +84,16 @@ export default defineConfig((ctx) => {
},
// @quasar/app-vite v2.0.3+
envFilter(originalEnv) {
const newEnv = {}
const newEnv = {};
for (const key in originalEnv) {
/* ...decide if it goes in or not... */
if (true) {
newEnv[key] = originalEnv[key]
newEnv[key] = originalEnv[key];
}
}
// remember to return your processed env
return newEnv
return newEnv;
},
typescript: {
@@ -97,11 +105,11 @@ export default defineConfig((ctx) => {
},
/**
* Folder where Quasar CLI should look for .env* files.
* Can be an absolute path or a relative path to project root directory.
*
* @default project root directory
*/
* Folder where Quasar CLI should look for .env* files.
* Can be an absolute path or a relative path to project root directory.
*
* @default project root directory
*/
// envFolder?: string
/**
* Additional .env* files to be loaded.
@@ -118,26 +126,26 @@ export default defineConfig((ctx) => {
alias: {
...viteConf.resolve.alias,
'#q-app': path.resolve(__dirname, 'node_modules/quasar/app'), // Alias per #q-app
'app': path.resolve(__dirname),
'boot': path.resolve(__dirname, 'src/boot'),
'src': path.resolve(__dirname, 'src'),
'statics': path.resolve(__dirname, 'src/statics'),
'components': path.resolve(__dirname, 'src/components'),
'views': path.resolve(__dirname, 'src/views/index.ts'),
'images': path.resolve(__dirname, 'src/assets/images'),
'maps': path.resolve(__dirname, 'public/maps'),
'classes': path.resolve(__dirname, 'src/classes/index.ts'),
'fonts': path.resolve(__dirname, 'src/assets/fonts'),
'utils': path.resolve(__dirname, 'src/utils/index.ts'),
'css': path.resolve(__dirname, 'src/css/variables.scss'),
'router': path.resolve(__dirname, 'src/router/index.ts'),
'validators': path.resolve(__dirname, 'src/utils/validators.ts'),
'methods': path.resolve(__dirname, 'src/utils/methods.ts'),
'filters': path.resolve(__dirname, 'src/utils/filters.ts'),
'api': path.resolve(__dirname, 'src/store/Api/index.ts'),
'paths': path.resolve(__dirname, 'src/store/Api/ApiRoutes.ts'),
'modules': path.resolve(__dirname, 'src/store/Modules/index.ts'),
'model': path.resolve(__dirname, 'src/model/index.ts'),
app: path.resolve(__dirname),
boot: path.resolve(__dirname, 'src/boot'),
src: path.resolve(__dirname, 'src'),
statics: path.resolve(__dirname, 'src/statics'),
components: path.resolve(__dirname, 'src/components'),
views: path.resolve(__dirname, 'src/views/index.ts'),
images: path.resolve(__dirname, 'src/assets/images'),
maps: path.resolve(__dirname, 'public/maps'),
classes: path.resolve(__dirname, 'src/classes/index.ts'),
fonts: path.resolve(__dirname, 'src/assets/fonts'),
utils: path.resolve(__dirname, 'src/utils/index.ts'),
css: path.resolve(__dirname, 'src/css/variables.scss'),
router: path.resolve(__dirname, 'src/router/index.ts'),
validators: path.resolve(__dirname, 'src/utils/validators.ts'),
methods: path.resolve(__dirname, 'src/utils/methods.ts'),
filters: path.resolve(__dirname, 'src/utils/filters.ts'),
api: path.resolve(__dirname, 'src/store/Api/index.ts'),
paths: path.resolve(__dirname, 'src/store/Api/ApiRoutes.ts'),
modules: path.resolve(__dirname, 'src/store/Modules/index.ts'),
model: path.resolve(__dirname, 'src/model/index.ts'),
'@components': path.resolve(__dirname, 'src/components'),
'@boot': path.resolve(__dirname, 'src/boot'),
'@costanti': path.resolve(__dirname, 'src/store/Modules/costanti.ts'),
@@ -164,30 +172,36 @@ export default defineConfig((ctx) => {
},
vitePlugins: [
['@intlify/unplugin-vue-i18n/vite', {
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
// compositionOnly: false,
[
'@intlify/unplugin-vue-i18n/vite',
{
// if you want to use Vue I18n Legacy API, you need to set `compositionOnly: false`
// compositionOnly: false,
// if you want to use named tokens in your Vue I18n messages, such as 'Hello {name}',
// you need to set `runtimeOnly: false`
// runtimeOnly: false,
// if you want to use named tokens in your Vue I18n messages, such as 'Hello {name}',
// you need to set `runtimeOnly: false`
// runtimeOnly: false,
ssr: ctx.modeName === 'ssr',
ssr: ctx.modeName === 'ssr',
// you need to set i18n resource including paths !
include: [fileURLToPath(new URL('./src/i18n', import.meta.url))]
}],
// you need to set i18n resource including paths !
include: [fileURLToPath(new URL('./src/i18n', import.meta.url))],
},
],
['vite-plugin-checker', {
vueTsc: false,
OFF_eslint: {
lintCommand: 'eslint -c ./eslint.config.js "./src*/**/*.{ts,js,mjs,cjs,vue}"',
useFlatConfig: true
}
}, { server: false }]
]
[
'vite-plugin-checker',
{
vueTsc: false,
OFF_eslint: {
lintCommand:
'eslint -c ./eslint.config.js "./src*/**/*.{ts,js,mjs,cjs,vue}"',
useFlatConfig: true,
},
},
{ server: false },
],
],
// polyfillModulePreload: true,
@@ -310,10 +324,7 @@ export default defineConfig((ctx) => {
'QTree',
'QSeparator',
],
directives: [
'Ripple',
'ClosePopup',
],
directives: ['Ripple', 'ClosePopup'],
_plugins: [
'Meta',
'Dialog',
@@ -357,14 +368,12 @@ export default defineConfig((ctx) => {
maxAge: 1000 * 60 * 60 * 24 * 30,
// Tell browser when a file from the server should expire from cache (in ms)
middlewares: [
ctx.prod ? 'compression' : '',
'render', // keep this as last one
],
},
// https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa
pwa: {
workboxMode: 'InjectManifest', // 'GenerateSW' or 'InjectManifest'
@@ -401,13 +410,11 @@ export default defineConfig((ctx) => {
packager: {
// https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options
// OS X / Mac App Store
// appBundleId: '',
// appCategoryType: '',
// osxSign: '',
// protocol: 'myapp://path',
// Windows only
// win32metadata: { ... }
},
@@ -417,8 +424,6 @@ export default defineConfig((ctx) => {
appId: '-',
},
},
}
})
};
});