Fix e2e icons in CompleteSecurity & SetupEncryptionBody (#31521)

* Fix e2e icons in CompleteSecurity & SetupEncryptionBody

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Prevent screenshot clash between tests

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-12-11 16:37:49 +00:00
committed by GitHub
parent 362e34513d
commit 7b024f956d
8 changed files with 75 additions and 47 deletions

View File

@@ -10,12 +10,14 @@ import React from "react";
import { Glass } from "@vector-im/compound-web";
import { _t } from "../../../languageHandler";
import { SetupEncryptionStore, Phase } from "../../../stores/SetupEncryptionStore";
import { Phase, SetupEncryptionStore } from "../../../stores/SetupEncryptionStore";
import SetupEncryptionBody from "./SetupEncryptionBody";
import AccessibleButton from "../../views/elements/AccessibleButton";
import CompleteSecurityBody from "../../views/auth/CompleteSecurityBody";
import AuthPage from "../../views/auth/AuthPage";
import SdkConfig from "../../../SdkConfig";
import E2EIcon from "../../views/rooms/E2EIcon.tsx";
import { E2EStatus } from "../../../utils/ShieldUtils.ts";
interface IProps {
onFinished: () => void;
@@ -67,13 +69,13 @@ export default class CompleteSecurity extends React.Component<IProps, IState> {
} else if (phase === Phase.Intro) {
// We don't specify an icon nor title since `SetupEncryptionBody` provides its own
} else if (phase === Phase.Done) {
icon = <span className="mx_CompleteSecurity_headerIcon mx_E2EIcon_verified" />;
icon = <E2EIcon className="mx_CompleteSecurity_headerIcon" status={E2EStatus.Verified} hideTooltip />;
title = _t("encryption|verification|after_new_login|device_verified");
} else if (phase === Phase.ConfirmSkip) {
icon = <span className="mx_CompleteSecurity_headerIcon mx_E2EIcon_warning" />;
icon = <E2EIcon className="mx_CompleteSecurity_headerIcon" status={E2EStatus.Warning} hideTooltip />;
title = _t("common|are_you_sure");
} else if (phase === Phase.Busy) {
icon = <span className="mx_CompleteSecurity_headerIcon mx_E2EIcon_warning" />;
icon = <E2EIcon className="mx_CompleteSecurity_headerIcon" status={E2EStatus.Warning} hideTooltip />;
title = _t("encryption|verification|after_new_login|verify_this_device");
} else if (phase === Phase.Finished) {
// SetupEncryptionBody will take care of calling onFinished, we don't need to do anything

View File

@@ -27,6 +27,8 @@ import { EncryptionCardButtons } from "../../views/settings/encryption/Encryptio
import { EncryptionCardEmphasisedContent } from "../../views/settings/encryption/EncryptionCardEmphasisedContent";
import ExternalLink from "../../views/elements/ExternalLink";
import dispatcher from "../../../dispatcher/dispatcher";
import E2EIcon from "../../views/rooms/E2EIcon.tsx";
import { E2EStatus } from "../../../utils/ShieldUtils.ts";
interface IProps {
onFinished: () => void;
@@ -228,7 +230,7 @@ export default class SetupEncryptionBody extends React.Component<IProps, IState>
}
return (
<div>
<div className="mx_CompleteSecurity_heroIcon mx_E2EIcon_verified" />
<E2EIcon className="mx_CompleteSecurity_heroIcon" status={E2EStatus.Verified} hideTooltip />
{message}
<div className="mx_CompleteSecurity_actionRow">
<AccessibleButton kind="primary" onClick={this.onDoneClick}>