fix: Incorrect message on insights control, closes OLN-297
This commit is contained in:
@@ -15,6 +15,7 @@ import PaginatedList from "~/components/PaginatedList";
|
|||||||
import Switch from "~/components/Switch";
|
import Switch from "~/components/Switch";
|
||||||
import Text from "~/components/Text";
|
import Text from "~/components/Text";
|
||||||
import Time from "~/components/Time";
|
import Time from "~/components/Time";
|
||||||
|
import useCurrentUser from "~/hooks/useCurrentUser";
|
||||||
import useKeyDown from "~/hooks/useKeyDown";
|
import useKeyDown from "~/hooks/useKeyDown";
|
||||||
import usePolicy from "~/hooks/usePolicy";
|
import usePolicy from "~/hooks/usePolicy";
|
||||||
import useStores from "~/hooks/useStores";
|
import useStores from "~/hooks/useStores";
|
||||||
@@ -25,6 +26,7 @@ import Sidebar from "./SidebarLayout";
|
|||||||
function Insights() {
|
function Insights() {
|
||||||
const { views, documents } = useStores();
|
const { views, documents } = useStores();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const user = useCurrentUser();
|
||||||
const match = useRouteMatch<{ documentSlug: string }>();
|
const match = useRouteMatch<{ documentSlug: string }>();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
const selectedText = useTextSelection();
|
const selectedText = useTextSelection();
|
||||||
@@ -161,9 +163,13 @@ function Insights() {
|
|||||||
{t("Viewer insights")}
|
{t("Viewer insights")}
|
||||||
</Text>
|
</Text>
|
||||||
<Text as="p" type="secondary" size="small">
|
<Text as="p" type="secondary" size="small">
|
||||||
{t(
|
{user.isAdmin
|
||||||
"As an admin you can manage if team members can see who has viewed this document"
|
? t(
|
||||||
)}
|
"As an admin you can manage if team members can see who has viewed this document"
|
||||||
|
)
|
||||||
|
: t(
|
||||||
|
"As the doc owner you can manage if team members can see who has viewed this document"
|
||||||
|
)}
|
||||||
</Text>
|
</Text>
|
||||||
</Flex>
|
</Flex>
|
||||||
<Switch
|
<Switch
|
||||||
|
|||||||
@@ -586,6 +586,7 @@
|
|||||||
"Viewed {{ count }} times by {{ teamMembers }} people_plural": "Viewed {{ count }} times by {{ teamMembers }} people",
|
"Viewed {{ count }} times by {{ teamMembers }} people_plural": "Viewed {{ count }} times by {{ teamMembers }} people",
|
||||||
"Viewer insights": "Viewer insights",
|
"Viewer insights": "Viewer insights",
|
||||||
"As an admin you can manage if team members can see who has viewed this document": "As an admin you can manage if team members can see who has viewed this document",
|
"As an admin you can manage if team members can see who has viewed this document": "As an admin you can manage if team members can see who has viewed this document",
|
||||||
|
"As the doc owner you can manage if team members can see who has viewed this document": "As the doc owner you can manage if team members can see who has viewed this document",
|
||||||
"Sorry, the last change could not be persisted – please reload the page": "Sorry, the last change could not be persisted – please reload the page",
|
"Sorry, the last change could not be persisted – please reload the page": "Sorry, the last change could not be persisted – please reload the page",
|
||||||
"{{ count }} days": "{{ count }} day",
|
"{{ count }} days": "{{ count }} day",
|
||||||
"{{ count }} days_plural": "{{ count }} days",
|
"{{ count }} days_plural": "{{ count }} days",
|
||||||
|
|||||||
Reference in New Issue
Block a user