Rename components to be less EMS specific
This commit is contained in:
parent
129795c2ec
commit
7a358b1ca3
8 changed files with 23 additions and 23 deletions
|
@ -69,7 +69,7 @@
|
|||
@import "./views/dialogs/_DeactivateAccountDialog.scss";
|
||||
@import "./views/dialogs/_DevtoolsDialog.scss";
|
||||
@import "./views/dialogs/_EditCommunityPrototypeDialog.scss";
|
||||
@import "./views/dialogs/_EMSElementProDialog.scss";
|
||||
@import "./views/dialogs/_ElementProDialog.scss";
|
||||
@import "./views/dialogs/_FeedbackDialog.scss";
|
||||
@import "./views/dialogs/_GroupAddressPicker.scss";
|
||||
@import "./views/dialogs/_IncomingSasDialog.scss";
|
||||
|
|
|
@ -14,16 +14,16 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
.mx_EMSElementProDialog .mx_Dialog {
|
||||
.mx_ElementProDialog .mx_Dialog {
|
||||
height: 66%;
|
||||
min-width: 50%;
|
||||
}
|
||||
|
||||
.mx_EMSElementProBaseDialog {
|
||||
.mx_ElementProBaseDialog {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mx_EMSElementProDialog_container {
|
||||
.mx_ElementProDialog_container {
|
||||
height: 90%;
|
||||
|
||||
iframe {
|
|
@ -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,
|
||||
},
|
||||
);
|
|
@ -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>;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -28,7 +28,7 @@ interface IState {}
|
|||
/*
|
||||
* A dialog for confirming closing the Element Pro setup dialog.
|
||||
*/
|
||||
export default class EMSElementProConfirmCloseDialog extends React.PureComponent<IProps, IState> {
|
||||
export default class ElementProConfirmCloseDialog extends React.PureComponent<IProps, IState> {
|
||||
public render() {
|
||||
return (
|
||||
<QuestionDialog
|
|
@ -28,7 +28,7 @@ interface IState {}
|
|||
/*
|
||||
* A dialog for confirming transfer of data to the Element Pro iframe.
|
||||
*/
|
||||
export default class EMSElementProDataConfirmDialog extends React.PureComponent<IProps, IState> {
|
||||
export default class ElementProDataConfirmDialog extends React.PureComponent<IProps, IState> {
|
||||
public render() {
|
||||
return (
|
||||
<QuestionDialog
|
|
@ -16,14 +16,14 @@ limitations under the License.
|
|||
|
||||
import * as React from "react";
|
||||
import BaseDialog from '../../views/dialogs/BaseDialog';
|
||||
import EMSElementProConfirmCloseDialog from './EMSElementProConfirmCloseDialog';
|
||||
import EMSElementProDataConfirmDialog from './EMSElementProDataConfirmDialog';
|
||||
import ElementProConfirmCloseDialog from './ElementProConfirmCloseDialog';
|
||||
import ElementProDataConfirmDialog from './ElementProDataConfirmDialog';
|
||||
import Modal from "../../../Modal";
|
||||
import SdkConfig from "../../../SdkConfig";
|
||||
import {_t} from "../../../languageHandler";
|
||||
import {MatrixClientPeg} from "../../../MatrixClientPeg";
|
||||
import {OwnProfileStore} from "../../../stores/OwnProfileStore";
|
||||
import {IPostmessage, IPostmessageResponseData, PostmessageAction} from "./EMSElementProDialogTypes";
|
||||
import {IPostmessage, IPostmessageResponseData, PostmessageAction} from "./ElementProDialogTypes";
|
||||
|
||||
interface IProps {
|
||||
requestClose(): void;
|
||||
|
@ -34,7 +34,7 @@ interface IState {
|
|||
error: string;
|
||||
}
|
||||
|
||||
export default class EMSElementProDialog extends React.PureComponent<IProps, IState> {
|
||||
export default class ElementProDialog extends React.PureComponent<IProps, IState> {
|
||||
private iframeRef: React.RefObject<HTMLIFrameElement> = React.createRef();
|
||||
private readonly elementProSetupUrl: string;
|
||||
|
||||
|
@ -46,7 +46,7 @@ export default class EMSElementProDialog extends React.PureComponent<IProps, ISt
|
|||
error: null,
|
||||
};
|
||||
|
||||
this.elementProSetupUrl = SdkConfig.get().ems_element_pro.url;
|
||||
this.elementProSetupUrl = SdkConfig.get().element_pro.url;
|
||||
}
|
||||
|
||||
private messageHandler = (message: IPostmessage) => {
|
||||
|
@ -56,7 +56,7 @@ export default class EMSElementProDialog extends React.PureComponent<IProps, ISt
|
|||
switch (message.data.action) {
|
||||
case PostmessageAction.ElementProAccountDetailsRequest:
|
||||
Modal.createDialog(
|
||||
EMSElementProDataConfirmDialog,
|
||||
ElementProDataConfirmDialog,
|
||||
{
|
||||
onFinished: result => {
|
||||
if (result) {
|
||||
|
@ -85,7 +85,7 @@ export default class EMSElementProDialog extends React.PureComponent<IProps, ISt
|
|||
this.props.requestClose();
|
||||
} else {
|
||||
Modal.createDialog(
|
||||
EMSElementProConfirmCloseDialog,
|
||||
ElementProConfirmCloseDialog,
|
||||
{
|
||||
onFinished: result => {
|
||||
if (result) {
|
||||
|
@ -133,13 +133,13 @@ export default class EMSElementProDialog extends React.PureComponent<IProps, ISt
|
|||
public render(): React.ReactNode {
|
||||
return (
|
||||
<BaseDialog
|
||||
className="mx_EMSElementProBaseDialog"
|
||||
className="mx_ElementProBaseDialog"
|
||||
onFinished={this.onFinished}
|
||||
title={_t("Set up your own personal Element host")}
|
||||
hasCancel={true}
|
||||
fixedWidth={false}
|
||||
>
|
||||
<div className="mx_EMSElementProDialog_container">
|
||||
<div className="mx_ElementProDialog_container">
|
||||
<iframe
|
||||
src={this.elementProSetupUrl}
|
||||
ref={this.iframeRef}
|
Loading…
Reference in a new issue