You've already forked matrix-react-sdk
mirror of
https://github.com/matrix-org/matrix-react-sdk.git
synced 2025-07-15 11:01:52 +03:00
Add possibility for hosting provider IFrame
Add config option hosting_signup_iframe that will render an action in the UserMenu and ProfileSettings for setting up a host with some hosting provider that provides an HTML to do that. Add iframe for hosting provider signup content
This commit is contained in:
@ -51,6 +51,7 @@ import { RightPanelPhases } from "../../stores/RightPanelStorePhases";
|
||||
import ErrorDialog from "../views/dialogs/ErrorDialog";
|
||||
import EditCommunityPrototypeDialog from "../views/dialogs/EditCommunityPrototypeDialog";
|
||||
import {UIFeature} from "../../settings/UIFeature";
|
||||
import HostingProviderTrigger from "./HostingProviderTrigger";
|
||||
|
||||
interface IProps {
|
||||
isMinimized: boolean;
|
||||
@ -311,6 +312,16 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
||||
</div>
|
||||
);
|
||||
}
|
||||
const hostingSignupIFrame = SdkConfig.get().hosting_signup_iframe;
|
||||
let hostingIFrame;
|
||||
if (hostingSignupIFrame) {
|
||||
hostingIFrame = <div
|
||||
className="mx_UserMenu_contextMenu_header mx_UserMenu_contextMenu_hostingLink"
|
||||
onClick={this.onCloseMenu}
|
||||
>
|
||||
<HostingProviderTrigger />
|
||||
</div>;
|
||||
}
|
||||
|
||||
let homeButton = null;
|
||||
if (this.hasHomePage) {
|
||||
@ -495,6 +506,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
|
||||
</AccessibleTooltipButton>
|
||||
</div>
|
||||
{topSection}
|
||||
{hostingIFrame}
|
||||
{primaryOptionList}
|
||||
{secondarySection}
|
||||
</IconizedContextMenu>;
|
||||
|
Reference in New Issue
Block a user