From 9cd4f92027774029234e38980fac3a12f136166f Mon Sep 17 00:00:00 2001 From: Eric Bailey Date: Thu, 6 Feb 2025 11:51:40 -0600 Subject: [APP-1013] Configure and apply default post interaction settings from user preferences (#7664) * Add interaction settings screen * Move header out of interaction settings form * WIP hook it up * Thread through default settings into composer * Update copy pasta * Handle edited state * Copy feedback * Sentence case Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * Update copy * Bump SDK * Fix new type error * Less in your face * Remove new dep * Add slot * Copy edit --------- Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> --- .../dialogs/PostInteractionSettingsDialog.tsx | 82 +++++++++++++++------- 1 file changed, 56 insertions(+), 26 deletions(-) (limited to 'src/components/dialogs/PostInteractionSettingsDialog.tsx') diff --git a/src/components/dialogs/PostInteractionSettingsDialog.tsx b/src/components/dialogs/PostInteractionSettingsDialog.tsx index a698574a4..b443d59f2 100644 --- a/src/components/dialogs/PostInteractionSettingsDialog.tsx +++ b/src/components/dialogs/PostInteractionSettingsDialog.tsx @@ -40,6 +40,7 @@ import {Loader} from '#/components/Loader' import {Text} from '#/components/Typography' export type PostInteractionSettingsFormProps = { + canSave?: boolean onSave: () => void isSaving?: boolean @@ -58,20 +59,53 @@ export function PostInteractionSettingsControlledDialog({ }: PostInteractionSettingsFormProps & { control: Dialog.DialogControlProps }) { + const t = useTheme() const {_} = useLingui() + return ( - + +
+ + + + You can set default interaction settings in{' '} + + Settings → Moderation → Interaction settings. + + + + ) } +export function Header() { + return ( + + + Post interaction settings + + + Customize who can interact with this post. + + + + ) +} + export type PostInteractionSettingsDialogProps = { control: Dialog.DialogControlProps /** @@ -203,26 +237,31 @@ export function PostInteractionSettingsDialogControlledInner( - {isLoading ? ( - - - - ) : ( - - )} + +
+ + {isLoading ? ( + + + + ) : ( + + )} + ) } export function PostInteractionSettingsForm({ + canSave = true, onSave, isSaving, postgate, @@ -283,17 +322,7 @@ export function PostInteractionSettingsForm({ return ( - - Post interaction settings - - - - Customize who can interact with this post. - - - - Quote settings @@ -435,6 +464,7 @@ export function PostInteractionSettingsForm({