Apply prettier formatting

This commit is contained in:
Michael Weimann 2022-12-12 12:24:14 +01:00
parent 1cac306093
commit 526645c791
No known key found for this signature in database
GPG key ID: 53F535A266BB9584
1576 changed files with 65385 additions and 62478 deletions

View file

@ -23,10 +23,12 @@ import AccessibleButton from "../elements/AccessibleButton";
import Spinner from "../elements/Spinner";
export const PendingActionSpinner = ({ text }) => {
return <div className="mx_EncryptionInfo_spinner">
<Spinner />
{ text }
</div>;
return (
<div className="mx_EncryptionInfo_spinner">
<Spinner />
{text}
</div>
);
};
interface IProps {
@ -50,11 +52,7 @@ const EncryptionInfo: React.FC<IProps> = ({
}: IProps) => {
let content: JSX.Element;
if (waitingForOtherParty && isSelfVerification) {
content = (
<div>
{ _t("To proceed, please accept the verification request on your other device.") }
</div>
);
content = <div>{_t("To proceed, please accept the verification request on your other device.")}</div>;
} else if (waitingForOtherParty || waitingForNetwork) {
let text: string;
if (waitingForOtherParty) {
@ -72,7 +70,7 @@ const EncryptionInfo: React.FC<IProps> = ({
className="mx_UserInfo_wideButton mx_UserInfo_startVerification"
onClick={onStartVerification}
>
{ _t("Start Verification") }
{_t("Start Verification")}
</AccessibleButton>
);
}
@ -81,17 +79,25 @@ const EncryptionInfo: React.FC<IProps> = ({
if (isRoomEncrypted) {
description = (
<div>
<p>{ _t("Messages in this room are end-to-end encrypted.") }</p>
<p>{ _t("Your messages are secured and only you and the recipient have " +
"the unique keys to unlock them.") }</p>
<p>{_t("Messages in this room are end-to-end encrypted.")}</p>
<p>
{_t(
"Your messages are secured and only you and the recipient have " +
"the unique keys to unlock them.",
)}
</p>
</div>
);
} else {
description = (
<div>
<p>{ _t("Messages in this room are not end-to-end encrypted.") }</p>
<p>{ _t("In encrypted rooms, your messages are secured and only you and the recipient have " +
"the unique keys to unlock them.") }</p>
<p>{_t("Messages in this room are not end-to-end encrypted.")}</p>
<p>
{_t(
"In encrypted rooms, your messages are secured and only you and the recipient have " +
"the unique keys to unlock them.",
)}
</p>
</div>
);
}
@ -100,20 +106,26 @@ const EncryptionInfo: React.FC<IProps> = ({
return content;
}
return <React.Fragment>
<div data-test-id='encryption-info-description' className="mx_UserInfo_container">
<h3>{ _t("Encryption") }</h3>
{ description }
</div>
<div className="mx_UserInfo_container">
<h3>{ _t("Verify User") }</h3>
<div>
<p>{ _t("For extra security, verify this user by checking a one-time code on both of your devices.") }</p>
<p>{ _t("To be secure, do this in person or use a trusted way to communicate.") }</p>
{ content }
return (
<React.Fragment>
<div data-test-id="encryption-info-description" className="mx_UserInfo_container">
<h3>{_t("Encryption")}</h3>
{description}
</div>
</div>
</React.Fragment>;
<div className="mx_UserInfo_container">
<h3>{_t("Verify User")}</h3>
<div>
<p>
{_t(
"For extra security, verify this user by checking a one-time code on both of your devices.",
)}
</p>
<p>{_t("To be secure, do this in person or use a trusted way to communicate.")}</p>
{content}
</div>
</div>
</React.Fragment>
);
};
export default EncryptionInfo;