From cd101811c442579b987ed3fb6e7ad43fccce4454 Mon Sep 17 00:00:00 2001 From: M_Kececi Date: Tue, 18 Aug 2026 20:19:24 +0300 Subject: [PATCH] Fix product performance grouped JSON build --- ui/quasar.config.js | 16 +++++++++++++++- ui/src/pages/MainPage.vue | 21 +++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) diff --git a/ui/quasar.config.js b/ui/quasar.config.js index 849012e..bc1dc11 100644 --- a/ui/quasar.config.js +++ b/ui/quasar.config.js @@ -1,8 +1,20 @@ // quasar.config.js 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(() => { const apiBaseUrl = (process.env.VITE_API_BASE_URL || '/api').trim() + const gitBuildInfo = readGitBuildInfo() return { @@ -36,7 +48,9 @@ export default defineConfig(() => { build: { vueRouterMode: 'hash', env: { - VITE_API_BASE_URL: apiBaseUrl + VITE_API_BASE_URL: apiBaseUrl, + APP_VERSION: gitBuildInfo.version, + APP_COMMIT: gitBuildInfo.commit }, esbuildTarget: { diff --git a/ui/src/pages/MainPage.vue b/ui/src/pages/MainPage.vue index a9118b6..f0540c7 100644 --- a/ui/src/pages/MainPage.vue +++ b/ui/src/pages/MainPage.vue @@ -74,6 +74,10 @@ +
+ Baggi BSS {{ appVersion }} +
+ @@ -129,6 +133,8 @@ import api from 'src/services/api' const router = useRouter() const auth = useAuthStore() const $q = useQuasar() +const appVersion = process.env.APP_VERSION || 'v1.0.0' +const appCommit = process.env.APP_COMMIT || 'local' const username = ref('') const password = ref('') @@ -266,6 +272,21 @@ async function sendResetMail () { .full-width { 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) =============================== */