Apply prettier formatting
This commit is contained in:
parent
1cac306093
commit
526645c791
1576 changed files with 65385 additions and 62478 deletions
|
@ -31,7 +31,7 @@ import { ensureDMExists } from "../../../createRoom";
|
|||
import { useTypedEventEmitter } from "../../../hooks/useEventEmitter";
|
||||
import Modal from "../../../Modal";
|
||||
import { _t } from "../../../languageHandler";
|
||||
import { RightPanelPhases } from '../../../stores/right-panel/RightPanelStorePhases';
|
||||
import { RightPanelPhases } from "../../../stores/right-panel/RightPanelStorePhases";
|
||||
import RightPanelStore from "../../../stores/right-panel/RightPanelStore";
|
||||
import ErrorDialog from "../dialogs/ErrorDialog";
|
||||
|
||||
|
@ -48,14 +48,7 @@ interface IProps {
|
|||
}
|
||||
|
||||
const EncryptionPanel: React.FC<IProps> = (props: IProps) => {
|
||||
const {
|
||||
verificationRequest,
|
||||
verificationRequestPromise,
|
||||
member,
|
||||
onClose,
|
||||
layout,
|
||||
isRoomEncrypted,
|
||||
} = props;
|
||||
const { verificationRequest, verificationRequestPromise, member, onClose, layout, isRoomEncrypted } = props;
|
||||
const [request, setRequest] = useState(verificationRequest);
|
||||
// state to show a spinner immediately after clicking "start verification",
|
||||
// before we have a request
|
||||
|
@ -87,15 +80,17 @@ const EncryptionPanel: React.FC<IProps> = (props: IProps) => {
|
|||
Modal.createDialog(ErrorDialog, {
|
||||
headerImage: require("../../../../res/img/e2e/warning-deprecated.svg").default,
|
||||
title: _t("Your messages are not secure"),
|
||||
description: <div>
|
||||
{ _t("One of the following may be compromised:") }
|
||||
<ul>
|
||||
<li>{ _t("Your homeserver") }</li>
|
||||
<li>{ _t("The homeserver the user you're verifying is connected to") }</li>
|
||||
<li>{ _t("Yours, or the other users' internet connection") }</li>
|
||||
<li>{ _t("Yours, or the other users' session") }</li>
|
||||
</ul>
|
||||
</div>,
|
||||
description: (
|
||||
<div>
|
||||
{_t("One of the following may be compromised:")}
|
||||
<ul>
|
||||
<li>{_t("Your homeserver")}</li>
|
||||
<li>{_t("The homeserver the user you're verifying is connected to")}</li>
|
||||
<li>{_t("Yours, or the other users' internet connection")}</li>
|
||||
<li>{_t("Yours, or the other users' session")}</li>
|
||||
</ul>
|
||||
</div>
|
||||
),
|
||||
onFinished: onClose,
|
||||
});
|
||||
return; // don't update phase here as we will be transitioning away from this view shortly
|
||||
|
@ -141,9 +136,9 @@ const EncryptionPanel: React.FC<IProps> = (props: IProps) => {
|
|||
const requested =
|
||||
(!request && isRequesting) ||
|
||||
(request && (phase === PHASE_REQUESTED || phase === PHASE_UNSENT || phase === undefined));
|
||||
const isSelfVerification = request ?
|
||||
request.isSelfVerification :
|
||||
member.userId === MatrixClientPeg.get().getUserId();
|
||||
const isSelfVerification = request
|
||||
? request.isSelfVerification
|
||||
: member.userId === MatrixClientPeg.get().getUserId();
|
||||
|
||||
if (!request || requested) {
|
||||
const initiatedByMe = (!request && isRequesting) || (request && request.initiatedByMe);
|
||||
|
@ -155,7 +150,8 @@ const EncryptionPanel: React.FC<IProps> = (props: IProps) => {
|
|||
isSelfVerification={isSelfVerification}
|
||||
waitingForOtherParty={requested && initiatedByMe}
|
||||
waitingForNetwork={requested && !initiatedByMe}
|
||||
inDialog={layout === "dialog"} />
|
||||
inDialog={layout === "dialog"}
|
||||
/>
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue