Address some of the PR feedback

This commit is contained in:
Jason Robinson 2021-02-09 20:13:49 +02:00
parent a4a478cf72
commit 2197c1e519
3 changed files with 12 additions and 10 deletions

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import * as React from "react"; import React from "react";
import { import {
IconizedContextMenuOption, IconizedContextMenuOption,
IconizedContextMenuOptionList, IconizedContextMenuOptionList,
@ -36,7 +36,7 @@ export default class HostSignupAction extends React.PureComponent<IProps, IState
<IconizedContextMenuOptionList> <IconizedContextMenuOptionList>
<IconizedContextMenuOption <IconizedContextMenuOption
iconClassName="mx_UserMenu_iconHosting" iconClassName="mx_UserMenu_iconHosting"
label={_t("Get your own Element!")} label={_t("Get your own %(brand)s!")}
onClick={this.openDialog} onClick={this.openDialog}
/> />
</IconizedContextMenuOptionList> </IconizedContextMenuOptionList>

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import * as React from "react"; import React from "react";
import AccessibleButton from "../elements/AccessibleButton"; import AccessibleButton from "../elements/AccessibleButton";
import Modal from "../../../Modal"; import Modal from "../../../Modal";
import PersistedElement from "../elements/PersistedElement"; import PersistedElement from "../elements/PersistedElement";
@ -119,7 +119,7 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
Modal.createDialog( Modal.createDialog(
QuestionDialog, QuestionDialog,
{ {
title: _t("Confirm Abort Of Host Creation"), title: _t("Confirm abort of host creation"),
description: _t( description: _t(
"Are you sure you wish to abort creation of the host? The process cannot be continued.", "Are you sure you wish to abort creation of the host? The process cannot be continued.",
), ),
@ -234,12 +234,14 @@ export default class HostSignupDialog extends React.PureComponent<IProps, IState
{!this.state.minimized && {!this.state.minimized &&
<div className="mx_Dialog_header mx_Dialog_headerWithCancel"> <div className="mx_Dialog_header mx_Dialog_headerWithCancel">
<AccessibleButton <AccessibleButton
onClick={this.minimizeDialog} className="mx_HostSignup_minimize_button" onClick={this.minimizeDialog}
className="mx_HostSignup_minimize_button"
aria-label={_t("Minimize dialog")} aria-label={_t("Minimize dialog")}
title={_t("Minimize dialog")} title={_t("Minimize dialog")}
/> />
<AccessibleButton <AccessibleButton
onClick={this.onCloseClick} className="mx_Dialog_cancelButton" onClick={this.onCloseClick}
className="mx_Dialog_cancelButton"
aria-label={_t("Close dialog")} aria-label={_t("Close dialog")}
title={_t("Close dialog")} title={_t("Close dialog")}
/> />

View file

@ -14,11 +14,11 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import React, {useState} from 'react'; import React, { useState } from 'react';
import HostSignupDialog from "../dialogs/HostSignupDialog"; import HostSignupDialog from "../dialogs/HostSignupDialog";
import {HostSignupStore} from "../../../stores/HostSignupStore"; import { HostSignupStore } from "../../../stores/HostSignupStore";
import {useEventEmitter} from "../../../hooks/useEventEmitter"; import { useEventEmitter } from "../../../hooks/useEventEmitter";
import {UPDATE_EVENT} from "../../../stores/AsyncStore"; import { UPDATE_EVENT } from "../../../stores/AsyncStore";
const HostSignupContainer = () => { const HostSignupContainer = () => {
const [isActive, setIsActive] = useState(HostSignupStore.instance.isHostSignupActive); const [isActive, setIsActive] = useState(HostSignupStore.instance.isHostSignupActive);