From 9b306598cc1e942c2b814fb441a1ae176aff3894 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Sat, 28 Jun 2025 00:03:22 +0300 Subject: tweak who can reply dialog (#8573) --- src/components/WhoCanReply.tsx | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/components/WhoCanReply.tsx b/src/components/WhoCanReply.tsx index 22a514194..86c0c936e 100644 --- a/src/components/WhoCanReply.tsx +++ b/src/components/WhoCanReply.tsx @@ -1,4 +1,4 @@ -import React from 'react' +import {Fragment, useMemo} from 'react' import { Keyboard, Platform, @@ -22,8 +22,8 @@ import { type ThreadgateAllowUISetting, threadgateViewToAllowUISetting, } from '#/state/queries/threadgate' -import {atoms as a, useTheme} from '#/alf' -import {Button} from '#/components/Button' +import {atoms as a, useTheme, web} from '#/alf' +import {Button, ButtonText} from '#/components/Button' import * as Dialog from '#/components/Dialog' import {useDialogControl} from '#/components/Dialog' import { @@ -61,7 +61,7 @@ export function WhoCanReply({post, isThreadAuthor, style}: WhoCanReplyProps) { ) && post.record.reply?.root ? post.record.reply.root.uri : post.uri - const settings = React.useMemo(() => { + const settings = useMemo(() => { return threadgateViewToAllowUISetting(post.threadgate) }, [post.threadgate]) @@ -178,12 +178,13 @@ function WhoCanReplyDialog({ embeddingDisabled: boolean }) { const {_} = useLingui() + return ( - + + style={web({maxWidth: 400})}> Who can interact with this post? @@ -194,6 +195,20 @@ function WhoCanReplyDialog({ embeddingDisabled={embeddingDisabled} /> + {isNative && ( + + )} + ) @@ -232,10 +247,10 @@ function Rules({ Only{' '} {settings.map((rule, i) => ( - + - + ))}{' '} can reply. -- cgit 1.4.1