mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-10-31 16:23:03 +00:00
fix: make sure we don't allow to minimize or revoke api.healthchat.ch widgets
This commit is contained in:
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user