chore: Show 'private' badge on private collections (#1952)

* chore: Show 'private' badge on private collections

* lint

* fix: Missing translation mapping
This commit is contained in:
Tom Moor
2021-03-12 16:41:26 -08:00
committed by GitHub
parent bdb684a4be
commit 2385f41a98
5 changed files with 30 additions and 20 deletions

View File

@@ -16,6 +16,7 @@ import CollectionEdit from "scenes/CollectionEdit";
import CollectionMembers from "scenes/CollectionMembers";
import Search from "scenes/Search";
import { Action, Separator } from "components/Actions";
import Badge from "components/Badge";
import Button from "components/Button";
import CenteredContent from "components/CenteredContent";
import CollectionDescription from "components/CollectionDescription";
@@ -252,7 +253,17 @@ class CollectionScene extends React.Component<Props> {
<>
<Heading>
<CollectionIcon collection={collection} size={40} expanded />{" "}
{collection.name}
{collection.name}{" "}
{collection.private && (
<Tooltip
tooltip={t(
"This collection is only visible to people given access"
)}
placement="bottom"
>
<Badge>{t("Private")}</Badge>
</Tooltip>
)}
</Heading>
<CollectionDescription collection={collection} />