fix: version display and comparison issues

- Remove duplicate 'v' prefix in version display
- Add version string cleanup (trim spaces, remove v/V prefix)
- Use custom download URL when set
- Fix has_update logic for same version comparison

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-28 16:53:46 +08:00
parent 53fd9ff7dc
commit 16c68a855b
2 changed files with 22 additions and 3 deletions
@@ -29,7 +29,10 @@ export function getColumns(options: ColumnOptions, t: (key: string) => string):
accessorKey: 'version',
header: () => t('admin.versions.columns.version'),
cell: ({ row }) => {
return h('code', { class: 'text-sm bg-muted px-2 py-1 rounded' }, `v${row.original.version}`)
const version = row.original.version
// 如果版本号本身已经有 v 前缀,则不再添加
const displayVersion = version.startsWith('v') || version.startsWith('V') ? version : `v${version}`
return h('code', { class: 'text-sm bg-muted px-2 py-1 rounded' }, displayVersion)
},
},
{