- Maps: MapLibre GL + self-hosted Protomaps tiles + ESRI satellite toggle - FAB 'Créer' chooser (incl. Soumission wizard) via useCreateSignal - Quote wizard: new default tiers (80/500/1500 @ 39.95/49.95/49.95), competitor price-match, mini-map pin w/ green check, carry qualified address - api/address.reverse() + reverseGeocodeOSM tries RQA-backed hub, Nominatim fallback Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
89 lines
2.9 KiB
JavaScript
89 lines
2.9 KiB
JavaScript
/* eslint-env node */
|
|
const { configure } = require('quasar/wrappers')
|
|
|
|
// ⚠️ HARNAIS D'APERÇU LOCAL UNIQUEMENT — À RETIRER AVANT TOUT BUILD PROD.
|
|
// Lit le jeton hub depuis .env.local (gitignored) et l'injecte CÔTÉ PROXY (jamais dans le bundle client).
|
|
let _HUB_TOKEN = ''
|
|
try {
|
|
const _m = require('fs').readFileSync(__dirname + '/.env.local', 'utf8').match(/^HUB_TOKEN=(.+)$/m)
|
|
_HUB_TOKEN = _m ? _m[1].trim() : ''
|
|
} catch (e) { /* pas de .env.local → proxy /hub inactif */ }
|
|
|
|
module.exports = configure(function () {
|
|
return {
|
|
boot: ['net-timeout', 'pinia', 'tooltip-ux'],
|
|
|
|
css: ['app.scss', 'tech.scss'],
|
|
|
|
extras: ['material-icons'],
|
|
|
|
build: {
|
|
target: {
|
|
browser: ['es2020', 'edge88', 'firefox78', 'chrome87', 'safari14'], // es2020+/safari14 : MapLibre GL v5 utilise des littéraux BigInt (0n)
|
|
node: 'node20',
|
|
},
|
|
vueRouterMode: 'hash',
|
|
extendViteConf (viteConf) {
|
|
viteConf.base = process.env.DEPLOY_BASE || '/ops/'
|
|
},
|
|
},
|
|
|
|
devServer: {
|
|
open: false,
|
|
host: '0.0.0.0',
|
|
port: 9001,
|
|
proxy: {
|
|
'/ops/api': {
|
|
target: 'https://erp.gigafibre.ca',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/ops/, ''),
|
|
},
|
|
'/api': {
|
|
target: 'https://erp.gigafibre.ca',
|
|
changeOrigin: true,
|
|
},
|
|
// ⚠️ HARNAIS APERÇU LOCAL — /hub → hub live, jeton injecté côté proxy (jamais bundlé). À RETIRER avant build prod.
|
|
'/hub': {
|
|
target: 'https://msg.gigafibre.ca',
|
|
changeOrigin: true,
|
|
rewrite: (path) => path.replace(/^\/hub/, ''),
|
|
headers: { Authorization: 'Bearer ' + _HUB_TOKEN, 'X-Authentik-Email': 'louis@targo.ca' },
|
|
},
|
|
},
|
|
},
|
|
|
|
framework: {
|
|
// Aligne les couleurs Quasar sur la palette de marque (vert). primary = accent (--ops-accent).
|
|
// Après migration color="indigo-6/7"→"primary", tout l'accent devient vert d'un coup.
|
|
config: { brand: { primary: '#16a34a', positive: '#16a34a', negative: '#ef4444', warning: '#f59e0b', info: '#2563eb' } },
|
|
plugins: ['Notify', 'Loading', 'LocalStorage', 'Dialog'],
|
|
},
|
|
|
|
animations: [],
|
|
|
|
pwa: {
|
|
workboxMode: 'generateSW',
|
|
injectPwaMetaTags: true,
|
|
swFilename: 'sw.js',
|
|
manifestFilename: 'manifest.json',
|
|
useCredentialForManifestTag: false,
|
|
workboxOptions: {
|
|
skipWaiting: true,
|
|
clientsClaim: true,
|
|
cleanupOutdatedCaches: true,
|
|
navigateFallback: 'index.html',
|
|
navigateFallbackDenylist: [/^\/api\//],
|
|
},
|
|
extendManifestJson (json) {
|
|
json.name = 'Targo Ops'
|
|
json.short_name = 'Ops'
|
|
json.description = 'Targo Operations Platform'
|
|
json.display = 'standalone'
|
|
json.background_color = '#ffffff'
|
|
json.theme_color = '#1e293b'
|
|
json.start_url = '.'
|
|
},
|
|
},
|
|
}
|
|
})
|