diff --git a/res/css/views/dialogs/_CreateSubspaceDialog.scss b/res/css/views/dialogs/_CreateSubspaceDialog.scss index c780da4b9e..1ec4731ae6 100644 --- a/res/css/views/dialogs/_CreateSubspaceDialog.scss +++ b/res/css/views/dialogs/_CreateSubspaceDialog.scss @@ -39,8 +39,14 @@ limitations under the License. .mx_BetaCard_betaPill { margin-right: 8px; + vertical-align: middle; } } + + .mx_JoinRuleDropdown + p { + color: $muted-fg-color; + font-size: $font-12px; + } } .mx_CreateSubspaceDialog_footer { diff --git a/src/components/views/dialogs/CreateSubspaceDialog.tsx b/src/components/views/dialogs/CreateSubspaceDialog.tsx index 12fd6a3232..6a81bb04df 100644 --- a/src/components/views/dialogs/CreateSubspaceDialog.tsx +++ b/src/components/views/dialogs/CreateSubspaceDialog.tsx @@ -110,6 +110,29 @@ const CreateSubspaceDialog: React.FC = ({ space, onAddExistingSpaceClick } }; + let joinRuleMicrocopy: JSX.Element; + if (joinRule === JoinRule.Restricted) { + joinRuleMicrocopy =

+ { _t( + "Anyone in will be able to find and join.", {}, { + SpaceName: () => { parentSpace.name }, + }, + ) } +

; + } else if (joinRule === JoinRule.Public) { + joinRuleMicrocopy =

+ { _t( + "Anyone will be able to find and join this space, not just members of .", {}, { + SpaceName: () => { parentSpace.name }, + }, + ) } +

; + } else if (joinRule === JoinRule.Invite) { + joinRuleMicrocopy =

+ { _t("Only people invited will be able to find and join this space.") } +

; + } + return = ({ space, onAddExistingSpaceClick value={joinRule} onChange={setJoinRule} /> + { joinRuleMicrocopy } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index e6b96a132d..ef4537bddf 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -2219,6 +2219,9 @@ "Visible to space members": "Visible to space members", "Block anyone not part of %(serverName)s from ever joining this room.": "Block anyone not part of %(serverName)s from ever joining this room.", "Create Room": "Create Room", + "Anyone in will be able to find and join.": "Anyone in will be able to find and join.", + "Anyone will be able to find and join this space, not just members of .": "Anyone will be able to find and join this space, not just members of .", + "Only people invited will be able to find and join this space.": "Only people invited will be able to find and join this space.", "Create a subspace": "Create a subspace", "Add a subspace to a space you manage.": "Add a subspace to a space you manage.", "Subspace visibility": "Subspace visibility",