mirror of
https://github.com/Novaloop-AG/healthchat-web.git
synced 2026-11-04 20:01:58 +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,
|
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,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 (
|
||||||
|
|||||||
Reference in New Issue
Block a user