From 325447d9fa9a8a0c99733b1a4d01f5f84ff5da2f Mon Sep 17 00:00:00 2001 From: Jason Robinson Date: Tue, 5 Jan 2021 14:47:39 +0200 Subject: [PATCH] Remove the dedicated host signup dialogs, use QuestionDialog --- .../dialogs/ElementProConfirmCloseDialog.tsx | 44 ------------------ .../dialogs/ElementProDataConfirmDialog.tsx | 45 ------------------- .../views/dialogs/HostSignupDialog.tsx | 18 ++++++-- 3 files changed, 14 insertions(+), 93 deletions(-) delete mode 100644 src/components/views/dialogs/ElementProConfirmCloseDialog.tsx delete mode 100644 src/components/views/dialogs/ElementProDataConfirmDialog.tsx diff --git a/src/components/views/dialogs/ElementProConfirmCloseDialog.tsx b/src/components/views/dialogs/ElementProConfirmCloseDialog.tsx deleted file mode 100644 index d8586aa386..0000000000 --- a/src/components/views/dialogs/ElementProConfirmCloseDialog.tsx +++ /dev/null @@ -1,44 +0,0 @@ -/* -Copyright 2020 The Matrix.org Foundation C.I.C. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import React from 'react'; -import QuestionDialog from './QuestionDialog'; -import { _t } from "../../../languageHandler"; -import { IDialogProps } from "./IDialogProps"; - -interface IProps extends IDialogProps { - onFinished(): void; -} - -interface IState {} - -/* - * A dialog for confirming closing the Element Pro setup dialog. - */ -export default class ElementProConfirmCloseDialog extends React.PureComponent { - public render() { - return ( - - ); - } -} diff --git a/src/components/views/dialogs/ElementProDataConfirmDialog.tsx b/src/components/views/dialogs/ElementProDataConfirmDialog.tsx deleted file mode 100644 index c107620f5b..0000000000 --- a/src/components/views/dialogs/ElementProDataConfirmDialog.tsx +++ /dev/null @@ -1,45 +0,0 @@ -/* -Copyright 2020 The Matrix.org Foundation C.I.C. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -import React from 'react'; -import QuestionDialog from './QuestionDialog'; -import { _t } from "../../../languageHandler"; -import { IDialogProps } from "./IDialogProps"; - -interface IProps extends IDialogProps { - onFinished(): void; -} - -interface IState {} - -/* - * A dialog for confirming transfer of data to the Element Pro iframe. - */ -export default class ElementProDataConfirmDialog extends React.PureComponent { - public render() { - return ( - - ); - } -} diff --git a/src/components/views/dialogs/HostSignupDialog.tsx b/src/components/views/dialogs/HostSignupDialog.tsx index 25867e7e2e..34f31e0176 100644 --- a/src/components/views/dialogs/HostSignupDialog.tsx +++ b/src/components/views/dialogs/HostSignupDialog.tsx @@ -16,9 +16,8 @@ limitations under the License. import * as React from "react"; import BaseDialog from '../../views/dialogs/BaseDialog'; -import ElementProConfirmCloseDialog from './ElementProConfirmCloseDialog'; -import ElementProDataConfirmDialog from './ElementProDataConfirmDialog'; import Modal from "../../../Modal"; +import QuestionDialog from './QuestionDialog'; import SdkConfig from "../../../SdkConfig"; import {_t} from "../../../languageHandler"; import {MatrixClientPeg} from "../../../MatrixClientPeg"; @@ -56,8 +55,14 @@ export default class HostSignupDialog extends React.PureComponent { if (result) { return this.sendAccountDetails(); @@ -85,8 +90,13 @@ export default class HostSignupDialog extends React.PureComponent { if (result) { this.props.requestClose();