This commit is contained in:
2026-05-09 14:32:25 +03:00
parent f43314b122
commit f3a0750891
4 changed files with 13 additions and 7 deletions

2
.gitignore vendored
View File

@@ -185,3 +185,5 @@ nbdist/
!.vscode/extensions.json
/build/
/logs/
/src/main/resources/version.properties
/src/main/resources/webroot/

View File

@@ -169,8 +169,8 @@
</div>
<!-- Версия сборки (всегда внизу) -->
<div v-if="!sidebarCollapsed" class="px-4 py-3 border-t border-gray-200 text-xs text-gray-500">
{{ versionStore.getFormattedVersion(t) }}
<div v-if="!sidebarCollapsed" class="px-4 py-3 border-t border-gray-200 text-xs text-gray-500 text-center" :title="versionStore.getFormattedVersion(t)">
{{ versionStore.getShortVersion(t) }}
</div>
<div v-else class="p-2 border-t border-gray-200 flex justify-center">
<div class="text-xs text-gray-500 font-mono" :title="versionStore.getFormattedVersion(t)">

View File

@@ -45,11 +45,18 @@ export const useVersionStore = defineStore('version', () => {
// Полная строка версии: "Версия: 1.2.3 (build abc1234 от 2025-04-03)"
// Принимает функцию перевода для слова "от"/"from"
const getFormattedVersion = (t: (key: string) => string) => {
if (!version.value) return t('common.version') + ': ...'
if (!version.value) return t('common.version') + '...'
const { version: ver, commitHash } = version.value
const datePart = buildDateFormatted.value ? ` ${t('common.versionFrom')} ${buildDateFormatted.value}` : ''
return `${t('common.version')}: ${ver} (build ${commitHash}${datePart})`
}
return { version, loading, error, fetchVersion, buildDateFormatted, getFormattedVersion }
const getShortVersion = () => {
if (!version.value) return '...'
const { version: ver, commitHash } = version.value
const datePart = buildDateFormatted.value ? ` ${buildDateFormatted.value}` : ''
return `${ver} (build ${commitHash}${datePart})`
}
return { version, loading, error, fetchVersion, buildDateFormatted, getFormattedVersion, getShortVersion }
})

View File

@@ -1,3 +0,0 @@
version=1.0.0-beta
commit.hash=debf1b1
build.time=2026-05-09T11:03:39.671956300Z