fix: make sure we don't allow to minimize or revoke api.healthchat.ch widgets

This commit is contained in:
2025-08-27 13:56:26 +02:00
parent 4d9890e413
commit 82aaf0f226
2 changed files with 16 additions and 10 deletions
@@ -55,6 +55,9 @@ const showRevokeButton = (
app: IWidget, app: IWidget,
userWidget: boolean | undefined, userWidget: boolean | undefined,
): boolean => { ): boolean => {
// Don't show revoke button for api.healthchat.ch widgets
if (app.url?.includes("api.healthchat.ch")) return false;
const isAllowedWidget = const isAllowedWidget =
(isAppWidget(app) && (isAppWidget(app) &&
app.eventId !== undefined && app.eventId !== undefined &&
+13 -10
View File
@@ -807,16 +807,19 @@ export default class AppTile extends React.Component<IProps, IState> {
</AccessibleButton>, </AccessibleButton>,
); );
layoutButtons.push( // Don't show minimize button for api.healthchat.ch widgets
<AccessibleButton if (!this.props.app.url?.includes("api.healthchat.ch")) {
key="minimise" layoutButtons.push(
className="mx_AppTileMenuBar_widgets_button" <AccessibleButton
title={_t("action|minimise")} key="minimise"
onClick={this.onMinimiseClicked} className="mx_AppTileMenuBar_widgets_button"
> title={_t("action|minimise")}
<MinusIcon className="mx_Icon mx_Icon_16" /> onClick={this.onMinimiseClicked}
</AccessibleButton>, >
); <MinusIcon className="mx_Icon mx_Icon_16" />
</AccessibleButton>,
);
}
} }
return ( return (