From 69c37c4594c9a1a4bae7a65c50fbc660f9cdf80a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Mon, 8 Aug 2022 12:48:42 +0200 Subject: [PATCH] Show 'public poll' label MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- app/soapbox/components/polls/poll-footer.tsx | 15 ++++++++++++++- app/soapbox/normalizers/poll.ts | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/soapbox/components/polls/poll-footer.tsx b/app/soapbox/components/polls/poll-footer.tsx index c7997cfd7..366f34d1c 100644 --- a/app/soapbox/components/polls/poll-footer.tsx +++ b/app/soapbox/components/polls/poll-footer.tsx @@ -5,13 +5,14 @@ import { fetchPoll, vote } from 'soapbox/actions/polls'; import { useAppDispatch } from 'soapbox/hooks'; import RelativeTimestamp from '../relative_timestamp'; -import { Button, HStack, Stack, Text } from '../ui'; +import { Button, HStack, Stack, Text, Tooltip } from '../ui'; import type { Selected } from './poll'; import type { Poll as PollEntity } from 'soapbox/types/entities'; const messages = defineMessages({ closed: { id: 'poll.closed', defaultMessage: 'Closed' }, + nonAnonymous: { id: 'poll.non_anonymous.label', defaultMessage: 'Other instances may display the options you voted for' }, }); interface IPollFooter { @@ -54,6 +55,18 @@ const PollFooter: React.FC = ({ poll, showResults, selected }): JSX )} + {poll.pleroma.get('non_anonymous') && ( + <> + + + + + + + · + + )} + {showResults && ( <>