diff --git a/res/css/views/dialogs/_HostSignupDialog.scss b/res/css/views/dialogs/_HostSignupDialog.scss index 90e112d378..566f4e8a0d 100644 --- a/res/css/views/dialogs/_HostSignupDialog.scss +++ b/res/css/views/dialogs/_HostSignupDialog.scss @@ -14,22 +14,27 @@ See the License for the specific language governing permissions and limitations under the License. */ -.mx_HostSignupDialog .mx_Dialog { - height: 66%; - min-width: 50%; -} - .mx_HostSignupBaseDialog { - height: 100%; -} + max-height: 600px; + width: 580px; -.mx_HostSignupDialog_container { - height: 90%; + .mx_HostSignupDialog_container { + height: 90%; - iframe { - width: 100%; - height: 100%; - border: none; - background-color: #fff; + .mx_HostSignupDialog_info { + text-align: center; + + .mx_HostSignupDialog_content { + margin-top: 64px; + margin-bottom: 45px; + } + } + + iframe { + width: 100%; + height: 100%; + border: none; + background-color: #fff; + } } } diff --git a/res/img/host_signup.png b/res/img/host_signup.png new file mode 100644 index 0000000000..88fb06111d Binary files /dev/null and b/res/img/host_signup.png differ diff --git a/src/components/views/dialogs/HostSignupDialog.tsx b/src/components/views/dialogs/HostSignupDialog.tsx index 34f31e0176..cecd603904 100644 --- a/src/components/views/dialogs/HostSignupDialog.tsx +++ b/src/components/views/dialogs/HostSignupDialog.tsx @@ -31,6 +31,7 @@ interface IProps { interface IState { completed: boolean; error: string; + loadIframe: boolean; } export default class HostSignupDialog extends React.PureComponent { @@ -43,33 +44,19 @@ export default class HostSignupDialog extends React.PureComponent { + private messageHandler = async (message: IPostmessage) => { if (!this.hostSignupSetupUrl.startsWith(message.origin)) { return; } switch (message.data.action) { case PostmessageAction.HostSignupAccountDetailsRequest: - Modal.createDialog( - QuestionDialog, - { - title: _t("Confirm Account Data Transfer"), - description: _t( - "Please accept transfer of data to the host signup wizard to continue. " + - "The setup wizard will be able to access your account for the duration of the " + - "setup process."), - button: _t("Accept"), - onFinished: result => { - if (result) { - return this.sendAccountDetails(); - } - }, - }, - ); + await this.sendAccountDetails(); break; case PostmessageAction.SetupComplete: // Set as completed but let the user close the modal themselves @@ -132,8 +119,11 @@ export default class HostSignupDialog extends React.PureComponent { window.addEventListener("message", this.messageHandler); + this.setState({ + loadIframe: true, + }); } public componentWillUnmount() { @@ -145,16 +135,39 @@ export default class HostSignupDialog extends React.PureComponent
-