aggiunto e testato quasar apps

This commit is contained in:
fabio
2026-03-01 20:42:27 +01:00
parent cdcacadb5f
commit 66a3cc7cdb
73 changed files with 1559 additions and 389 deletions

View File

@@ -3,6 +3,10 @@
import { defineConfig } from '#q-app/wrappers';
import { fileURLToPath } from 'node:url';
import { resolve } from 'node:path';
import dotenv from 'dotenv';
dotenv.config({ path: resolve(__dirname, '../../.env') });
export default defineConfig((ctx) => {
return {
@@ -33,6 +37,9 @@ export default defineConfig((ctx) => {
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#build
build: {
env: {
SITE_URL: process.env.SITE_URL || '',
},
target: {
browser: ['es2022', 'firefox115', 'chrome115', 'safari14'],
node: 'node20',

View File

@@ -1,37 +0,0 @@
<template>
<div>
<p>{{ title }}</p>
<ul>
<li v-for="todo in todos" :key="todo.id" @click="increment">
{{ todo.id }} - {{ todo.content }}
</li>
</ul>
<p>Count: {{ todoCount }} / {{ meta.totalCount }}</p>
<p>Active: {{ active ? 'yes' : 'no' }}</p>
<p>Clicks on todos: {{ clickCount }}</p>
</div>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue';
import type { Todo, Meta } from './models';
interface Props {
title: string;
todos?: Todo[];
meta: Meta;
active: boolean;
}
const props = withDefaults(defineProps<Props>(), {
todos: () => [],
});
const clickCount = ref(0);
function increment() {
clickCount.value += 1;
return clickCount.value;
}
const todoCount = computed(() => props.todos.length);
</script>

View File

@@ -1,8 +0,0 @@
export interface Todo {
id: number;
content: string;
}
export interface Meta {
totalCount: number;
}

View File

@@ -1,6 +1,7 @@
declare namespace NodeJS {
interface ProcessEnv {
NODE_ENV: string;
SITE_URL: string | undefined;
VUE_ROUTER_MODE: 'hash' | 'history' | 'abstract' | undefined;
VUE_ROUTER_BASE: string | undefined;
}

View File

@@ -13,8 +13,13 @@
<q-drawer v-model="leftDrawerOpen" show-if-above bordered>
<q-list>
<q-item-label header> List Items </q-item-label>
<q-item
clickable
tag="a"
:href="privateLink"
>
<q-item-section>Private</q-item-section>
</q-item>
</q-list>
</q-drawer>
@@ -28,6 +33,8 @@
import { ref } from 'vue';
const leftDrawerOpen = ref(false);
const siteUrl = (process.env.SITE_URL || '').replace(/\/+$/, '');
const privateLink = `${siteUrl}/private`;
function toggleLeftDrawer() {
leftDrawerOpen.value = !leftDrawerOpen.value;

View File

@@ -15,29 +15,29 @@
"postinstall": "quasar prepare"
},
"dependencies": {
"vue-i18n": "^11.0.0",
"pinia": "^3.0.1",
"@quasar/extras": "^1.16.4",
"quasar": "^2.16.0",
"vue": "^3.5.22",
"vue-router": "^5.0.0"
"@quasar/extras": "^1.17.0",
"pinia": "^3.0.4",
"quasar": "^2.18.6",
"vue": "^3.5.29",
"vue-i18n": "^11.2.8",
"vue-router": "^5.0.3"
},
"devDependencies": {
"@eslint/js": "^9.14.0",
"eslint": "^9.14.0",
"eslint-plugin-vue": "^10.4.0",
"globals": "^16.4.0",
"vue-tsc": "^3.0.7",
"@vue/eslint-config-typescript": "^14.4.0",
"vite-plugin-checker": "^0.11.0",
"vue-eslint-parser": "^10.2.0",
"@vue/eslint-config-prettier": "^10.1.0",
"prettier": "^3.3.3",
"@types/node": "^20.5.9",
"@eslint/js": "^9.39.3",
"@intlify/unplugin-vue-i18n": "^4.0.0",
"@quasar/app-vite": "^2.1.0",
"autoprefixer": "^10.4.2",
"typescript": "^5.9.2"
"@quasar/app-vite": "^2.4.1",
"@types/node": "^20.19.35",
"@vue/eslint-config-prettier": "^10.2.0",
"@vue/eslint-config-typescript": "^14.7.0",
"autoprefixer": "^10.4.27",
"eslint": "^9.39.3",
"eslint-plugin-vue": "^10.8.0",
"globals": "^16.5.0",
"prettier": "^3.8.1",
"typescript": "^5.9.3",
"vite-plugin-checker": "^0.11.0",
"vue-eslint-parser": "^10.4.0",
"vue-tsc": "^3.2.5"
},
"engines": {
"node": "^28 || ^26 || ^24 || ^22 || ^20",

View File

@@ -9,68 +9,68 @@ importers:
.:
dependencies:
'@quasar/extras':
specifier: ^1.16.4
specifier: ^1.17.0
version: 1.17.0
pinia:
specifier: ^3.0.1
specifier: ^3.0.4
version: 3.0.4(typescript@5.9.3)(vue@3.5.29(typescript@5.9.3))
quasar:
specifier: ^2.16.0
specifier: ^2.18.6
version: 2.18.6
vue:
specifier: ^3.5.22
specifier: ^3.5.29
version: 3.5.29(typescript@5.9.3)
vue-i18n:
specifier: ^11.0.0
specifier: ^11.2.8
version: 11.2.8(vue@3.5.29(typescript@5.9.3))
vue-router:
specifier: ^5.0.0
specifier: ^5.0.3
version: 5.0.3(@vue/compiler-sfc@3.5.29)(pinia@3.0.4(typescript@5.9.3)(vue@3.5.29(typescript@5.9.3)))(vue@3.5.29(typescript@5.9.3))
devDependencies:
'@eslint/js':
specifier: ^9.14.0
specifier: ^9.39.3
version: 9.39.3
'@intlify/unplugin-vue-i18n':
specifier: ^4.0.0
version: 4.0.0(rollup@4.59.0)(vue-i18n@11.2.8(vue@3.5.29(typescript@5.9.3)))
'@quasar/app-vite':
specifier: ^2.1.0
specifier: ^2.4.1
version: 2.4.1(@types/node@20.19.35)(eslint@9.39.3)(pinia@3.0.4(typescript@5.9.3)(vue@3.5.29(typescript@5.9.3)))(quasar@2.18.6)(rollup@4.59.0)(sass@1.97.3)(terser@5.46.0)(typescript@5.9.3)(vue-router@5.0.3(@vue/compiler-sfc@3.5.29)(pinia@3.0.4(typescript@5.9.3)(vue@3.5.29(typescript@5.9.3)))(vue@3.5.29(typescript@5.9.3)))(vue@3.5.29(typescript@5.9.3))(yaml@2.8.2)
'@types/node':
specifier: ^20.5.9
specifier: ^20.19.35
version: 20.19.35
'@vue/eslint-config-prettier':
specifier: ^10.1.0
specifier: ^10.2.0
version: 10.2.0(eslint@9.39.3)(prettier@3.8.1)
'@vue/eslint-config-typescript':
specifier: ^14.4.0
specifier: ^14.7.0
version: 14.7.0(eslint-plugin-vue@10.8.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3)(typescript@5.9.3))(eslint@9.39.3)(vue-eslint-parser@10.4.0(eslint@9.39.3)))(eslint@9.39.3)(typescript@5.9.3)
autoprefixer:
specifier: ^10.4.2
specifier: ^10.4.27
version: 10.4.27(postcss@8.5.6)
eslint:
specifier: ^9.14.0
specifier: ^9.39.3
version: 9.39.3
eslint-plugin-vue:
specifier: ^10.4.0
specifier: ^10.8.0
version: 10.8.0(@typescript-eslint/parser@8.56.1(eslint@9.39.3)(typescript@5.9.3))(eslint@9.39.3)(vue-eslint-parser@10.4.0(eslint@9.39.3))
globals:
specifier: ^16.4.0
specifier: ^16.5.0
version: 16.5.0
prettier:
specifier: ^3.3.3
specifier: ^3.8.1
version: 3.8.1
typescript:
specifier: ^5.9.2
specifier: ^5.9.3
version: 5.9.3
vite-plugin-checker:
specifier: ^0.11.0
version: 0.11.0(eslint@9.39.3)(optionator@0.9.4)(typescript@5.9.3)(vite@7.3.1(@types/node@20.19.35)(sass-embedded@1.97.3)(sass@1.97.3)(terser@5.46.0)(yaml@2.8.2))(vue-tsc@3.2.5(typescript@5.9.3))
vue-eslint-parser:
specifier: ^10.2.0
specifier: ^10.4.0
version: 10.4.0(eslint@9.39.3)
vue-tsc:
specifier: ^3.0.7
specifier: ^3.2.5
version: 3.2.5(typescript@5.9.3)
packages:

View File

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 859 B

After

Width:  |  Height:  |  Size: 859 B

View File

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

View File

@@ -3,6 +3,10 @@
import { defineConfig } from '#q-app/wrappers';
import { fileURLToPath } from 'node:url';
import { resolve } from 'node:path';
import dotenv from 'dotenv';
dotenv.config({ path: resolve(__dirname, '../../.env') });
export default defineConfig((ctx) => {
return {
@@ -33,6 +37,9 @@ export default defineConfig((ctx) => {
// Full list of options: https://v2.quasar.dev/quasar-cli-vite/quasar-config-file#build
build: {
env: {
SITE_URL: process.env.SITE_URL || '',
},
target: {
browser: ['es2022', 'firefox115', 'chrome115', 'safari14'],
node: 'node20',

View File

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

View File

@@ -1,6 +1,7 @@
declare namespace NodeJS {
interface ProcessEnv {
NODE_ENV: string;
SITE_URL: string | undefined;
VUE_ROUTER_MODE: 'hash' | 'history' | 'abstract' | undefined;
VUE_ROUTER_BASE: string | undefined;
}

View File

@@ -0,0 +1,50 @@
<template>
<q-layout view="lHh Lpr lFf">
<q-header elevated>
<q-toolbar>
<q-btn flat dense round icon="menu" aria-label="Menu" @click="toggleLeftDrawer" />
<q-toolbar-title> Quasar App </q-toolbar-title>
<div>Quasar v{{ $q.version }}</div>
</q-toolbar>
</q-header>
<q-drawer v-model="leftDrawerOpen" show-if-above bordered>
<q-list>
<q-item-label header> items list </q-item-label>
<q-item
clickable
tag="a"
:href="privateLink"
>
<q-item-section>Private</q-item-section>
</q-item>
<q-item
clickable
tag="a"
:href="adminLink"
>
<q-item-section>Admin</q-item-section>
</q-item>
</q-list>
</q-drawer>
<q-page-container>
<router-view />
</q-page-container>
</q-layout>
</template>
<script setup lang="ts">
import { ref } from 'vue';
const leftDrawerOpen = ref(false);
const siteUrl = (process.env.SITE_URL || '').replace(/\/+$/, '');
const privateLink = `${siteUrl}/private`;
const adminLink = `${siteUrl}/admin`;
function toggleLeftDrawer() {
leftDrawerOpen.value = !leftDrawerOpen.value;
}
</script>

View File

@@ -0,0 +1,9 @@
<template>
<q-page class="row items-center justify-evenly">
private page
</q-page>
</template>
<script setup lang="ts">
</script>

View File

@@ -0,0 +1,7 @@
{
"extends": "./.quasar/tsconfig.json",
"compilerOptions": {
"skipLibCheck": true
},
"exclude": ["node_modules", "dist"]
}

View File

@@ -1,27 +0,0 @@
<template>
<q-item clickable tag="a" target="_blank" :href="link">
<q-item-section v-if="icon" avatar>
<q-icon :name="icon" />
</q-item-section>
<q-item-section>
<q-item-label>{{ title }}</q-item-label>
<q-item-label caption>{{ caption }}</q-item-label>
</q-item-section>
</q-item>
</template>
<script setup lang="ts">
export interface EssentialLinkProps {
title: string;
caption?: string;
link?: string;
icon?: string;
}
withDefaults(defineProps<EssentialLinkProps>(), {
caption: '',
link: '#',
icon: '',
});
</script>

View File

@@ -1,37 +0,0 @@
<template>
<div>
<p>{{ title }}</p>
<ul>
<li v-for="todo in todos" :key="todo.id" @click="increment">
{{ todo.id }} - {{ todo.content }}
</li>
</ul>
<p>Count: {{ todoCount }} / {{ meta.totalCount }}</p>
<p>Active: {{ active ? 'yes' : 'no' }}</p>
<p>Clicks on todos: {{ clickCount }}</p>
</div>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue';
import type { Todo, Meta } from './models';
interface Props {
title: string;
todos?: Todo[];
meta: Meta;
active: boolean;
}
const props = withDefaults(defineProps<Props>(), {
todos: () => [],
});
const clickCount = ref(0);
function increment() {
clickCount.value += 1;
return clickCount.value;
}
const todoCount = computed(() => props.todos.length);
</script>

View File

@@ -1,8 +0,0 @@
export interface Todo {
id: number;
content: string;
}
export interface Meta {
totalCount: number;
}

View File

@@ -1,81 +0,0 @@
<template>
<q-layout view="lHh Lpr lFf">
<q-header elevated>
<q-toolbar>
<q-btn flat dense round icon="menu" aria-label="Menu" @click="toggleLeftDrawer" />
<q-toolbar-title> Quasar App </q-toolbar-title>
<div>Quasar v{{ $q.version }}</div>
</q-toolbar>
</q-header>
<q-drawer v-model="leftDrawerOpen" show-if-above bordered>
<q-list>
<q-item-label header> Essential Links </q-item-label>
<EssentialLink v-for="link in linksList" :key="link.title" v-bind="link" />
</q-list>
</q-drawer>
<q-page-container>
<router-view />
</q-page-container>
</q-layout>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import EssentialLink, { type EssentialLinkProps } from 'components/EssentialLink.vue';
const linksList: EssentialLinkProps[] = [
{
title: 'Docs',
caption: 'quasar.dev',
icon: 'school',
link: 'https://quasar.dev',
},
{
title: 'Github',
caption: 'github.com/quasarframework',
icon: 'code',
link: 'https://github.com/quasarframework',
},
{
title: 'Discord Chat Channel',
caption: 'chat.quasar.dev',
icon: 'chat',
link: 'https://chat.quasar.dev',
},
{
title: 'Forum',
caption: 'forum.quasar.dev',
icon: 'record_voice_over',
link: 'https://forum.quasar.dev',
},
{
title: 'Twitter',
caption: '@quasarframework',
icon: 'rss_feed',
link: 'https://twitter.quasar.dev',
},
{
title: 'Facebook',
caption: '@QuasarFramework',
icon: 'public',
link: 'https://facebook.quasar.dev',
},
{
title: 'Quasar Awesome',
caption: 'Community Quasar projects',
icon: 'favorite',
link: 'https://awesome.quasar.dev',
},
];
const leftDrawerOpen = ref(false);
function toggleLeftDrawer() {
leftDrawerOpen.value = !leftDrawerOpen.value;
}
</script>

View File

@@ -1,43 +0,0 @@
<template>
<q-page class="row items-center justify-evenly">
<example-component
title="Example component"
active
:todos="todos"
:meta="meta"
></example-component>
</q-page>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import type { Todo, Meta } from 'components/models';
import ExampleComponent from 'components/ExampleComponent.vue';
const todos = ref<Todo[]>([
{
id: 1,
content: 'ct1',
},
{
id: 2,
content: 'ct2',
},
{
id: 3,
content: 'ct3',
},
{
id: 4,
content: 'ct4',
},
{
id: 5,
content: 'ct5',
},
]);
const meta = ref<Meta>({
totalCount: 1200,
});
</script>

View File

@@ -1,3 +0,0 @@
{
"extends": "./.quasar/tsconfig.json"
}