fix: show only friendly template name in CT template dropdown
Some checks failed
Deploy to Production / Trigger production update (push) Failing after 10s
SonarCloud / SonarCloud Analysis (push) Failing after 7m59s

The CT template select listed both the raw archive file name and the
headline on one line, which was long and hard to scan. Render the
headline alone and keep the file name in the title tooltip, matching
the convention already used on the images page. Falls back to the file
name when the repository provides no headline.
This commit is contained in:
2026-08-19 18:23:05 +05:00
parent 0db2f340f6
commit f6d9932849

View File

@@ -159,7 +159,8 @@ export function DownloadCTDialog({ open, onClose }: { open: boolean; onClose: ()
<SelectTrigger className="mt-1"><SelectValue placeholder={t('templates.select_template')} /></SelectTrigger> <SelectTrigger className="mt-1"><SelectValue placeholder={t('templates.select_template')} /></SelectTrigger>
<SelectContent className="max-h-72"> <SelectContent className="max-h-72">
{available.map(a => ( {available.map(a => (
<SelectItem key={a.template} value={a.template}>{a.template}{a.headline ? ` — ${a.headline}` : ''}</SelectItem> // Show the friendly name only; the raw file name stays in the tooltip.
<SelectItem key={a.template} value={a.template} title={a.template}>{a.headline || a.template}</SelectItem>
))} ))}
</SelectContent> </SelectContent>
</Select> </Select>