feat(frontend): show UI build version on system info page
Inject the frontend package.json version at build time via Vite and render it as a dedicated "UI Version" row in System Info, alongside the existing app (backend) version returned by /system/info. When the two versions differ a warning tag is shown so users can tell at a glance that their weknora-ui image is out of sync with weknora-app (e.g. missing config fields for newer providers like SearXNG). Rename the existing version row label from "System Version" to "App Version" to distinguish it from the new UI version row in all four locales (zh-CN, en-US, ko-KR, ru-RU).
This commit is contained in:
@@ -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__
|
||||
|
||||
// Methods
|
||||
const loadInfo = async () => {
|
||||
|
||||
Reference in New Issue
Block a user