fix: show only friendly template name in CT template dropdown
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:
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user