s/IP/ip/; s/from/at/

This commit is contained in:
Matthew Hodgson 2021-03-08 16:44:14 +00:00
parent 7abc48a716
commit 1629b7e62a
3 changed files with 9 additions and 9 deletions

View file

@ -38,7 +38,7 @@ interface IProps {
interface IState {
counter: number;
device?: DeviceInfo;
IP?: string;
ip?: string;
}
export default class VerificationRequestToast extends React.PureComponent<IProps, IState> {
@ -71,10 +71,10 @@ export default class VerificationRequestToast extends React.PureComponent<IProps
if (request.isSelfVerification) {
const cli = MatrixClientPeg.get();
const device = await cli.getDevice(request.channel.deviceId);
const IP = device.last_seen_ip;
const ip = device.last_seen_ip;
this.setState({
device: cli.getStoredDevice(cli.getUserId(), request.channel.deviceId),
IP,
ip,
});
}
}
@ -141,10 +141,10 @@ export default class VerificationRequestToast extends React.PureComponent<IProps
let nameLabel;
if (request.isSelfVerification) {
if (this.state.device) {
nameLabel = _t("From %(deviceName)s (%(deviceId)s) from %(IP)s", {
nameLabel = _t("From %(deviceName)s (%(deviceId)s) at %(ip)s", {
deviceName: this.state.device.getDisplayName(),
deviceId: this.state.device.deviceId,
IP: this.state.IP,
ip: this.state.ip,
});
}
} else {

View file

@ -753,7 +753,7 @@
"Safeguard against losing access to encrypted messages & data": "Safeguard against losing access to encrypted messages & data",
"Other users may not trust it": "Other users may not trust it",
"New login. Was this you?": "New login. Was this you?",
"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",
"A new login is accessing your account: %(name)s (%(deviceID)s) at %(ip)s": "A new login is accessing your account: %(name)s (%(deviceID)s) at %(ip)s",
"Check your devices": "Check your devices",
"What's new?": "What's new?",
"What's New": "What's New",
@ -981,7 +981,7 @@
"Folder": "Folder",
"Pin": "Pin",
"Your server isn't responding to some <a>requests</a>.": "Your server isn't responding to some <a>requests</a>.",
"From %(deviceName)s (%(deviceId)s) from %(IP)s": "From %(deviceName)s (%(deviceId)s) from %(IP)s",
"From %(deviceName)s (%(deviceId)s) at %(ip)s": "From %(deviceName)s (%(deviceId)s) at %(ip)s",
"Decline (%(counter)s)": "Decline (%(counter)s)",
"Accept <policyLink /> to continue:": "Accept <policyLink /> to continue:",
"Delete": "Delete",

View file

@ -50,10 +50,10 @@ export const showToast = async (deviceId: string) => {
icon: "verification_warning",
props: {
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) at %(ip)s", {
name: device.display_name,
deviceID: deviceId,
IP: device.last_seen_ip,
ip: device.last_seen_ip,
},
),
acceptLabel: _t("Check your devices"),