feat: add padlock next to private collections in lists

This commit is contained in:
Tom Moor
2019-08-28 21:41:40 -07:00
parent 79f8a41b5b
commit b56f8e7870

View File

@@ -7,6 +7,7 @@ import { Link } from 'react-router-dom';
import { import {
CollectionIcon, CollectionIcon,
PrivateCollectionIcon, PrivateCollectionIcon,
PadlockIcon,
GoToIcon, GoToIcon,
MoreIcon, MoreIcon,
} from 'outline-icons'; } from 'outline-icons';
@@ -32,6 +33,11 @@ const Breadcrumb = observer(({ document, collections, onlyText }: Props) => {
if (onlyText === true) { if (onlyText === true) {
return ( return (
<React.Fragment> <React.Fragment>
{collection.private && (
<React.Fragment>
<SmallPadlockIcon color="currentColor" size={16} />{' '}
</React.Fragment>
)}
{collection.name} {collection.name}
{path.map(n => ( {path.map(n => (
<React.Fragment key={n.id}> <React.Fragment key={n.id}>
@@ -83,6 +89,11 @@ const Wrapper = styled(Flex)`
`}; `};
`; `;
const SmallPadlockIcon = styled(PadlockIcon)`
display: inline-block;
vertical-align: sub;
`;
const SmallSlash = styled(GoToIcon)` const SmallSlash = styled(GoToIcon)`
width: 15px; width: 15px;
height: 10px; height: 10px;