diff --git a/linked-dependencies/matrix-react-sdk/src/components/views/right_panel/RightPanelTabs.tsx b/linked-dependencies/matrix-react-sdk/src/components/views/right_panel/RightPanelTabs.tsx index 4873f707b2..a373523be4 100644 --- a/linked-dependencies/matrix-react-sdk/src/components/views/right_panel/RightPanelTabs.tsx +++ b/linked-dependencies/matrix-react-sdk/src/components/views/right_panel/RightPanelTabs.tsx @@ -21,6 +21,7 @@ import SettingsStore from "../../../settings/SettingsStore"; import { UIComponent, UIFeature } from "../../../settings/UIFeature"; import { shouldShowComponent } from "../../../customisations/helpers/UIComponents"; import { isVideoRoom as calcIsVideoRoom } from "../../../utils/video-rooms"; +import TchapUIFeature from "../../../../../../src/tchap/util/TchapUIFeature"; function shouldShowTabsForPhase(phase?: RightPanelPhases): boolean { const tabs = [ @@ -86,7 +87,9 @@ export const RightPanelTabs: React.FC = ({ phase, room }): JSX.Element | > {_t("common|threads")} - {SettingsStore.getValue(UIFeature.Widgets) && + {/* :TCHAP: hide-widgets-settings */} + {/* {SettingsStore.getValue(UIFeature.Widgets) && */} + {TchapUIFeature.showWidgetsSettings && SettingsStore.getValue(UIFeature.Widgets) && !isVideoRoom && shouldShowComponent(UIComponent.AddIntegrations) && ( + {/* :TCHAP: hide-widgets-settings - */} + { TchapUIFeature.showWidgetsSettings && } + {/* end :TCHAP: */} {crossSigning} diff --git a/patches/subtree-modifications.json b/patches/subtree-modifications.json index 878d86eb81..c9c9488e23 100644 --- a/patches/subtree-modifications.json +++ b/patches/subtree-modifications.json @@ -82,10 +82,17 @@ "sso-agentconnect-flow": { "issue": "https://github.com/tchapgouv/tchap-web-v4/issues/386", "files": [ - "src/components/structures/MatrixChat.tsx", + "src/components/structures/MatrixChat.tsx", "src/components/structures/auth/Registration.tsx", "src/components/structures/auth/Login.tsx", "src/components/views/auth/Welcome.tsx" ] + }, + "hide-widgets-settings": { + "issue": "https://github.com/tchapgouv/tchap-web-v4/issues/1117", + "files": [ + "src/components/views/right_panel/RightPanelTabs.tsx", + "src/components/views/settings/tabs/user/SecurityUserSettingsTab.tsx" + ] } } \ No newline at end of file diff --git a/src/tchap/util/TchapUIFeature.ts b/src/tchap/util/TchapUIFeature.ts index 1a966e6f60..f35acb6fd6 100644 --- a/src/tchap/util/TchapUIFeature.ts +++ b/src/tchap/util/TchapUIFeature.ts @@ -27,6 +27,11 @@ export default class TchapUIFeature { */ public static activateClearCacheAndReloadAtVersion4 = true; + /** + * Hide UI for widget and integration manager. We use a flag cause it may be useful for future usecase + */ + public static showWidgetsSettings = false; + /** * Whether the given feature is active on the current user's homeserver. * We get the list of homeservers where the feature should be activated from config.json