asset table fix

This commit is contained in:
2026-08-02 22:58:24 +02:00
parent 242c808add
commit c413640427
@@ -97,11 +97,12 @@
<div v-if="tableAssets(latestStable).length" class="mt-6 pt-6 border-t border-white/15">
<div class="text-[10px] font-black uppercase tracking-widest text-indigo-200 mb-3">{{ t('catalogShow.assetsTitle') }}</div>
<table class="text-sm">
<table class="w-full text-sm">
<tbody>
<tr v-for="asset in tableAssets(latestStable)" :key="asset.kind" class="border-b border-white/10 last:border-0">
<td class="py-1.5 pr-10 text-indigo-100">{{ t('catalogShow.assetKind.' + asset.kind) }}</td>
<td class="py-1.5">
<td class="py-1.5 pr-6 text-indigo-100 whitespace-nowrap">{{ t('catalogShow.assetKind.' + asset.kind) }}</td>
<td class="py-1.5 pr-6 w-full font-mono text-xs text-indigo-200/80 break-all">{{ assetFileName(asset.path) }}</td>
<td class="py-1.5 text-right whitespace-nowrap">
<a v-if="asset.kind === 'docs'" :href="asset.path" target="_blank" class="text-white font-bold hover:underline">{{ t('catalogShow.assetOpen') }}</a>
<a v-else :href="downloadUrl(asset.path)" class="text-white font-bold hover:underline">{{ t('catalogShow.assetDownload') }}</a>
</td>
@@ -133,11 +134,12 @@
<span v-if="release.downloadCount" class="text-xs text-gray-400 font-medium"> {{ release.downloadCount }}</span>
</div>
<a v-if="release.htmlFolderPath" :href="release.htmlFolderPath" target="_blank" class="text-purple-600 hover:text-purple-900 font-bold text-sm">{{ t('catalogShow.play') }}</a>
<table v-if="tableAssets(release).length" class="mt-2 text-sm">
<table v-if="tableAssets(release).length" class="mt-2 w-full text-sm">
<tbody>
<tr v-for="asset in tableAssets(release)" :key="asset.kind" class="border-b border-gray-100 last:border-0">
<td class="py-1 pr-8 text-gray-500">{{ t('catalogShow.assetKind.' + asset.kind) }}</td>
<td class="py-1">
<td class="py-1 pr-6 text-gray-500 whitespace-nowrap">{{ t('catalogShow.assetKind.' + asset.kind) }}</td>
<td class="py-1 pr-6 w-full font-mono text-xs text-gray-400 break-all">{{ assetFileName(asset.path) }}</td>
<td class="py-1 text-right whitespace-nowrap">
<a v-if="asset.kind === 'docs'" :href="asset.path" target="_blank" class="text-blue-600 hover:text-blue-900 font-bold">{{ t('catalogShow.assetOpen') }}</a>
<a v-else :href="downloadUrl(asset.path)" class="text-blue-600 hover:text-blue-900 font-bold">{{ t('catalogShow.assetDownload') }}</a>
</td>
@@ -156,11 +158,12 @@
<td class="px-8 py-4">
<div class="font-bold text-yellow-800 text-lg mb-2">{{ release.version }}</div>
<a v-if="release.htmlFolderPath" :href="release.htmlFolderPath" target="_blank" class="text-purple-600 hover:text-purple-900 font-bold text-sm">{{ t('catalogShow.play') }}</a>
<table v-if="tableAssets(release).length" class="mt-2 text-sm">
<table v-if="tableAssets(release).length" class="mt-2 w-full text-sm">
<tbody>
<tr v-for="asset in tableAssets(release)" :key="asset.kind" class="border-b border-gray-100 last:border-0">
<td class="py-1 pr-8 text-gray-500">{{ t('catalogShow.assetKind.' + asset.kind) }}</td>
<td class="py-1">
<td class="py-1 pr-6 text-gray-500 whitespace-nowrap">{{ t('catalogShow.assetKind.' + asset.kind) }}</td>
<td class="py-1 pr-6 w-full font-mono text-xs text-gray-400 break-all">{{ assetFileName(asset.path) }}</td>
<td class="py-1 text-right whitespace-nowrap">
<a v-if="asset.kind === 'docs'" :href="asset.path" target="_blank" class="text-blue-600 hover:text-blue-900 font-bold">{{ t('catalogShow.assetOpen') }}</a>
<a v-else :href="downloadUrl(asset.path)" class="text-blue-600 hover:text-blue-900 font-bold">{{ t('catalogShow.assetDownload') }}</a>
</td>
@@ -192,8 +195,9 @@
<table v-if="tableAssets(release).length" class="mt-3 w-full text-sm">
<tbody>
<tr v-for="asset in tableAssets(release)" :key="asset.kind" class="border-b border-gray-100 last:border-0">
<td class="py-1.5 pr-4 text-gray-500">{{ t('catalogShow.assetKind.' + asset.kind) }}</td>
<td class="py-1.5 text-right">
<td class="py-1.5 pr-4 text-gray-500 whitespace-nowrap align-top">{{ t('catalogShow.assetKind.' + asset.kind) }}</td>
<td class="py-1.5 pr-4 w-full font-mono text-xs text-gray-400 break-all align-top">{{ assetFileName(asset.path) }}</td>
<td class="py-1.5 text-right whitespace-nowrap align-top">
<a v-if="asset.kind === 'docs'" :href="asset.path" target="_blank" class="text-blue-600 font-bold">{{ t('catalogShow.assetOpen') }}</a>
<a v-else :href="downloadUrl(asset.path)" class="text-blue-600 font-bold">{{ t('catalogShow.assetDownload') }}</a>
</td>
@@ -289,6 +293,8 @@ const tableAssets = (release: Release) =>
.filter(a => TABLE_KIND_ORDER.includes(a.kind))
.sort((a, b) => TABLE_KIND_ORDER.indexOf(a.kind) - TABLE_KIND_ORDER.indexOf(b.kind))
const assetFileName = (path: string) => path.replace(/\/+$/, '').split('/').pop() ?? ''
onMounted(async () => {
try {
await store.fetchAll()