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
committed by Joël
parent 25fe9e1f64
commit b7a94af3f9
2 changed files with 16 additions and 10 deletions
@@ -55,6 +55,9 @@ const showRevokeButton = (
app: IWidget,
userWidget: boolean | undefined,
): boolean => {
// Don't show revoke button for api.healthchat.ch widgets
if (app.url?.includes("api.healthchat.ch")) return false;
const isAllowedWidget =
(isAppWidget(app) &&
app.eventId !== undefined &&
@@ -838,16 +838,19 @@ export default class AppTile extends React.Component<IProps, IState> {
</AccessibleButton>,
);
layoutButtons.push(
<AccessibleButton
key="minimise"
className="mx_AppTileMenuBar_widgets_button"
title={_t("action|minimise")}
onClick={this.onMinimiseClicked}
>
<MinusIcon className="mx_Icon mx_Icon_16" />
</AccessibleButton>,
);
// Don't show minimize button for api.healthchat.ch widgets
if (!this.props.app.url?.includes("api.healthchat.ch")) {
layoutButtons.push(
<AccessibleButton
key="minimise"
className="mx_AppTileMenuBar_widgets_button"
title={_t("action|minimise")}
onClick={this.onMinimiseClicked}
>
<MinusIcon className="mx_Icon mx_Icon_16" />
</AccessibleButton>,
);
}
}
return (