Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.
Go agentagenticaichatbotdsh-pluginembeddingsevaluationgenerative-aigolangknowledge-basellmmulti-tenantollamaopenaiquestion-answeringragrerankingsemantic-searchvector-searchwiki
feat(frontend): show UI build version on system info page
wizardchen6cb493eda252
diff --git a/frontend/env.d.ts b/frontend/env.d.tsindex 5b580fcdf..623696974 100644--- a/frontend/env.d.ts+++ b/frontend/env.d.ts@@ -3,4 +3,6 @@// 这段代码告诉 TypeScript,所有以 .vue 结尾的文件都是 Vue 组件,可以通过 import 语句进行导入。这样做通常可以解决无法识别模块的问题。declare module '*.vue' {import { Component } from 'vue'; const component: Component; export default component;-}\ No newline at end of file+}++declare const __FRONTEND_VERSION__: string;\ No newline at end of filediff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.tsindex 66dd9012e..d769ca1b0 100755--- a/frontend/src/i18n/locales/en-US.ts+++ b/frontend/src/i18n/locales/en-US.ts@@ -2405,8 +2405,11 @@ export default {sectionDescription: 'View system version information and user account configuration',loadingInfo: 'Loading information...',retry: 'Retry',- versionLabel: 'System Version',- versionDescription: 'Current version number of the system',+ versionLabel: 'App Version',+ versionDescription: 'Version of the application service (weknora-app)',+ frontendVersionLabel: 'UI Version',+ frontendVersionDescription: 'Build version of the UI (weknora-ui)',+ versionMismatch: 'Mismatch with app version',buildTimeLabel: 'Build Time',buildTimeDescription: 'Time when the system was built',goVersionLabel: 'Go Version',diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.tsindex 87f9bde41..3968bec03 100755--- a/frontend/src/i18n/locales/ko-KR.ts+++ b/frontend/src/i18n/locales/ko-KR.ts@@ -1663,8 +1663,11 @@ export default {sectionDescription: "시스템 버전 정보 및 사용자 계정 설정 보기",loadingInfo: "정보 로딩 중...",retry: "재시도",- versionLabel: "시스템 버전",- versionDescription: "현재 시스템의 버전 번호",+ versionLabel: "앱 버전",+ versionDescription: "애플리케이션 서비스(weknora-app)의 버전 번호",+ frontendVersionLabel: "UI 버전",+ frontendVersionDescription: "UI(weknora-ui) 빌드 버전 번호",+ versionMismatch: "앱 버전과 일치하지 않음",buildTimeLabel: "빌드 시간",buildTimeDescription: "시스템이 빌드된 시간",goVersionLabel: "Go 버전",diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.tsindex e014c14f8..3b2163ba7 100755--- a/frontend/src/i18n/locales/ru-RU.ts+++ b/frontend/src/i18n/locales/ru-RU.ts@@ -1480,8 +1480,11 @@ export default {sectionDescription: 'Просмотр сведений о версии системы и конфигурации учётной записи пользователя',loadingInfo: 'Загрузка данных...',retry: 'Повторить',- versionLabel: 'Версия системы',- versionDescription: 'Текущий номер версии системы',+ versionLabel: 'Версия приложения',+ versionDescription: 'Версия сервиса приложения (weknora-app)',+ frontendVersionLabel: 'Версия UI',+ frontendVersionDescription: 'Версия сборки UI (weknora-ui)',+ versionMismatch: 'Не совпадает с версией приложения',buildTimeLabel: 'Время сборки',buildTimeDescription: 'Время, когда система была собрана',goVersionLabel: 'Версия Go',diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.tsindex 9a74476bb..92190fe5b 100755--- a/frontend/src/i18n/locales/zh-CN.ts+++ b/frontend/src/i18n/locales/zh-CN.ts@@ -1643,8 +1643,11 @@ export default {sectionDescription: "查看系统版本信息和用户账户配置",loadingInfo: "正在加载信息...",retry: "重试",- versionLabel: "系统版本",- versionDescription: "当前系统的版本号",+ versionLabel: "应用版本",+ versionDescription: "当前应用服务(weknora-app)的版本号",+ frontendVersionLabel: "UI 版本",+ frontendVersionDescription: "当前 UI 界面(weknora-ui)的构建版本号",+ versionMismatch: "与应用版本不一致",buildTimeLabel: "构建时间",buildTimeDescription: "系统构建的时间",goVersionLabel: "Go 版本",diff --git a/frontend/src/views/settings/SystemInfo.vue b/frontend/src/views/settings/SystemInfo.vueindex 3be50bd68..3619abe96 100644--- a/frontend/src/views/settings/SystemInfo.vue+++ b/frontend/src/views/settings/SystemInfo.vue@@ -45,6 +45,26 @@</div></div>+ <!-- Frontend version -->+ <div class="setting-row">+ <div class="setting-info">+ <label>{{ $t('system.frontendVersionLabel') }}</label>+ <p class="desc">{{ $t('system.frontendVersionDescription') }}</p>+ </div>+ <div class="setting-control">+ <span class="info-value">+ {{ frontendVersion }}+ <t-tag+ v-if="systemInfo?.version && systemInfo.version !== 'unknown' && frontendVersion !== 'unknown' && systemInfo.version !== frontendVersion"+ theme="warning"+ variant="light"+ size="small"+ style="margin-left: 8px;"+ >{{ $t('system.versionMismatch') }}</t-tag>+ </span>+ </div>+ </div>+<!-- Build time --><div v-if="systemInfo?.build_time" class="setting-row"><div class="setting-info">@@ -126,6 +146,7 @@ const { t } = useI18n()const systemInfo = ref<SystemInfo | null>(null)const loading = ref(true)const error = ref('')+const frontendVersion = __FRONTEND_VERSION__// Methodsconst loadInfo = async () => {diff --git a/frontend/vite.config.ts b/frontend/vite.config.tsindex 42d64dbe5..aae11d4d1 100644--- a/frontend/vite.config.ts+++ b/frontend/vite.config.ts@@ -9,6 +9,9 @@ import vueJsx from '@vitejs/plugin-vue-jsx'const __dirname = dirname(fileURLToPath(import.meta.url))const require = createRequire(import.meta.url)+const pkg = require('./package.json') as { version?: string }+const FRONTEND_VERSION = pkg.version ?? 'unknown'+function resolveVueOfficePptxEntry(): string {try {const pkgDir = dirname(require.resolve('@vue-office/pptx/package.json'))@@ -25,6 +28,9 @@ function resolveVueOfficePptxEntry(): string {}export default defineConfig({+ define: {+ __FRONTEND_VERSION__: JSON.stringify(FRONTEND_VERSION),+ },plugins: [vue(),vueJsx(),