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:
parent
edd5bf5842
commit
c7706ac3d5
6 changed files with 138 additions and 0 deletions
|
@ -23,6 +23,7 @@ import * as sdk from "../../../index";
|
|||
import {OwnProfileStore} from "../../../stores/OwnProfileStore";
|
||||
import Modal from "../../../Modal";
|
||||
import ErrorDialog from "../dialogs/ErrorDialog";
|
||||
import SdkConfig from "../../../SdkConfig";
|
||||
|
||||
export default class ProfileSettings extends React.Component {
|
||||
constructor() {
|
||||
|
@ -151,6 +152,13 @@ export default class ProfileSettings extends React.Component {
|
|||
</a>
|
||||
</span>;
|
||||
}
|
||||
const hostingSignupIFrame = SdkConfig.get().hosting_signup_iframe;
|
||||
let hostingIFrame;
|
||||
if (hostingSignupIFrame) {
|
||||
hostingIFrame = <span className="mx_ProfileSettings_hostingIFrame">
|
||||
Get your own personal Element!
|
||||
</span>;
|
||||
}
|
||||
|
||||
const AccessibleButton = sdk.getComponent('elements.AccessibleButton');
|
||||
const AvatarSetting = sdk.getComponent('settings.AvatarSetting');
|
||||
|
@ -175,6 +183,7 @@ export default class ProfileSettings extends React.Component {
|
|||
<p>
|
||||
{this.state.userId}
|
||||
{hostingSignup}
|
||||
{hostingIFrame}
|
||||
</p>
|
||||
</div>
|
||||
<AvatarSetting
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue