Rename components to be less EMS specific

This commit is contained in:
Jason Robinson 2020-12-28 11:21:42 +02:00
parent 129795c2ec
commit 7a358b1ca3
8 changed files with 23 additions and 23 deletions

View file

@ -15,7 +15,7 @@ limitations under the License.
*/
import * as React from "react";
import EMSElementProDialog from "../views/dialogs/EMSElementProDialog";
import ElementProDialog from "../views/dialogs/ElementProDialog";
import Modal, {IHandle} from "../../Modal";
import {
IconizedContextMenuOption,
@ -27,15 +27,15 @@ interface IProps {}
interface IState {}
export default class EMSElementProAction extends React.PureComponent<IProps, IState> {
export default class ElementProAction extends React.PureComponent<IProps, IState> {
private closingAllowed = false;
private modalRef: IHandle<void[]>;
private openDialog = () => {
this.modalRef = Modal.createTrackedDialog(
'Element Pro Open', '', EMSElementProDialog, {
'Element Pro Open', '', ElementProDialog, {
requestClose: this.requestClose,
}, "mx_EMSElementProDialog", false, true, {
}, "mx_ElementProDialog", false, true, {
onBeforeClose: async () => this.closingAllowed,
},
);

View file

@ -51,7 +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 EMSElementProAction from "./EMSElementProAction";
import ElementProAction from "./ElementProAction";
interface IProps {
isMinimized: boolean;
@ -274,7 +274,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
let topSection;
const signupLink = getHostingLink("user-context-menu");
const elementProConfig = SdkConfig.get().ems_element_pro;
const elementProConfig = SdkConfig.get().element_pro;
if (MatrixClientPeg.get().isGuest()) {
topSection = (
<div className="mx_UserMenu_contextMenu_header mx_UserMenu_contextMenu_guestPrompts">
@ -297,7 +297,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
} else if (signupLink || elementProConfig) {
let elementProIFrame;
if (elementProConfig && elementProConfig.url) {
// If ems_element_pro.domains is set to a non-empty array, only show
// If element_pro.domains is set to a non-empty array, only show
// dialog if the user is on the domain or a subdomain.
const elementProDomains = elementProConfig.domains || [];
const mxDomain = MatrixClientPeg.get().getDomain();
@ -307,7 +307,7 @@ export default class UserMenu extends React.Component<IProps, IState> {
className=""
onClick={this.onCloseMenu}
>
<EMSElementProAction />
<ElementProAction />
</div>;
}
}