Fix product performance grouped JSON build
This commit is contained in:
+15
-1
@@ -1,8 +1,20 @@
|
|||||||
// quasar.config.js
|
// quasar.config.js
|
||||||
import { defineConfig } from '#q-app/wrappers'
|
import { defineConfig } from '#q-app/wrappers'
|
||||||
|
import { execSync } from 'node:child_process'
|
||||||
|
|
||||||
|
function readGitBuildInfo () {
|
||||||
|
try {
|
||||||
|
const commitCount = execSync('git rev-list --count HEAD', { encoding: 'utf8' }).trim()
|
||||||
|
const commitHash = execSync('git rev-parse --short HEAD', { encoding: 'utf8' }).trim()
|
||||||
|
return { version: `v1.0.${commitCount}`, commit: commitHash }
|
||||||
|
} catch {
|
||||||
|
return { version: 'v1.0.0', commit: 'local' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
export default defineConfig(() => {
|
export default defineConfig(() => {
|
||||||
const apiBaseUrl = (process.env.VITE_API_BASE_URL || '/api').trim()
|
const apiBaseUrl = (process.env.VITE_API_BASE_URL || '/api').trim()
|
||||||
|
const gitBuildInfo = readGitBuildInfo()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
||||||
@@ -36,7 +48,9 @@ export default defineConfig(() => {
|
|||||||
build: {
|
build: {
|
||||||
vueRouterMode: 'hash',
|
vueRouterMode: 'hash',
|
||||||
env: {
|
env: {
|
||||||
VITE_API_BASE_URL: apiBaseUrl
|
VITE_API_BASE_URL: apiBaseUrl,
|
||||||
|
APP_VERSION: gitBuildInfo.version,
|
||||||
|
APP_COMMIT: gitBuildInfo.commit
|
||||||
},
|
},
|
||||||
|
|
||||||
esbuildTarget: {
|
esbuildTarget: {
|
||||||
|
|||||||
@@ -74,6 +74,10 @@
|
|||||||
</q-form>
|
</q-form>
|
||||||
</q-card>
|
</q-card>
|
||||||
|
|
||||||
|
<div class="login-version" :title="`Commit: ${appCommit}`">
|
||||||
|
Baggi BSS {{ appVersion }}
|
||||||
|
</div>
|
||||||
|
|
||||||
<!-- 🔐 FORGOT PASSWORD -->
|
<!-- 🔐 FORGOT PASSWORD -->
|
||||||
<q-dialog v-model="forgotOpen" persistent>
|
<q-dialog v-model="forgotOpen" persistent>
|
||||||
<q-card style="width:420px; max-width:90vw">
|
<q-card style="width:420px; max-width:90vw">
|
||||||
@@ -129,6 +133,8 @@ import api from 'src/services/api'
|
|||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const auth = useAuthStore()
|
const auth = useAuthStore()
|
||||||
const $q = useQuasar()
|
const $q = useQuasar()
|
||||||
|
const appVersion = process.env.APP_VERSION || 'v1.0.0'
|
||||||
|
const appCommit = process.env.APP_COMMIT || 'local'
|
||||||
|
|
||||||
const username = ref('')
|
const username = ref('')
|
||||||
const password = ref('')
|
const password = ref('')
|
||||||
@@ -266,6 +272,21 @@ async function sendResetMail () {
|
|||||||
.full-width {
|
.full-width {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.login-version {
|
||||||
|
position: absolute;
|
||||||
|
left: 16px;
|
||||||
|
bottom: 12px;
|
||||||
|
z-index: 2;
|
||||||
|
padding: 4px 8px;
|
||||||
|
border-radius: 6px;
|
||||||
|
color: rgba(45, 45, 45, 0.75);
|
||||||
|
background: rgba(255, 255, 255, 0.68);
|
||||||
|
font-size: 12px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: 0.2px;
|
||||||
|
user-select: text;
|
||||||
|
}
|
||||||
/* ===============================
|
/* ===============================
|
||||||
LOGIN INPUT TEXT COLOR (GOLD)
|
LOGIN INPUT TEXT COLOR (GOLD)
|
||||||
=============================== */
|
=============================== */
|
||||||
|
|||||||
Reference in New Issue
Block a user