s/IP/ip/; s/from/at/
parent
7abc48a716
commit
1629b7e62a
|
@ -38,7 +38,7 @@ interface IProps {
|
||||||
interface IState {
|
interface IState {
|
||||||
counter: number;
|
counter: number;
|
||||||
device?: DeviceInfo;
|
device?: DeviceInfo;
|
||||||
IP?: string;
|
ip?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default class VerificationRequestToast extends React.PureComponent<IProps, IState> {
|
export default class VerificationRequestToast extends React.PureComponent<IProps, IState> {
|
||||||
|
@ -71,10 +71,10 @@ export default class VerificationRequestToast extends React.PureComponent<IProps
|
||||||
if (request.isSelfVerification) {
|
if (request.isSelfVerification) {
|
||||||
const cli = MatrixClientPeg.get();
|
const cli = MatrixClientPeg.get();
|
||||||
const device = await cli.getDevice(request.channel.deviceId);
|
const device = await cli.getDevice(request.channel.deviceId);
|
||||||
const IP = device.last_seen_ip;
|
const ip = device.last_seen_ip;
|
||||||
this.setState({
|
this.setState({
|
||||||
device: cli.getStoredDevice(cli.getUserId(), request.channel.deviceId),
|
device: cli.getStoredDevice(cli.getUserId(), request.channel.deviceId),
|
||||||
IP,
|
ip,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -141,10 +141,10 @@ export default class VerificationRequestToast extends React.PureComponent<IProps
|
||||||
let nameLabel;
|
let nameLabel;
|
||||||
if (request.isSelfVerification) {
|
if (request.isSelfVerification) {
|
||||||
if (this.state.device) {
|
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(),
|
deviceName: this.state.device.getDisplayName(),
|
||||||
deviceId: this.state.device.deviceId,
|
deviceId: this.state.device.deviceId,
|
||||||
IP: this.state.IP,
|
ip: this.state.ip,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -753,7 +753,7 @@
|
||||||
"Safeguard against losing access to encrypted messages & data": "Safeguard against losing access to encrypted messages & data",
|
"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",
|
"Other users may not trust it": "Other users may not trust it",
|
||||||
"New login. Was this you?": "New login. Was this you?",
|
"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",
|
"Check your devices": "Check your devices",
|
||||||
"What's new?": "What's new?",
|
"What's new?": "What's new?",
|
||||||
"What's New": "What's New",
|
"What's New": "What's New",
|
||||||
|
@ -981,7 +981,7 @@
|
||||||
"Folder": "Folder",
|
"Folder": "Folder",
|
||||||
"Pin": "Pin",
|
"Pin": "Pin",
|
||||||
"Your server isn't responding to some <a>requests</a>.": "Your server isn't responding to some <a>requests</a>.",
|
"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)",
|
"Decline (%(counter)s)": "Decline (%(counter)s)",
|
||||||
"Accept <policyLink /> to continue:": "Accept <policyLink /> to continue:",
|
"Accept <policyLink /> to continue:": "Accept <policyLink /> to continue:",
|
||||||
"Delete": "Delete",
|
"Delete": "Delete",
|
||||||
|
|
|
@ -50,10 +50,10 @@ export const showToast = async (deviceId: string) => {
|
||||||
icon: "verification_warning",
|
icon: "verification_warning",
|
||||||
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) at %(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"),
|
||||||
|
|
Loading…
Reference in New Issue