diff --git a/linked-dependencies/matrix-react-sdk/src/components/structures/SpaceRoomView.tsx b/linked-dependencies/matrix-react-sdk/src/components/structures/SpaceRoomView.tsx index 4564741a29..7e1ad0389b 100644 --- a/linked-dependencies/matrix-react-sdk/src/components/structures/SpaceRoomView.tsx +++ b/linked-dependencies/matrix-react-sdk/src/components/structures/SpaceRoomView.tsx @@ -173,7 +173,8 @@ const SpaceLandingAddButton: React.FC<{ space: Room }> = ({ space }) => { showAddExistingRooms(space); }} /> - {canCreateSpace && ( + {/* :TCHAP: space-remove-public-and-subspace */} + {/* {canCreateSpace && ( = ({ space }) => { > - )} + )} */} + {/* end :TCHAP: */} ); diff --git a/linked-dependencies/matrix-react-sdk/src/components/views/context_menus/SpaceContextMenu.tsx b/linked-dependencies/matrix-react-sdk/src/components/views/context_menus/SpaceContextMenu.tsx index 5cb8351916..a899417a01 100644 --- a/linked-dependencies/matrix-react-sdk/src/components/views/context_menus/SpaceContextMenu.tsx +++ b/linked-dependencies/matrix-react-sdk/src/components/views/context_menus/SpaceContextMenu.tsx @@ -193,7 +193,8 @@ const SpaceContextMenu: React.FC = ({ space, hideHeader, onFinished, ... )} - {canAddSubSpaces && ( + {/* :TCHAP: space-remove-public-and-subspace */} + {/* {canAddSubSpaces && ( = ({ space, hideHeader, onFinished, ... > - )} + )} */} + {/* end :TCHAP: */} ); } diff --git a/linked-dependencies/matrix-react-sdk/src/components/views/rooms/RoomListHeader.tsx b/linked-dependencies/matrix-react-sdk/src/components/views/rooms/RoomListHeader.tsx index bcd918eaf3..913995961c 100644 --- a/linked-dependencies/matrix-react-sdk/src/components/views/rooms/RoomListHeader.tsx +++ b/linked-dependencies/matrix-react-sdk/src/components/views/rooms/RoomListHeader.tsx @@ -269,7 +269,8 @@ const RoomListHeader: React.FC = ({ onVisibilityChange }) => { disabled={!canAddSubRooms} title={!canAddSubRooms ? _t("spaces|error_no_permission_add_room") : undefined} /> - {canCreateSpaces && ( + {/* :TCHAP: space-remove-public-and-subspace */} + {/* {canCreateSpaces && ( = ({ onVisibilityChange }) => { > - )} + )} */} + {/* end :TCHAP: */} ); diff --git a/linked-dependencies/matrix-react-sdk/src/components/views/spaces/SpaceCreateMenu.tsx b/linked-dependencies/matrix-react-sdk/src/components/views/spaces/SpaceCreateMenu.tsx index a690d3494d..9fa62ebc8f 100644 --- a/linked-dependencies/matrix-react-sdk/src/components/views/spaces/SpaceCreateMenu.tsx +++ b/linked-dependencies/matrix-react-sdk/src/components/views/spaces/SpaceCreateMenu.tsx @@ -218,7 +218,8 @@ const SpaceCreateMenu: React.FC<{ onFinished(): void; }> = ({ onFinished }) => { const cli = useMatrixClientContext(); - const [visibility, setVisibility] = useState(null); + // const [visibility, setVisibility] = useState(null); + const [visibility, setVisibility] = useState(Visibility.Private); // :TCHAP: space-remove-public-and-subspace const [busy, setBusy] = useState(false); const [name, setName] = useState(""); @@ -280,71 +281,109 @@ const SpaceCreateMenu: React.FC<{ }; let body; - if (visibility === null) { - body = ( - -

{_t("create_space|label")}

-

{_t("create_space|explainer")}

- - setVisibility(Visibility.Public)} - /> - setVisibility(Visibility.Private)} - /> - - {supportsSpaceFiltering && ( - - {_t("create_space|search_public_button")} - - )} -
- ); - } else { - body = ( - - setVisibility(null)} - title={_t("action|go_back")} - /> - -

- {visibility === Visibility.Public - ? _t("create_space|public_heading") - : _t("create_space|private_heading")} -

-

- {_t("create_space|add_details_prompt")} {_t("create_space|add_details_prompt_2")} -

- - + // :TCHAP: space-remove-public-and-subspace + // if (visibility === null) { + // body = ( + // + //

{_t("create_space|label")}

+ //

{_t("create_space|explainer")}

+ + // setVisibility(Visibility.Public)} + // /> + // setVisibility(Visibility.Private)} + // /> + + // {supportsSpaceFiltering && ( + // + // {_t("create_space|search_public_button")} + // + // )} + //
+ // ); + // } else { + // body = ( + // + // setVisibility(null)} + // title={_t("action|go_back")} + // /> + + //

+ // {visibility === Visibility.Public + // ? _t("create_space|public_heading") + // : _t("create_space|private_heading")} + //

+ //

+ // {_t("create_space|add_details_prompt")} {_t("create_space|add_details_prompt_2")} + //

+ + // + + // + // {busy ? _t("create_space|creating") : _t("action|create")} + // + //
+ // ); + // } + body = ( + +

+ {_t("create_space|private_heading")} +

+

+ {_t("create_space|add_details_prompt")} {_t("create_space|add_details_prompt_2", {}, { + a: (sub) => ( + {window.open("https://aide.tchap.beta.gouv.fr/","_blank")}}> + {sub} + + ), + }) + } +

+ + - - {busy ? _t("create_space|creating") : _t("action|create")} - -
- ); - } + + {busy ? _t("create_space|creating") : _t("action|create")} + +
+ ); + // end :TCHAP: return ( Learn more ", + "fr": "En savoir plus" } } diff --git a/modules/tchap-translations/tchap_translations_removed.json b/modules/tchap-translations/tchap_translations_removed.json index 4744515c35..6305f0de64 100644 --- a/modules/tchap-translations/tchap_translations_removed.json +++ b/modules/tchap-translations/tchap_translations_removed.json @@ -47,5 +47,13 @@ "onboarding|enable_notifications", "onboarding|enable_notifications_action", "onboarding|enable_notifications_description", - "onboarding|you_made_it" + "onboarding|you_made_it", + "create_space|search_public_button", + "create_space|private_description", + "create_space|public_description", + "create_space|explainer", + "create_space|public_heading", + "common|private", + "room_list|add_space_label", + "spaces|error_no_permission_add_space" ] diff --git a/patches/subtree-modifications.json b/patches/subtree-modifications.json index ee232a1cfc..cc9b10e143 100644 --- a/patches/subtree-modifications.json +++ b/patches/subtree-modifications.json @@ -43,5 +43,14 @@ "files": [ "src/components/views/dialogs/InviteDialog.tsx" ] + }, + "space-remove-public-and-subspace": { + "issue": "https://github.com/tchapgouv/tchap-web-v4/issues/878", + "files": [ + "src/components/views/spaces/SpaceCreateMenu.tsx", + "src/components/views/rooms/RoomListHeader.tsx", + "src/components/views/context_menus/SpaceContextMenu.tsx", + "src/components/structures/SpaceRoomView.tsx" + ] } } \ No newline at end of file diff --git a/res/themes/tchap-common/css/_tchap_custom.pcss b/res/themes/tchap-common/css/_tchap_custom.pcss index 47cca781cf..dde94c48a0 100644 --- a/res/themes/tchap-common/css/_tchap_custom.pcss +++ b/res/themes/tchap-common/css/_tchap_custom.pcss @@ -63,6 +63,7 @@ } } -.mx_ThreadsActivityCentreButton .mx_ThreadsActivityCentreButton_Icon { - color: white; +.mx_ThreadsActivityCentreButton .mx_ThreadsActivityCentreButton_Icon, +.mx_ThreadsActivityCentreButton .mx_ThreadsActivityCentreButton_Text { + color: white !important; } \ No newline at end of file