mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-11-28 19:06:19 -05:00
Unifying Files tab appearance for model pages.
This commit is contained in:
parent
2943b2a9c8
commit
bf5b787fb3
5 changed files with 153 additions and 88 deletions
|
|
@ -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>
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue