fix
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -185,3 +185,5 @@ nbdist/
|
|||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
/build/
|
/build/
|
||||||
/logs/
|
/logs/
|
||||||
|
/src/main/resources/version.properties
|
||||||
|
/src/main/resources/webroot/
|
||||||
|
|||||||
@@ -169,8 +169,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Версия сборки (всегда внизу) -->
|
<!-- Версия сборки (всегда внизу) -->
|
||||||
<div v-if="!sidebarCollapsed" class="px-4 py-3 border-t border-gray-200 text-xs text-gray-500">
|
<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.getFormattedVersion(t) }}
|
{{ versionStore.getShortVersion(t) }}
|
||||||
</div>
|
</div>
|
||||||
<div v-else class="p-2 border-t border-gray-200 flex justify-center">
|
<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)">
|
<div class="text-xs text-gray-500 font-mono" :title="versionStore.getFormattedVersion(t)">
|
||||||
|
|||||||
@@ -45,11 +45,18 @@ export const useVersionStore = defineStore('version', () => {
|
|||||||
// Полная строка версии: "Версия: 1.2.3 (build abc1234 от 2025-04-03)"
|
// Полная строка версии: "Версия: 1.2.3 (build abc1234 от 2025-04-03)"
|
||||||
// Принимает функцию перевода для слова "от"/"from"
|
// Принимает функцию перевода для слова "от"/"from"
|
||||||
const getFormattedVersion = (t: (key: string) => string) => {
|
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 { version: ver, commitHash } = version.value
|
||||||
const datePart = buildDateFormatted.value ? ` ${t('common.versionFrom')} ${buildDateFormatted.value}` : ''
|
const datePart = buildDateFormatted.value ? ` ${t('common.versionFrom')} ${buildDateFormatted.value}` : ''
|
||||||
return `${t('common.version')}: ${ver} (build ${commitHash}${datePart})`
|
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 }
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -1,3 +0,0 @@
|
|||||||
version=1.0.0-beta
|
|
||||||
commit.hash=debf1b1
|
|
||||||
build.time=2026-05-09T11:03:39.671956300Z
|
|
||||||
Reference in New Issue
Block a user