Dropdown fields

This commit is contained in:
James Barnsley
2019-11-07 17:01:27 +13:00
parent 17763f7fe7
commit 33d6c66d96
16 changed files with 10151 additions and 5565 deletions

View File

@ -73,27 +73,24 @@ class LibraryBrowseDirectory extends React.Component {
const uri_elements = uri.split('/');
return (
<h4>
<h4 className="breadcrumbs">
{uri_elements.map((uri_element, index) => {
// Reconstruct a URL to this element
let uri = 'file://';
for (let i = 0; i <= index; i++) {
uri += `/${uri_elements[i]}`;
}
let uri = 'file://';
for (let i = 0; i <= index; i++) {
uri += `/${uri_elements[i]}`;
}
return (
return (
<span key={uri}>
{index > 0 && (
<span>
<Icon type="fontawesome" name="angle-right" />
{' '}
</span>
<Icon type="fontawesome" name="angle-right" />
)}
<URILink type="browse" uri={uri}>
{decodeURI(uri_element)}
</URILink>
</span>
);
);
})}
</h4>
);