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 &&
@@ -807,6 +807,8 @@ export default class AppTile extends React.Component<IProps, IState> {
</AccessibleButton>, </AccessibleButton>,
); );
// Don't show minimize button for api.healthchat.ch widgets
if (!this.props.app.url?.includes("api.healthchat.ch")) {
layoutButtons.push( layoutButtons.push(
<AccessibleButton <AccessibleButton
key="minimise" key="minimise"
@@ -818,6 +820,7 @@ export default class AppTile extends React.Component<IProps, IState> {
</AccessibleButton>, </AccessibleButton>,
); );
} }
}
return ( return (
<React.Fragment> <React.Fragment>