Unifying Files tab appearance for model pages.
Some checks failed
CodeQL / Analyze (push) Has been cancelled
Controller Tests / controller-tests (push) Has been cancelled
Jest Tests / jest-tests (push) Has been cancelled

This commit is contained in:
Roland 2026-03-28 14:19:09 -06:00
parent 2943b2a9c8
commit bf5b787fb3
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680
5 changed files with 153 additions and 88 deletions

View file

@ -246,6 +246,15 @@ export function PreviewPath({path, mimetype, taggable = true, ...props}) {
return <PreviewLink file={{path, mimetype, taggable}} {...props}/>
}
export function DirectoryLink({path}) {
if (!path) return <span>Unknown</span>;
const href = `/media/${encodeMediaPath(path)}/`;
return <a href={href} target='_blank' rel='noopener noreferrer'
style={{color: 'inherit', textDecoration: 'none'}}>
{path}
</a>
}
export function RequiredAsterisk() {
return <span style={{color: '#db2828'}}> *</span>
}