This commit is contained in:
Matthew Hodgson 2021-03-08 05:08:01 +00:00
parent c02d03cc5b
commit 997d6e1281
3 changed files with 7 additions and 12 deletions

View file

@ -157,13 +157,11 @@ export default class SetupEncryptionBody extends React.Component {
</AccessibleButton>; </AccessibleButton>;
} }
const brand = SdkConfig.get().brand;
return ( return (
<div> <div>
<p>{_t( <p>{_t(
"Verify this login to access your encrypted messages and " + "Verify this login to access your encrypted messages and " +
"prove to others that this login is really you." "prove to others that this login is really you.",
)}</p> )}</p>
<div className="mx_CompleteSecurity_actionRow"> <div className="mx_CompleteSecurity_actionRow">

View file

@ -92,15 +92,14 @@ export class SetupEncryptionStore extends EventEmitter {
this.hasDevicesToVerifyAgainst = cli.getStoredDevicesForUser(cli.getUserId()).some( this.hasDevicesToVerifyAgainst = cli.getStoredDevicesForUser(cli.getUserId()).some(
device => device =>
device.getIdentityKey() && device.getIdentityKey() &&
(!dehydratedDevice || (device.deviceId != dehydratedDevice.device_id)) (!dehydratedDevice || (device.deviceId != dehydratedDevice.device_id)),
); );
if (!this.hasDevicesToVerifyAgainst && !this.keyInfo) { if (!this.hasDevicesToVerifyAgainst && !this.keyInfo) {
// skip before we can even render anything. // skip before we can even render anything.
// XXX: this causes a dialog box flash // XXX: this causes a dialog box flash
this.phase = PHASE_FINISHED; this.phase = PHASE_FINISHED;
} } else {
else {
this.phase = PHASE_INTRO; this.phase = PHASE_INTRO;
} }
this.emit("update"); this.emit("update");

View file

@ -17,9 +17,7 @@ limitations under the License.
import { _t } from '../languageHandler'; import { _t } from '../languageHandler';
import dis from "../dispatcher/dispatcher"; import dis from "../dispatcher/dispatcher";
import { MatrixClientPeg } from '../MatrixClientPeg'; import { MatrixClientPeg } from '../MatrixClientPeg';
import Modal from '../Modal';
import DeviceListener from '../DeviceListener'; import DeviceListener from '../DeviceListener';
import NewSessionReviewDialog from '../components/views/dialogs/NewSessionReviewDialog';
import ToastStore from "../stores/ToastStore"; import ToastStore from "../stores/ToastStore";
import GenericToast from "../components/views/toasts/GenericToast"; import GenericToast from "../components/views/toasts/GenericToast";
import { Action } from "../dispatcher/actions"; import { Action } from "../dispatcher/actions";
@ -53,10 +51,10 @@ export const showToast = async (deviceId: string) => {
props: { props: {
description: _t( description: _t(
"A new login is accessing your account: %(name)s (%(deviceID)s) from %(IP)s", { "A new login is accessing your account: %(name)s (%(deviceID)s) from %(IP)s", {
name: device.display_name, name: device.display_name,
deviceID: deviceId, deviceID: deviceId,
IP: device.last_seen_ip, IP: device.last_seen_ip,
} },
), ),
acceptLabel: _t("Check your devices"), acceptLabel: _t("Check your devices"),
onAccept, onAccept,